Skip to content

crate_universe: skip root MODULE.bazel lookup for non-root modules - #4386

Open
TrapsterDK wants to merge 1 commit into
bazelbuild:mainfrom
TrapsterDK:crate-universe-non-root-lookup
Open

TrapsterDK wants to merge 1 commit into
bazelbuild:mainfrom
TrapsterDK:crate-universe-non-root-lookup

Conversation

@TrapsterDK

Copy link
Copy Markdown
Contributor

Fixes #4385.

crate_universe no longer looks up @@//:MODULE.bazel for non-root modules, so a root module without a top level BUILD.bazel can depend on a module that uses crate.from_cargo.

  • crate_universe/extensions.bzl: look up the root only when is_root, else use tag_path. The value only filters watched paths when not repinning.
  • New integration fixture crate_universe/tests/integration/non_root_no_root_build with no root BUILD.bazel, depending on cargo_aliases. It fails with "BUILD file not found" without the change.
  • cargo_aliases: make :aliases public. Add CI jobs for the new fixture.

bazel test //... in the new fixture passes. buildifier and the existing cargo_aliases job were not run locally.

Assisted-by: Claude

Assisted by Claude.

This branch has not been deployed

No deployments
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.

crate_universe: non-root modules require a root BUILD.bazel

1 participant