Skip to content

ci: keep MSVC /Brepro flags intact in Git Bash - #5489

Merged
sxlijin merged 1 commit into
canaryfrom
sxlijin/fix-msvc-arflags-msys-conversion
Nov 3, 2026
Merged

sxlijin merged 1 commit into
canaryfrom
sxlijin/fix-msvc-arflags-msys-conversion

Conversation

@sxlijin

@sxlijin sxlijin commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Windows wrapper tests in merge queue fail before running the suite because Git Bash converts ARFLAGS_<target>=/Brepro into C:/Program Files/Git/Brepro. lib.exe then treats the split value as input files and fails with LNK1181: cannot open input file 'C:\Program'.

Exclude only the two MSVC archiver environment variables from MSYS2 environment conversion. This retains the reproducible static-library flag added in #5487 and preserves existing conversion exclusions, including the wildcard. The setting is applied before .envrc starts native subprocesses such as direnv dump.

Validation: bash -n .envrc, applicable prek checks, and sourcing .envrc with unset, existing-prefix, and wildcard exclusions all pass. The queued Windows wrapper jobs provide the native validation once this fix reaches their base.

This fixes the Windows blocker for stack #5464. Failure example: https://github.com/BoundaryML/baml/actions/runs/41557370744/job/125659637503. MSYS2 documents this control at https://www.msys2.org/docs/filesystem-paths/#environment-variables.

Summary by CodeRabbit

  • Chores
    • Updated Windows build environment configuration to preserve existing environment exclusions while accounting for additional archiver flags, supporting more consistent build behavior. This is an internal development workflow update and does not change user-facing functionality.

@vercel

vercel Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
developer-docs Ready Ready Preview Nov 3, 2026 1:10am UTC

Request Review

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

⏭️ Performance benchmarks were skipped

Perf benchmarks (CodSpeed) are opt-in on pull requests — they no longer run on every push. They always run automatically after merge to canary/main.

To run them on this PR, do any of the following, then push a commit (or re-run CI):

  • Add RUN_CODSPEED=1 to the PR description, or
  • Include run-perf or /perf in the PR title or any commit message.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Walkthrough

.envrc now adds two MSVC ARFLAGS variable names to MSYS2_ENV_CONV_EXCL unless its value is exactly *. Existing exclusions remain, separated by a semicolon.

Changes: MSVC ARFLAGS exclusions

Layer / File(s) Summary
Update environment exclusions
.envrc
When MSYS2_ENV_CONV_EXCL is not *, the setting gains the two MSVC ARFLAGS variable names. A semicolon separates them from a nonempty existing value.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix · Severity of issue fixed: Medium

Possibly related PRs

  • BoundaryML/baml#5487: Adds the two ARFLAGS_<target> variables that this change excludes from conversion.
  • BoundaryML/baml#5488: Reports the Windows failure caused by conversion of /Brepro and lib.exe.
  • BoundaryML/baml#5483: Adds Windows wrapper build and test jobs affected by the MSVC ARFLAGS conversion.

Suggested reviewers: hellovai

Merge Risk: Minimal · up to 360d9

No merge-blocking risk was identified in this targeted environment configuration change.

Architecture risk: Low · up to 360d9

The changed surface does not map to a changed system, dependency edge, entrypoint, or external dependency.

Changed systems: None identified.

Architecture concerns
No architecture-level concerns identified.

Review details

Before / after behavior

  • observed — Modified behavior in .envrc: When MSYS2_ENV_CONV_EXCL is not exactly *, .envrc appends the two MSVC ARFLAGS variable names to its existing value, using a semicolon when that value is nonempty. When it is *, the setting is left unchanged.
Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: preserving MSVC /Brepro flags in Git Bash.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Finishing Touches
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.

A rabbit checks the flags at dawn,
Two names stay as they were drawn.
Semicolons mark the way,
Unless a star says “leave them,” hey.
The build hops onward, ears held high.

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8a9a5ea2-167f-440a-b4fd-5d4bede94afc
Commits

Reviewing files that changed from the base of the PR and between 4ef2454 and 360d923.

Files selected for processing: 1
  • .envrc

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review.

@sxlijin
sxlijin added this pull request to the merge queue Nov 3, 2026
Merged via the queue into canary with commit 5437493 Nov 3, 2026
61 checks passed
@sxlijin
sxlijin deleted the sxlijin/fix-msvc-arflags-msys-conversion branch November 3, 2026 01:18
meefs pushed a commit to meefs/baml that referenced this pull request Nov 3, 2026
Native Windows ARM64 wrapper builds select `llvm-lib.exe`, which treats
`/Brepro` as an input filename and fails with `/Brepro: no such file or
directory`. Clear the ARM64 archiver flags while retaining `/Brepro` for
the x64 MSVC archiver. LLVM's COFF archiver already writes deterministic
archives by default.

This is the remaining archiver failure exposed after BoundaryML#5489 stopped MSYS2
from converting the flags into paths. Failure example:
https://github.com/BoundaryML/baml/actions/runs/41558436389/job/125663254593.

Validation: reproduced the unsupported-flag failure with LLVM using an
ARM64 Windows COFF object, then successfully wrote two byte-identical
libraries without the flag after changing the object's filesystem
timestamp. Sourcing `.envrc` clears an inherited ARM64 `/Brepro` value
and preserves the x64 flag. Shell syntax and applicable prek checks
pass. LLVM's implementation explicitly enables deterministic output:
https://github.com/llvm/llvm-project/blob/main/llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Chores**
* Updated build settings for native ARM64 Windows builds. The build no
longer passes an unsupported option to the library tool; application
behavior is unchanged.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

This branch was successfully deployed

1 active deployment
Preview – developer-docs — 360d923c Deployed Nov 3, 2026 by vercel[bot]
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