Skip to content

bazel: keep bazel_dep(bazel-orfs) non-dev for load() visibility - #4342

Merged
maliberty merged 2 commits into
The-OpenROAD-Project:masterfrom
oharboe:bazel-orfs-dep-non-dev
Jul 8, 2026
Merged

maliberty merged 2 commits into
The-OpenROAD-Project:masterfrom
oharboe:bazel-orfs-dep-non-dev

Conversation

@oharboe

@oharboe oharboe commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

flow/BUILD has load("@bazel-orfs//:openroad.bzl", "orfs_pdk"), which needs @bazel-orfs visible from @orfs even when ORFS is consumed as a non-root module. Marking the bazel_dep dev-only suppresses that visibility, and every non-root consumer (bazel-orfs itself, its gallery and downstream-test workspaces) has to patch it back in at consumption time (bazel-orfs patches/0036).

Only the git_override needs to be dev-conditional, and it already is: overrides are implicitly root-only. At non-root the consumer's own bazel-orfs module satisfies the dep; when @orfs is the root module, dev deps are honoured anyway, so 'bazel mod graph' output is byte-identical before and after this change.

flow/BUILD has load("@bazel-orfs//:openroad.bzl", "orfs_pdk"), which
needs @bazel-orfs visible from @orfs even when ORFS is consumed as a
non-root module. Marking the bazel_dep dev-only suppresses that
visibility, and every non-root consumer (bazel-orfs itself, its
gallery and downstream-test workspaces) has to patch it back in at
consumption time (bazel-orfs patches/0036).

Only the git_override needs to be dev-conditional, and it already is:
overrides are implicitly root-only. At non-root the consumer's own
bazel-orfs module satisfies the dep; when @orfs is the root module,
dev deps are honoured anyway, so 'bazel mod graph' output is
byte-identical before and after this change.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request modifies MODULE.bazel to make bazel-orfs a non-dev dependency, adding an explanatory comment for this change. The reviewer recommends specifying a version for this dependency to prevent potential Bzlmod resolution errors for downstream consumers.

Comment thread MODULE.bazel Resolved
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
@oharboe
oharboe requested a review from maliberty July 8, 2026 15:55
@maliberty

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: f627783c18

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@maliberty
maliberty merged commit a15fd19 into The-OpenROAD-Project:master Jul 8, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants