shims/super/cc: allow paths under HOMEBREW_FORMULA_BUILDPATH - #23971
Merged
Merged
Conversation
woodruffw
enabled auto-merge
September 15, 2026 04:46
Contributor
There was a problem hiding this comment.
馃煛 Changes recommended
The bug fix lacks regression coverage in the existing compiler-shim spec.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Allows superenv鈥檚 compiler shim to retain include/library paths within a formula鈥檚 staged build directory.
Changes:
- Canonicalises
HOMEBREW_FORMULA_BUILDPATH. - Permits the build path and its descendants in
keep?.
File summaries
| File | Description |
|---|---|
Library/Homebrew/shims/super/cc |
Allows paths beneath the formula build directory. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Balanced
馃挕 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
woodruffw
force-pushed
the
ww/fix-buildpath
branch
from
September 15, 2026 04:56
d4c6c84 to
9801e04
Compare
7 tasks
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.
brew benchmarkresults.brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?I used GPT Astra (Max) to help me root-cause this bug and iterate on the patch.
This is a fix for the build failures in Homebrew/homebrew-core#311045.
TL;DR: #23940 changes the temporary directory (
HOMEBREW_TEMP) used for builds from the common temporary root to a sandbox-specific one. Specifically, this line:https://github.com/Homebrew/brew/pull/23940/changes#diff-7eeef6e1b769c423e63e92e764feea0fc54944018bcec8c108d9a19eb550c118R584
This then interacted unintentionally with two pre-existing conditions:
HOMEBREW_TEMP;ccwrapper only used the sandbox-adjustedHOMEBREW_TEMPto determine which paths to retain, e.g. for-Iincludearguments.(2) in particular meant that, even though the sandbox had access to the staged build directory, superenv would incorrectly strip any
-Iincludethat referenced it.