You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support intra-workspace dependencies via all_crate_deps
`crates_universe` drops dependency edges between crates of the same Cargo
workspace, leaving users to restate them by hand in BUILD files while
Cargo.toml already describes them.
Track those edges instead of discarding them, and render them into their
own `_FIRST_PARTY_*` maps that `all_crate_deps(first_party = True)` opts
into. The choice is per target at load time rather than per repository at
generation time, so enabling it needs no repin and no configuration.
The Bazel repository holding the workspace's crates is derived from the
rule's existing `cargo_lockfile` label, so there is no new user-facing
attribute. That label stays out of the lockfile digest for the same
reason `label_injection_mapping` does: canonical repository names are
consumer-specific, and hashing one would demand a producer-side repin
that a read-only bzlmod cache cannot perform.
Third-party output is unaffected. Rendering the test fixtures before and
after this change produces a diff of pure additions: the new
`first_party` parameter, its docstring, and six empty map literals for
workspaces without intra-workspace dependencies.
0 commit comments