Skip to content

crate_universe: use local paths for vendored crate aliases - #4314

Open
goutamadwant wants to merge 1 commit into
bazelbuild:mainfrom
goutamadwant:fix-local-vendor-aliases
Open

goutamadwant wants to merge 1 commit into
bazelbuild:mainfrom
goutamadwant:fix-local-vendor-aliases

Conversation

@goutamadwant

Copy link
Copy Markdown

Fix local crates_vendor alias generation for path dependencies in local
vendor mode.

When a crate is patched to a local path, generated hub aliases and entries
from crate_deps() now target the in-repository Bazel package instead of an
external repository label. Local labels are constructed through a shared
validated path so malformed or escaping paths return a rendering error.

The local-patching integration fixture now exercises both the generated hub
alias and the crate_deps() lookup for a patched getrandom dependency.

Fixes #3732

Tests:

  • bazel test //crate_universe:unit_test --nocache_test_results
  • bazel build //crate_universe:unit_test --config=rustfmt --config=clippy
  • bazel test //local_patching:test //local_patching:crate_deps_test

AI agents assisted with understanding the codebase, writing tests, and reviewing the solution.

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.

Incorrect Bazel aliases generated for patched crates using crates_vendor

1 participant