Skip to content

Handle Swift versions unsupported by XCBuild #7499

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

neonichu
Copy link
Contributor

XCBuild has its own notion of supported Swift versions which can differ from the ones SwiftPM's own build system and the used compiler support. Using a version outside of the supported range prevents building, so we'll try to obtain the list of supported versions and intersect it with the versions supported by a given package to find the best version supported by both.

XCBuild has its own notion of supported Swift versions which can differ from the ones SwiftPM's own build system and the used compiler support. Using a version outside of the supported range prevents building, so we'll try to obtain the list of supported versions and intersect it with the versions supported by a given package to find the best version supported by both.
@neonichu neonichu self-assigned this Apr 25, 2024
@neonichu
Copy link
Contributor Author

@swift-ci please test

@@ -1451,21 +1572,46 @@ extension Target {
}
}

extension SwiftTarget {
func computeEffectiveSwiftVersion(supportedSwiftVersions: [SwiftLanguageVersion]) throws -> SwiftLanguageVersion {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is really the key change here.

@neonichu neonichu requested a review from ahoppen April 25, 2024 18:32
@neonichu neonichu merged commit 3f9587c into main Apr 25, 2024
@neonichu neonichu deleted the handle-swift-versions-unsupported-by-xcbuild branch April 25, 2024 22:04
furby-tm pushed a commit to wabiverse/swift-package-manager that referenced this pull request May 15, 2024
XCBuild has its own notion of supported Swift versions which can differ
from the ones SwiftPM's own build system and the used compiler support.
Using a version outside of the supported range prevents building, so
we'll try to obtain the list of supported versions and intersect it with
the versions supported by a given package to find the best version
supported by both.
furby-tm pushed a commit to wabiverse/swift-package-manager that referenced this pull request May 15, 2024
XCBuild has its own notion of supported Swift versions which can differ
from the ones SwiftPM's own build system and the used compiler support.
Using a version outside of the supported range prevents building, so
we'll try to obtain the list of supported versions and intersect it with
the versions supported by a given package to find the best version
supported by both.
furby-tm pushed a commit to wabiverse/swift-package-manager that referenced this pull request May 15, 2024
XCBuild has its own notion of supported Swift versions which can differ
from the ones SwiftPM's own build system and the used compiler support.
Using a version outside of the supported range prevents building, so
we'll try to obtain the list of supported versions and intersect it with
the versions supported by a given package to find the best version
supported by both.
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