Skip to content

fix(ci): use short output_base on Windows to avoid MAX_PATH limit#413

Merged
avrabe merged 2 commits intomainfrom
fix/windows-short-output-base
Mar 21, 2026
Merged

fix(ci): use short output_base on Windows to avoid MAX_PATH limit#413
avrabe merged 2 commits intomainfrom
fix/windows-short-output-base

Conversation

@avrabe
Copy link
Contributor

@avrabe avrabe commented Mar 21, 2026

Summary

Use --output_base=D:\_b for 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 file errors. A shorter output_base reduces this significantly.

What changed

  • ci.yml: Windows Build Core Targets and Run Unit Tests use bazel --output_base=D:\_b
  • ci.yml: Windows cache path updated to match (D:\_b)
  • BCR compatibility left unchanged (uses published rules_rust, not our git_override)

Test plan

  • Test on windows-latest passes (the key test)
  • Other CI checks unaffected

🤖 Generated with Claude Code

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>
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>
@avrabe avrabe merged commit eec6678 into main Mar 21, 2026
25 of 27 checks passed
@avrabe avrabe deleted the fix/windows-short-output-base branch March 21, 2026 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant