Skip to content

Commit 2b980e9

Browse files
oharboeclaude
andcommitted
bazel: keep bazel_dep(bazel-orfs) non-dev for load() visibility
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>
1 parent 4b3f266 commit 2b980e9

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎MODULE.bazel‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,15 @@ git_override(
3333
remote = "https://github.com/The-OpenROAD-Project/qt_bazel_prebuilts",
3434
)
3535

36-
bazel_dep(name = "bazel-orfs", dev_dependency = True)
36+
# Exception to the dev-only rule above: flow/BUILD has
37+
# load("@bazel-orfs//:openroad.bzl", "orfs_pdk"), so @bazel-orfs must stay
38+
# visible from @orfs even at non-root consumption; a dev-only bazel_dep
39+
# suppresses that visibility. Only the git_override below (implicitly
40+
# root-only) is dev-conditional — at non-root the consumer's own bazel-orfs
41+
# satisfies this dep. When @orfs is root, dev deps are honoured anyway, so
42+
# the resolved module graph is unchanged.
43+
bazel_dep(name = "bazel-orfs")
44+
3745
bazel_dep(name = "bazel-orfs-verilog", dev_dependency = True)
3846

3947
BAZEL_ORFS_COMMIT = "6ebadeb4be5c9ada103081c9a5e668c014126616"

0 commit comments

Comments
 (0)