-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cargo crates generated from git repositories are not reproducible #1927
Comments
I've submitted a PR to bazel that should fix this, although we should probably also exclude |
This directory contains the original git repo when the crate is from git. Including this directory currently makes these rules re-run whenever the repository rule re-runs, although this is fixed by bazelbuild/bazel#18271. Even after this fix, excluding this directory avoids depending on unnecessary files. Fixes bazelbuild#1927.
This directory contains the original git repo when the crate is from git. Including this directory currently makes these rules re-run whenever the repository rule re-runs, although this is fixed by bazelbuild/bazel#18271. Even after this fix, excluding this directory avoids depending on unnecessary files. Fixes bazelbuild#1927.
We've been seeing poor caching related to the use of crate_universe git dependencies - should we expect that the Bazel fix should address this or would we also need the linked PR to change the globs? |
The Bazel fix will fix it in new versions of Bazel (presumably 7 now), but the fix in rules_rust will fix it for existing versions. |
This directory contains the original git repo when the crate is from git. Including this directory currently makes these rules re-run whenever the repository rule re-runs, although this is fixed by bazelbuild/bazel#18271. Even after this fix, excluding this directory avoids depending on unnecessary files. Fixes bazelbuild#1927.
* Exclude .tmp_git_root from globs This directory contains the original git repo when the crate is from git. Including this directory currently makes these rules re-run whenever the repository rule re-runs, although this is fixed by bazelbuild/bazel#18271. Even after this fix, excluding this directory avoids depending on unnecessary files. Fixes #1927. * Regenerate vendored crates
* Exclude .tmp_git_root from globs This directory contains the original git repo when the crate is from git. Including this directory currently makes these rules re-run whenever the repository rule re-runs, although this is fixed by bazelbuild/bazel#18271. Even after this fix, excluding this directory avoids depending on unnecessary files. Fixes bazelbuild#1927. * Regenerate vendored crates
* Exclude .tmp_git_root from globs This directory contains the original git repo when the crate is from git. Including this directory currently makes these rules re-run whenever the repository rule re-runs, although this is fixed by bazelbuild/bazel#18271. Even after this fix, excluding this directory avoids depending on unnecessary files. Fixes bazelbuild#1927. * Regenerate vendored crates
* Exclude .tmp_git_root from globs This directory contains the original git repo when the crate is from git. Including this directory currently makes these rules re-run whenever the repository rule re-runs, although this is fixed by bazelbuild/bazel#18271. Even after this fix, excluding this directory avoids depending on unnecessary files. Fixes bazelbuild#1927. * Regenerate vendored crates
If you have a crate loaded from git in your Cargo.toml, this gets loaded by bazel via git_repository. This leaves the .git directory either in the root or in
.tmp_git_root
. The .git directory contains files where the contents is not a function of the input attributes togit_repository
, so technically this repository rule is not reproducible (see bazelbuild/bazel#18152). Rules_rust generates globs that depend on these files, making these rules unnecessarily re-run when the repository rule is re-run.We should probably exclude
.git
from these globs.The text was updated successfully, but these errors were encountered: