Skip to content

fix: relaunch.sh — prefer ~/.dotnet SDK and skip Xcode version check#324

Merged
PureWeen merged 2 commits intoPureWeen:mainfrom
btessiau:fix/relaunch-dotnet-path
Mar 9, 2026
Merged

fix: relaunch.sh — prefer ~/.dotnet SDK and skip Xcode version check#324
PureWeen merged 2 commits intoPureWeen:mainfrom
btessiau:fix/relaunch-dotnet-path

Conversation

@btessiau
Copy link
Copy Markdown
Contributor

@btessiau btessiau commented Mar 9, 2026

Problem

relaunch.sh fails on machines where:

  1. .NET 10 SDK is installed via dotnet-install.sh — installs to ~/.dotnet/, but the system dotnet at /usr/local/share/dotnet/ is an older version (e.g. 7.0). The script's bare dotnet build picks the wrong one.

  2. Xcode is a minor version ahead of what the .NET MacCatalyst SDK expects (e.g. Xcode 26.3 vs expected 26.2), causing the build to fail with a version mismatch error.

Fix

  • PATH: Prepend ~/.dotnet to PATH if ~/.dotnet/dotnet exists. Conditional — no-op on machines with a single system-wide install.
  • Xcode: Pass -p:ValidateXcodeVersion=false to dotnet build. Apple ships Xcode updates faster than .NET SDK updates, so this mismatch is common.

The script failed on machines where:
- .NET 10 SDK is installed via dotnet-install.sh (~/.dotnet) but the
  system dotnet (/usr/local/share/dotnet) is an older version
- Xcode is a minor version ahead of what the .NET MacCatalyst SDK expects

Both fixes are conditional/harmless on machines that don't need them.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@btessiau btessiau marked this pull request as draft March 9, 2026 06:56
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

@btessiau btessiau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR #324 Review -- Multi-Model Consensus Report

CI Status: ⚠️ No checks configured
Models used: claude-opus-4.6 ×2, claude-sonnet-4.6, gemini-3-pro-preview, gpt-5.3-codex


✅ PATH prepend is correct

The [ -x "$HOME/.dotnet/dotnet" ] guard, timing (before first dotnet invocation), and process-local export are all sound. No issues found.

🟡 MODERATE -- ValidateXcodeVersion=false is unconditional (3/5 models flagged)

PolyPilot/relaunch.sh:33 -- The flag correctly silences minor Xcode version skew (the stated intent), but also silences major version incompatibilities. Since relaunch.sh kills the old app before launching the new build, a silently broken binary is more disruptive here than a clear build error.

Mitigating factor: Actual clang/linker failures will still surface -- the risk is narrow (codegen succeeds but runtime differs).

Suggested fix: Add a comment documenting the tradeoff:

# -p:ValidateXcodeVersion=false bypasses the .NET SDK's Xcode version-string gate.
# Safe for minor version skew (Apple ships Xcode faster than .NET certifies it).
# A major Xcode incompatibility will still surface as a compile/link error.

Recommendation: ⚠️ Request changes (minor)

Add the explanatory comment above, then this is ready to merge. The code changes themselves are correct and well-scoped.

Copy link
Copy Markdown
Contributor Author

@btessiau btessiau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR #324 Review -- Multi-Model Consensus Report

CI Status: ⚠️ No checks configured
Models used: claude-opus-4.6 ×2, claude-sonnet-4.6, gemini-3-pro-preview, gpt-5.3-codex


✅ PATH prepend is correct

The [ -x "$HOME/.dotnet/dotnet" ] guard, timing (before first dotnet invocation), and process-local export are all sound. No issues found.

🟡 MODERATE -- ValidateXcodeVersion=false was unconditional with no comment (3/5 models flagged)

PolyPilot/relaunch.sh:33 -- The flag correctly silences minor Xcode version skew (the stated intent), but also silences major version incompatibilities. Since relaunch.sh kills the old app before launching the new build, a silently broken binary is more disruptive here than a clear build error.

Status: ✅ FIXED -- A 3-line comment block has been added documenting the tradeoff. All 5 models confirmed the fix in re-review.


Recommendation: ✅ Approve

All previous findings have been addressed. The code changes are correct and well-scoped.

@btessiau btessiau marked this pull request as ready for review March 9, 2026 08:07
@PureWeen PureWeen merged commit 60c3b09 into PureWeen:main Mar 9, 2026
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.

2 participants