Skip to content

Fix clang headers - #228

Merged
kabiroberai merged 2 commits into
mainfrom
clang-fix
May 28, 2026
Merged

kabiroberai merged 2 commits into
mainfrom
clang-fix

Conversation

@kabiroberai

@kabiroberai kabiroberai commented May 25, 2026 •

Copy link
Copy Markdown
Member

A slightly different approach to #215.

Co-authored-by: sfusco <[email protected]>
@kabiroberai
kabiroberai marked this pull request as ready for review May 28, 2026 05:43
@kabiroberai
kabiroberai merged commit 9c4772d into main May 28, 2026
8 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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" {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

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