You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[build] run Rust tests and build Selenium Manager from source on Windows - #17998
All GitHub Actions tests on Windows that run with --pin_browsers=false now build Selenium Manager from the current commit, rather than downloading an older, pre-built binary.
CI Rust Tests on Windows will run
🔧 Implementation Notes
Fixing this with an msvc exec platform because rules_rs ships an msvc-host rustc for Windows and the crate universe only lists msvc triples; a gnullvm exec platform makes every crate incompatible.
To get this working we needed to patch rules_rs to shorten its toolchain directory names so the link line stays under MAX_PATH.
🤖 AI assistance
AI assisted (complete below)
Tool(s): Claude Code (Fable 5.1)
What was generated: the diagnosis of the skipped tests and the MAX_PATH link failure, the path-length measurements, the changes, and this description
I reviewed all AI output and can explain the change
• Restores Rust test execution on Windows with an MSVC-compatible Bazel platform.
• Builds Selenium Manager from trunk for unpinned Windows CI runs.
• Patches rules_rs toolchain names to avoid Windows MAX_PATH link failures.
The proposed approach is the best available interim solution: it matches the crate universe's MSVC triples, scopes the autoconfigured C/C++ toolchain to Windows, and preserves pinned release behavior. Waiting for upstream hermetic MSVC support or shorter rules_rs names would leave Windows Rust tests and trunk Selenium Manager coverage broken; the local patch should be removed once upstream resolves the path-length issue.
Files changed (5) +69 / -11
Bug fix (1) +4 / -3
BUILD.bazelBuild Windows Selenium Manager for unpinned runs+4/-3
Build Windows Selenium Manager for unpinned runs
• Changes the Windows manager alias to mirror Linux and macOS selection behavior. Pinned-browser runs use the downloaded release, while default runs build the current Rust target.
.bazelrcSelect the MSVC execution platform on Windows+5/-1
Select the MSVC execution platform on Windows
• Replaces the gnullvm Windows host platform with the MSVC-compatible platform. Registers the autoconfigured local C/C++ toolchains so Rust build scripts and native actions can resolve on Windows.
BUILD.bazelDefine a path-conscious Windows MSVC platform+4/-7
Define a path-conscious Windows MSVC platform
• Replaces the gnullvm platform with a tersely named MSVC ABI platform. The shorter name also reduces generated Bazel path lengths near the Windows MAX_PATH limit.
MODULE.bazelPatch rules_rs and expose local MSVC toolchains+14/-0
Patch rules_rs and expose local MSVC toolchains
• Applies a repository patch that shortens generated rules_rs toolchain names. Adds the rules_cc configuration extension and exposes local MSVC repositories for Windows-specific registration.
• Adds a temporary upstream dependency patch that abbreviates default, Rust toolchain, and bootstrap names. This keeps generated Windows sysroot and linker paths below MAX_PATH.
1. Dependency updates can erase the patch 📘 Rule violation⚙ Maintainability
Description
rules_rs_short_toolchain_names.patch is added directly under third_party/ as a
repository-maintained dependency override. A refresh of that directory can overwrite the file, while
MODULE.bazel now depends on it to keep Windows Rust builds within the path-length limit.
Compliance rule 2 prohibits direct edits under third_party/. The cited file is newly added under
that directory, and its contents directly modify the external rules_rs toolchain definitions.
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
## Issue description
The new `rules_rs` patch is stored directly under `third_party/`, which is prohibited for repository-maintained modifications.
## Issue Context
Move the patch to a maintained build-support or patches directory and update the `single_version_override` label without changing its behavior.
## Fix Focus Areas
- third_party/bazel/rules_rs_short_toolchain_names.patch[1-42]
- MODULE.bazel[46-52]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Review mode: ⚖️ Balanced: This is a localized but behavior-affecting Bazel/Windows toolchain configuration change with real CI and Rust build compatibility risk, warranting a careful single-pass review.
Tip of the day
💡 Did you know, you can tweak Display preferences with a live preview to see your comment before it ships
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
B-buildIncludes scripting, bazel and CI integrations
2 participants
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.
🔗 Related Issues
💥 What does this PR do?
--pin_browsers=falsenow build Selenium Manager from the current commit, rather than downloading an older, pre-built binary.🔧 Implementation Notes
msvcexec platform becauserules_rsships anmsvc-hostrustcfor Windows and the crate universe only listsmsvctriples; agnullvmexec platform makes every crate incompatible.rules_rsto shorten its toolchain directory names so the link line stays underMAX_PATH.🤖 AI assistance
MAX_PATHlink failure, the path-length measurements, the changes, and this description💡 Additional Considerations
hermetic-llvmships anmsvctoolchain (Support Native MSVC ABI targets (*-windows-msvc) hermeticbuild/hermetic-llvm#156, Support fully hermeticmsvcWindows ABI hermeticbuild/rules_rs#137), the exec platform goes back to@llvmand the autoconfigured MSVC toolchain goes away.rules_rsissue for the toolchain directory name lengths and drop the patch once upstream shortens them.🔄 Types of changes