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

Update -swift-version to default to 6 for swift-tools-version 6 #7469

Merged
merged 1 commit into from May 10, 2024

Conversation

bnbarham
Copy link
Contributor

@bnbarham bnbarham commented Apr 18, 2024

We missed updating this when adding 6.0. The change itself is extremely
simple, with the bulk being updates to our tests so they don't fail on
old compiler versions (where language version "6" is unknown).

Also removes disabling the concurrency and string processing imports
from manifest loading, as this was causing the package global to not
be main actor isolated by default and thus error in Swift 6. They seemed
to have been disabled to avoid erroring in SDKs that didn't have them,
but that is definitely not an issue any longer.

@bnbarham
Copy link
Contributor Author

@swift-ci please test

@MaxDesiatov MaxDesiatov enabled auto-merge (squash) April 18, 2024 08:23
@MaxDesiatov
Copy link
Member

@swift-ci test

@MaxDesiatov
Copy link
Member

We need to update PackageDescription to make it compatible with Swift 6:

/home/build-user/swiftpm/Sources/PackageDescription/SupportedPlatforms.swift:55:23: error: static property 'linux' is not concurrency-safe because non-'Sendable' type 'Platform' may have shared mutable state
 53 | 
 54 |     /// The Linux platform.
 55 |     public static let linux: Platform = Platform(name: "linux")
    |                       |- error: static property 'linux' is not concurrency-safe because non-'Sendable' type 'Platform' may have shared mutable state
    |                       `- note: isolate 'linux' to a global actor, or conform 'Platform' to 'Sendable'
 56 | 
 57 |     /// The Windows platform.

@xedin
Copy link
Member

xedin commented Apr 18, 2024

@swift-ci please test

@MaxDesiatov
Copy link
Member

@swift-ci test

1 similar comment
@MaxDesiatov
Copy link
Member

@swift-ci test

@bnbarham bnbarham force-pushed the 6-when-tools-version-6 branch 2 times, most recently from d0a0efc to f5ee182 Compare April 19, 2024 21:10
@bnbarham
Copy link
Contributor Author

@swift-ci test

@MaxDesiatov MaxDesiatov added build system Changes to interactions with build systems test suite improvements to SwiftPM test suite dependencies Changes to dependencies and relevant checks labels Apr 23, 2024
@bnbarham
Copy link
Contributor Author

@swift-ci please test

@bnbarham
Copy link
Contributor Author

@swift-ci please test

@bnbarham bnbarham force-pushed the 6-when-tools-version-6 branch 2 times, most recently from 458abfd to 92b5601 Compare April 27, 2024 00:11
@bnbarham
Copy link
Contributor Author

@swift-ci please test

@bnbarham
Copy link
Contributor Author

@swift-ci please test

@bnbarham
Copy link
Contributor Author

@swift-ci please test

@bnbarham
Copy link
Contributor Author

@swift-ci please test

@bnbarham
Copy link
Contributor Author

bnbarham commented May 1, 2024

@swift-ci please test

@bnbarham bnbarham force-pushed the 6-when-tools-version-6 branch 2 times, most recently from be8cb20 to a0aeb79 Compare May 3, 2024 23:39
@bnbarham
Copy link
Contributor Author

bnbarham commented May 3, 2024

@swift-ci please test

@bnbarham
Copy link
Contributor Author

bnbarham commented May 4, 2024

@swift-ci please test

@bnbarham
Copy link
Contributor Author

bnbarham commented May 6, 2024

@swift-ci please test

@bnbarham
Copy link
Contributor Author

bnbarham commented May 6, 2024

@swift-ci please test

@bnbarham
Copy link
Contributor Author

bnbarham commented May 7, 2024

@swift-ci please test

@bnbarham
Copy link
Contributor Author

bnbarham commented May 7, 2024

@swift-ci please test

@bnbarham
Copy link
Contributor Author

bnbarham commented May 7, 2024

@swift-ci please test

@bnbarham
Copy link
Contributor Author

bnbarham commented May 7, 2024

@swift-ci please test Windows platform

@@ -34,5 +34,6 @@ let package = Package(
"MyPlugin2",
]
),
]
],
swiftLanguageVersions: [.v5]
Copy link
Member

Choose a reason for hiding this comment

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

Makes sense!

We missed updating this when adding 6.0. The change itself is extremely
simple, with the bulk being updates to our tests so they don't fail on
old compiler versions (where language version "6" is unknown).

Also removes disabling the concurrency and string processing imports
from manifest loading, as this was causing the `package` global to not
be main actor isolated by default and thus error in Swift 6. They seemed
to have been disabled to avoid erroring in SDKs that didn't have them,
but that is definitely not an issue any longer.
@bnbarham
Copy link
Contributor Author

bnbarham commented May 8, 2024

@swift-ci please test

@bnbarham
Copy link
Contributor Author

bnbarham commented May 8, 2024

@swift-ci please test Windows platform

@bnbarham
Copy link
Contributor Author

bnbarham commented May 8, 2024

@swift-ci please test Linux platform

@bnbarham bnbarham merged commit 213844c into apple:main May 10, 2024
5 checks passed
@bnbarham bnbarham deleted the 6-when-tools-version-6 branch May 10, 2024 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build system Changes to interactions with build systems dependencies Changes to dependencies and relevant checks test suite improvements to SwiftPM test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants