Skip to content
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

Replaced swiftLanguageVersions with swiftLanguageModes for Swift 6 onwards #8

Merged

Conversation

antoniostrijdom
Copy link
Contributor

This PR adds the swift_tools_version_major key to the Stencil context so that the stencil can determine whether the package description specifies Swift 6 or later so that it can export swiftLanguageModes instead of swiftLanguageVersions.

This is to handle SE-0441.

@@ -36,8 +35,8 @@ extension Spec.RemoteDependency {
extension Spec {
var swiftToolsVersionMajor: Int? {
guard let swiftToolsVersionString = swiftToolsVersion else { return nil }
if let swiftToolsVersion = try? Semver(string: swiftToolsVersionString) {
return Int(swiftToolsVersion.major)
if let majorString = swiftToolsVersionString.components(separatedBy: ".").first {
Copy link
Member

Choose a reason for hiding this comment

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

All we really need 👍

Copy link
Member

@albertodebortoli albertodebortoli left a comment

Choose a reason for hiding this comment

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

In this case, might be worth squashing & merging instead of just merging.

@albertodebortoli albertodebortoli merged commit f156353 into justeattakeaway:main Sep 30, 2024
2 checks passed
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