Skip to content

Conversation

thomasvl
Copy link
Collaborator

@thomasvl thomasvl commented Jan 6, 2025

No description provided.

Split the current `Package.swift` into versions files to remove conditionals
and support 5.8, 5.9, and 6.0 with 6 ensuring the language mode will be 6.
@thomasvl
Copy link
Collaborator Author

thomasvl commented Jan 6, 2025

Tried having only the 5.8 file that was like the old file, but 5.9 fails (https://github.com/apple/swift-protobuf/actions/runs/12640958090), I guess SwiftPM won't use a versioned file that is ≤ the current version still. 😦

@thomasvl thomasvl requested a review from Lukasa January 6, 2025 22:29
@thomasvl thomasvl changed the title Test swift6 mode Use Swift 6 mode on the plugin examples to ensure generated code compiles in this mode Jan 6, 2025
@FranzBusch
Copy link
Member

Tried having only the 5.8 file that was like the old file, but 5.9 fails (https://github.com/apple/swift-protobuf/actions/runs/12640958090), I guess SwiftPM won't use a versioned file that is ≤ the current version still. 😦

Yes you always have to specify one per version.

@thomasvl thomasvl marked this pull request as ready for review January 7, 2025 14:18
@thomasvl thomasvl merged commit 8d33562 into apple:main Jan 7, 2025
12 checks passed
@thomasvl thomasvl deleted the test_swift6_mode branch January 7, 2025 14:18
@thomasvl
Copy link
Collaborator Author

thomasvl commented Jan 7, 2025

Tried having only the 5.8 file that was like the old file, but 5.9 fails (https://github.com/apple/swift-protobuf/actions/runs/12640958090), I guess SwiftPM won't use a versioned file that is ≤ the current version still. 😦

Yes you always have to specify one per version.

I guess 5.10 does support falling back to older versions, I didn't have to provide a file specific to that version and things worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/none No version bump required.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants