You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sdk: enable cross-import overlays with SwiftBuild - #361
Fixes#360 cross-import overlays on Linux for builds with swift 6.4+.
This PR adds "-Xfrontend", "-enable-cross-import-overlays" to toolchan-swb.json as it was added to toolchan.json.
Also bumps sdkEpoch so SDK will rebuild after update.
How was it tested?
Build was tested locally with branch built from sources.
xtool new example, then replace the app file
Fix was tested on this example:
import SwiftUI
import PhotosUI
@mainstructexampleApp:App{@Stateprivatevaritem:PhotosPickerItem?varbody:someScene{WindowGroup{PhotosPicker("Pick a photo", selection: $item)}}}
It fails on version 1.22.2, but builds normally when xtool built from this branch.
AI tool usage
How much of this PR was AI-assisted? (check one)
0 - No AI was used to write code
1 - I was assisted by AI. I reviewed the finished result.
2 - I set the AI going and left it to it; nobody has read the result - no review, or AI review only
Summary by CodeRabbit
Configuration Updates
Generated Swift toolchain settings no longer explicitly select the LLD linker. Existing frontend and cross-import overlay options remain unchanged. This affects linker selection for generated toolsets; no public API changes are included.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: f320f1e4-628a-433f-b00a-138e68c3b520
📥 Commits
Reviewing files that changed from the base of the PR and between 316a11e and a9fea47.
📒 Files selected for processing: 1
Sources/XToolSupport/SDKBuilder.swift
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
The SDK epoch increases from 3 to 4. The generated toolset-swb.json no longer includes -use-ld=lld; it retains -Xfrontend and -enable-cross-import-overlays.
Changes: Swift build toolset
Layer / File(s)
Summary
SDK epoch and compiler options Sources/XToolSupport/SDKBuilder.swift
The SDK epoch changes from 3 to 4. The generated toolset removes -use-ld=lld and retains -Xfrontend and -enable-cross-import-overlays.
The updated SwiftBuild toolset enables cross-import overlays for supported Swift 6.4+ builds, addressing the reported Linux import failure. No actionable merge blocker is evident.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly and concisely identifies the main change: enabling cross-import overlays with SwiftBuild. It matches the pull request objectives and the changeset.
Linked Issues check
Issue #360 requires the SwiftBuild SDK toolset to enable cross-import overlays for Swift 6.4+. SDKBuilder.buildSDK() now writes -Xfrontend and -enable-cross-import-overlays to toolset-swb.json…
Out of Scope Changes check
The whole-PR diff changes only Sources/XToolSupport/SDKBuilder.swift. Both changes support issue #360: the compiler options fix the SwiftBuild configuration, and the epoch change refreshes generated…
Full details: Linked Issues check
Explanation
Issue #360 requires the SwiftBuild SDK toolset to enable cross-import overlays for Swift 6.4+. SDKBuilder.buildSDK() now writes -Xfrontend and -enable-cross-import-overlays to toolset-swb.json. The change also increments sdkEpoch from 3 to 4, which causes the SDK to rebuild. The reported PhotosUI and SwiftUI reproduction passed with the branch build.
Full details: Out of Scope Changes check
Explanation
The whole-PR diff changes only Sources/XToolSupport/SDKBuilder.swift. Both changes support issue #360: the compiler options fix the SwiftBuild configuration, and the epoch change refreshes generated SDKs. No unrelated implementation or test changes are present.
✨ Finishing Touches
🧪 Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Maybe you also want to add -use-ld=lld to the toolchain-swb.json
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes #360 cross-import overlays on Linux for builds with swift 6.4+.
This PR adds "-Xfrontend", "-enable-cross-import-overlays" to
toolchan-swb.jsonas it was added totoolchan.json.Also bumps sdkEpoch so SDK will rebuild after update.
How was it tested?
Build was tested locally with branch built from sources.
xtool new example, then replace the app fileFix was tested on this example:
It fails on version 1.22.2, but builds normally when xtool built from this branch.
AI tool usage
How much of this PR was AI-assisted? (check one)
Summary by CodeRabbit