bazel: expose fix_lint and lint_test targets with public visibility - #11057
bazel: expose fix_lint and lint_test targets with public visibility#11057oharboe wants to merge 4 commits into
Conversation
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
There was a problem hiding this comment.
Code Review
This pull request updates the BUILD.bazel file to expose the test_suite and sh_binary targets with public visibility. The reviewer correctly pointed out that exposing the test_suite target without also exposing its constituent test targets will result in Bazel visibility errors for downstream consumers.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
Added |
|
Why make the tests public? |
Then I can test if ORFS is formatted correctly. |
|
I don't want to duplicate the policies of OpenROAD w.r.t. coding of scripts and the infrastructure for linting and checking, I want OpenROAD to set them and ORFS to follow them. |
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Summary
Exposes
fix_lintandlint_testtargets inBUILD.bazelwithvisibility = ["//visibility:public"].Downstream Usage
This allows downstream Bazel workspaces (such as OpenROAD-flow-scripts) to run OpenROAD's version-pinned linter toolchain (
tclint,tclfmt,buildifier) directly from their workspace root without requiring local patches or aliases:# From OpenROAD-flow-scripts repo root: bazelisk run //tools/OpenROAD:fix_lintBecause Bazel automatically sets
BUILD_WORKSPACE_DIRECTORYto whichever workspace invokedbazel run, file discovery infix_lint.shautomatically targets ORFS files when run in ORFS.