Repository navigation
fix: Mitigate the -L dependency= consolidation races on Windows under cc_common.link - #82
Merged
Conversation
… `cc_common.link` Keep `.a` files out of the unified dependency directory of the Windows process wrapper. On Windows, `process_wrapper` merges every `-Ldependency=` directory into one, to keep the command line short. It scans each directory with `read_dir`, so it also sees files that are no input of the action. `rules_rust` puts a `lib<name>.a` symlink next to each rlib, for `cc_common.link`. With `experimental_use_cc_common_link`, Bazel builds those symlinks while sibling `Rustc` actions scan the directory, and the copy fails with "Access is denied". `-L dependency=` only searches for crates, and no crate is a `.a` file, so skip the extension. Relates to hermeticbuild#48
ArchangelX360
force-pushed
the
archangelx360/races
branch
from
October 5, 2026 13:49
882fcfc to
dae8132
Compare
intellij-monorepo-bot
pushed a commit
to JetBrains/intellij-community
that referenced
this pull request
Oct 21, 2026
Both Bazel roots move from rules_rs 0.0.112 to 0.1.3, the newest release. `BazelProjectStructureTest` requires the same version, override and patch set in each root. # The pin is an archive, not a registry entry 0.1.3 is not in the Bazel Central Registry yet. The entry is in review: bazelbuild/bazel-central-registry#11208. So each root takes an `archive_override` on the GitHub release, in place of the `single_version_override`. The override holds the same patch list. rules_kotlin already uses an `archive_override` in both roots, so the pattern is known here. `bazel_downloader.cfg` allows github.com and rewrites it to the cache redirector. Go back to `single_version_override` once the registry entry lands. A TODO at each override says so. # One patch goes rules_rs 0.1.3 pins rules_rust a20387a3b3e7baec859b53f3cb15b026fbc8a423, up from fd521efe16c03e4cd169453eb44fb98d73ebb7aa. That commit holds hermeticbuild/rules_rust#82, so rules_rust-process-wrapper-skip-static-lib-symlinks.patch is dead. `a` is out of `CRATE_SEARCH_ARTIFACT_EXTENSIONS` upstream, and the test moves `libfoo.a` to the negative list. The patch goes, and the `rules_rust.patch` tag drops it. # Five patches stay Each one still applies to the new sources without fuzz, and no upstream version of the change exists: - rules_rs-*-github-crate-tarball.patch: 0.1.3 has no `allow_git` attribute. hermeticbuild/rules_rs#247 is open. - rules_rs-*-bootstrap-toolchain-type.patch and rules_rust-bootstrap-toolchain-type.patch: the pinned rules_rust has no `@rules_rust//rust:bootstrap_toolchain_type`. - rules_rust-msvc-crt-transition.patch and rules_rust-msvc-rustc-link-through-lld-link.patch: unchanged upstream. The two rules_rs patch files take the new version in their name. The rules_rust patch files keep their names, because the name holds no version. # Verification - `bazel mod deps --lockfile_mode=update` in both roots. - `bazel build @rules_rust//util/process_wrapper:process_wrapper`, which uses the bootstrap toolchain of both bootstrap patches. - `bazel build //tools/bt/... //tools/vm/... //build/rust-tools/...` in community, and `//build/dev-dist-tools/...` in the root. - Analysis of `//fleet/native/...`, `//toolbox/app/bazel/launcher/...`, `//language-server/native/...` and `//build/native/...`. - `bazel run //:format.check`. - `BazelProjectStructureTest`, 9 tests. A Windows and a macOS build are not verified here. The container runs Linux. M-Session-Id: A-1849b79d-f20c-4519-9ea5-f7cc052de2f6 GitOrigin-RevId: 04cb2a18844650742f85644a7610b04144291693
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Keep
.afiles out of the unified dependency directory of the Windows process wrapper.On Windows,
process_wrappermerges every-Ldependency=directory into one, to keep the command line short. It scans each directory withread_dir, so it also sees files that are no input of the action.rules_rustputs alib<name>.asymlink next to each rlib, forcc_common.link. Withexperimental_use_cc_common_link, Bazel builds those symlinks while siblingRustcactions scan the directory, and the copy fails with "Access is denied".-L dependency=only searches for crates, and no crate is a.afile, so skip the extension.Relates to #48