Repository navigation
Fix clang headers - #228
Conversation
Co-authored-by: sfusco <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a61cd6c2e8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| self.version = String(decoding: version, as: UTF8.self) | ||
| .trimmingCharacters(in: .whitespacesAndNewlines) | ||
| } else if bundle.lastPathComponent == "darwin.artifactbundle" { | ||
| } else if bundle.lastPathComponent == "darwin.xtoolsdk" { |
There was a problem hiding this comment.
Keep recognizing legacy artifactbundle installs
For users with an existing SDK installed by older xtool/SwiftPM that lacks darwin-sdk-version.txt, current() still walks up to a directory named darwin.artifactbundle (as documented in the nearby swiftResourcesPath comment). Replacing the fallback with only darwin.xtoolsdk makes DarwinSDK(bundle:) return nil for those installs, so sdk status/sdk remove report no SDK and sdk install skips removing the old bundle before invoking swift sdk install. Please accept both names or migrate the old bundle instead of dropping the legacy fallback.
Useful? React with 👍 / 👎.
| let arch = try ArchSelection.auto.sdkBuilderArch | ||
|
|
||
| let tempDir = try TemporaryDirectory(name: "DarwinSDKBuild") | ||
| let sdkPath = tempDir.url.appending(path: "darwin.artifactbundle") |
There was a problem hiding this comment.
Do not rename versionless xtoolsdk bundles before validation
When installing a prebuilt .xtoolsdk that does not contain xtool's private darwin-sdk-version.txt, this code copies it to a temporary path named darwin.artifactbundle; DarwinSDK.install then validates that renamed path with DarwinSDK(bundle:), whose extension fallback now only accepts darwin.xtoolsdk, so the install is rejected as invalid before SwiftPM can install an otherwise valid bundle. Use a temp .xtoolsdk name or make validation accept the temporary artifactbundle name as well.
Useful? React with 👍 / 👎.
A slightly different approach to #215.