Skip to content

Fix compiler crash on Swift 6.2.3 debug builds#151

Merged
czechboy0 merged 5 commits into
apple:mainfrom
adam-fowler:compiler-crash-fix
Jan 30, 2026
Merged

Fix compiler crash on Swift 6.2.3 debug builds#151
czechboy0 merged 5 commits into
apple:mainfrom
adam-fowler:compiler-crash-fix

Conversation

@adam-fowler
Copy link
Copy Markdown
Contributor

Motivation

To cross compile on macOS you have to use an SDK release downloaded from swift.org. Unfortunately all release SDK for macOS have debug enabled. This small edit ensures swift-configuration compiles using a 6.2.3 debug SDK.

Modifications

Remove if let fileContents and replace with fileContents != nil. The code looks slightly more ugly in that it requires a ! two lines down.

Result

You can cross compiler swift-configuration on macOS using a 6.2.3 release

Comment thread Sources/Configuration/Providers/Files/FileProvider.swift
Copy link
Copy Markdown
Contributor

@czechboy0 czechboy0 left a comment

Choose a reason for hiding this comment

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

Thank you @adam-fowler 🙏

@czechboy0 czechboy0 enabled auto-merge (squash) January 30, 2026 11:42
@czechboy0 czechboy0 added the 🔨 semver/patch No public API change. label Jan 30, 2026
@czechboy0 czechboy0 merged commit b4768bd into apple:main Jan 30, 2026
36 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patch No public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants