Skip to content

fix: make @chisel_firtool resolvable when rules_chisel is a dependency - #8

Merged
MrAMS merged 1 commit into
hw-bzl:masterfrom
oharboe:fix-firtool-consumer-visibility
Aug 26, 2026
Merged

MrAMS merged 1 commit into
hw-bzl:masterfrom
oharboe:fix-firtool-consumer-visibility

Conversation

@oharboe

@oharboe oharboe commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

The verilog rules' implicit _firtool attribute defaults to @chisel_firtool//:bin/firtool, an apparent repo name resolved through rules_chisel's own repo mapping. That mapping entry comes from the chisel module extension, which MODULE.bazel declares with dev_dependency = True — so it exists in this repo's own (root-module) CI, but is dropped whenever rules_chisel is consumed as a dependency. Any consumer using fir_library / verilog_directory / verilog_file then fails analysis with:

No repository visible as '@chisel_firtool' from repository '@@rules_chisel+'

Reproduce: from any module that has bazel_dep(name = "rules_chisel", version = "0.4.1"), build a fir_library target.

Fix: declare the extension use as a regular dependency. Settings resolution (_collect_settings) already prefers the root module's chisel.toolchain tag, so this module's own tag only serves as the fallback default for consumers that don't configure one — which also makes the verilog rules work out of the box.

🤖 Generated with Claude Code

The verilog rules' implicit _firtool attribute defaults to
@chisel_firtool//:bin/firtool, an apparent repo name resolved through
rules_chisel's own repo mapping. That mapping entry comes from the chisel
module extension, which MODULE.bazel declares with dev_dependency = True —
so it exists in this repo's own (root-module) CI, but is dropped whenever
rules_chisel is consumed as a dependency. Any consumer using fir_library /
verilog_directory / verilog_file then fails analysis with:

  No repository visible as '@chisel_firtool' from repository '@@rules_chisel+'

Declare the extension use as a regular dependency. Settings resolution
already prefers the root module's chisel.toolchain tag, so this module's
own tag only serves as the fallback default for consumers that don't
configure one.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@oharboe

oharboe commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

@MrAMS Makes sense?

@MrAMS MrAMS left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, this makes sense to me. Thank you!

@MrAMS
MrAMS merged commit 9f593f5 into hw-bzl:master Aug 26, 2026
7 checks passed
@oharboe

oharboe commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

👍

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