Merge 0ba6db0d8f into sapling-pr-archive-bolinfest

This commit is contained in:
Michael Bolin
2026-04-02 11:23:08 -07:00
committed by GitHub
2 changed files with 21 additions and 0 deletions
+1
View File
@@ -71,6 +71,7 @@ single_version_override(
patch_strip = 1,
patches = [
"//patches:rules_rs_windows_gnullvm_exec.patch",
"//patches:rules_rs_delete_git_worktree_pointer.patch",
],
version = "0.0.43",
)
@@ -0,0 +1,20 @@
diff --git a/rs/private/crate_git_repository.bzl b/rs/private/crate_git_repository.bzl
--- a/rs/private/crate_git_repository.bzl
+++ b/rs/private/crate_git_repository.bzl
@@ -35,6 +35,14 @@
"HEAD"
])
if result.return_code != 0:
fail(result.stderr)
+ # Remove .git worktree pointer file. It contains an absolute path to
+ # the bazel output base which is machine-specific and non-deterministic.
+ # Leaving it in pollutes compile_data globs and causes AC misses.
+ #
+ # Note that bazelbuild/rules_rust ignores .git (among other paths) during splicing:
+ # https://github.com/bazelbuild/rules_rust/blob/ca4915c0210bcd240152a5333ecb24d266bda144/crate_universe/src/splicing/splicer.rs#L42
+ rctx.delete(root.get_child(".git"))
+
if strip_prefix:
dest_link = dest_dir.get_child(strip_prefix)
if not dest_link.exists: