fork/rules_rust

git clone https://git.julia.blue/fork/rules_rust

UebelAndreFix module path for bcr testing (#3069)c07cb1b5

main
2 folders6 files

files

crates_from_workspace/
lazy_static_1.5.0_copy/
.gitignore9 B
BUILD.bazel241 B
MODULE.bazel643 B
README.md694 B
WORKSPACE.bazel900 B
vendor_lazy_static.sh1.2 KiB

crate_universe_local_path

This example does some slightly weird things. It tests that we can patch upstream crates.

The local crate in this dir depends on lazy_static, and assumes it can access a symbol named VENDORED_BY.

VENDORED_BY does not exist in the real lazy_static crate.

We have checked in a copy of lazy_static. On CI, we make a copy of our checked in copy of lazy_static adding the VENDORED_BY symbol, and update our Cargo.toml file to enable the [patch].

We then run a test which tries to use the VENDORED_BY symbol. If we weren't successfully patching lazy_static, our test would fail to compile. If we successfully use the patch, the test compiles and everything's fine.