fix(ci): use short output_base on Windows to avoid MAX_PATH limit#413
Merged
fix(ci): use short output_base on Windows to avoid MAX_PATH limit#413
Conversation
The Bazel output_base path on Windows runners can cause paths like rules_rust++rust+rw-..._tools/rust_toolchain/.../librustc_std_workspace_alloc.rlib to exceed the 260 char MAX_PATH limit, causing LNK1181 linker errors. Use --output_base=D:\_b for Windows CI to shorten all Bazel-generated paths. Only applied to ci.yml Test on windows-latest (BCR tests ignore git_override so they use published rules_rust which has the same issue regardless). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 tasks
run_shell uses bash even on Windows (via Git Bash), so batch script syntax (@echo, REM, FOR %%I, dir /B) fails. Use bash-compatible syntax for all platforms. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
Use
--output_base=D:\_bfor Windows CI bazel commands to avoid exceeding the 260 char MAX_PATH limit.The full path to rlib files in the Bazel output tree is ~250 chars, which exceeds MAX_PATH on Windows and causes
LNK1181: cannot open input fileerrors. A shorter output_base reduces this significantly.What changed
ci.yml: WindowsBuild Core TargetsandRun Unit Testsusebazel --output_base=D:\_bci.yml: Windows cache path updated to match (D:\_b)Test plan
Test on windows-latestpasses (the key test)🤖 Generated with Claude Code