Skip to content

keep xcrun working under fake developer dir#281

Merged
forketyfork merged 1 commit intomainfrom
fix/developer-dir-xcrun-workaround
Apr 13, 2026
Merged

keep xcrun working under fake developer dir#281
forketyfork merged 1 commit intomainfrom
fix/developer-dir-xcrun-workaround

Conversation

@forketyfork
Copy link
Copy Markdown
Owner

@forketyfork forketyfork commented Apr 13, 2026

Solution

PR #277 added a local shell workaround for Zig 0.15.2 on macOS, but it left the fake DEVELOPER_DIR incomplete. Tools such as Git still go through /usr/bin/xcrun, and Apple's toolchain expects that binary to exist inside the selected developer directory.

This patch moves the existing shim into DEVELOPER_DIR/usr/bin/xcrun and keeps the PATH wrapper as a symlink to the same executable. That preserves the SDK override for zig build while making the fake developer tree valid for other commands in the shell. I also updated the development notes and repo guidance so the behavior is documented where people are likely to look for it.

Test plan

  • Enter nix develop on a macOS machine that still needs the Zig 0.15.2 SDK workaround.
  • Run git status without unsetting DEVELOPER_DIR and confirm it succeeds.
  • Run /usr/bin/xcrun --sdk macosx --show-sdk-path and confirm it resolves to MacOSX15.4.sdk.
  • Run zig build and confirm the workaround still allows the project to link.

Issue: PR #277 introduced a fake `DEVELOPER_DIR` for the Zig 0.15.2 macOS SDK workaround, but that developer tree did not include `usr/bin/xcrun`, so Git and other commands started failing until `DEVELOPER_DIR` was unset.
Solution: Install the shim at `DEVELOPER_DIR/usr/bin/xcrun` and reuse it from the PATH entry so the fake developer directory stays valid for both Zig and tools that delegate to `/usr/bin/xcrun`. Update the development docs and repo notes so the workaround is easier to understand and maintain.
@forketyfork forketyfork marked this pull request as ready for review April 13, 2026 05:06
@forketyfork forketyfork merged commit baff0fd into main Apr 13, 2026
4 checks passed
@forketyfork forketyfork deleted the fix/developer-dir-xcrun-workaround branch April 13, 2026 05:06
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