Skip to content

remove support for versions of Swift <= 5.6 #49

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 5 commits into from
May 24, 2024

Conversation

sebsto
Copy link
Contributor

@sebsto sebsto commented May 23, 2024

fix #31

@sebsto
Copy link
Contributor Author

sebsto commented May 23, 2024

@adam-fowler can you review ?

Copy link
Member

@adam-fowler adam-fowler left a comment

Choose a reason for hiding this comment

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

@sebsto Is there any difference between any of the Package.swift files?
Perhaps we can collapse this down to one Package.swift.

Also might be worthwhile dropping 5.7 to be consistent with all the other swift server packages which only support the last three releases of swift

@sebsto
Copy link
Contributor Author

sebsto commented May 23, 2024

@adam-fowler It's just the first line that sets the minimum required version for the toolchain.

Aren't these necessary if someone tries to compile with a specific toolchain ?

What would be the alternative ?
Have only one Package.swift with the minimum version we support, like

// swift-tools-version:5.7

What is the best practice to follow ?

@adam-fowler
Copy link
Member

If there are no other differences a single Package.swift with // swift-tools-version:5.7 would be fine. It basically implies the minimum swift version we accept.

But as I said it may be worthwhile setting the minimum to 5.8. This would allows us to setting strict concurrency flags as well.

@sebsto
Copy link
Contributor Author

sebsto commented May 23, 2024

@adam-fowler what about now ?

I'll create another PR to add

swiftSettings: [.enableExperimentalFeature("StrictConcurrency")]

Because it requires additional changes in the code

@adam-fowler
Copy link
Member

We'll need to remove the 5.7 CI. @yim-lee can you help here please

@sebsto
Copy link
Contributor Author

sebsto commented May 23, 2024

@adam-fowler should I wait for the CI to be updated to merge ?

@adam-fowler
Copy link
Member

@adam-fowler should I wait for the CI to be updated to merge ?

Any idea what is happening with the examples CI?

@sebsto
Copy link
Contributor Author

sebsto commented May 23, 2024

What are the examples CI ?

@adam-fowler
Copy link
Member

What are the examples CI ?

I don't know but at the moment it is failing. It's called pull request validation (examples). It looks like it is dependent on 5.7 docker image. Should probably be 5.10. I cannot find where this is setup though

@sebsto
Copy link
Contributor Author

sebsto commented May 23, 2024

The example's Package.swift is quite outdated as well. Not sure if this is what causes the pull request validation (examples) to fail. But I will add a commit to update the example project

@sebsto
Copy link
Contributor Author

sebsto commented May 23, 2024

@swift-server-bot test this please

@sebsto
Copy link
Contributor Author

sebsto commented May 23, 2024

@yim-lee Can you also update the pull request validation (examples) CI to use Swift 5.10 docker files ?
Right now, it seems to use 5.7

17:41:15 + docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.al2.57.yaml -p swift-aws-lambda-events-samples-prb build --pull
17:41:16 .FileNotFoundError: [Errno 2] No such file or directory: './docker/docker-compose.al2.57.yaml'

Thank you

@yim-lee
Copy link
Contributor

yim-lee commented May 23, 2024

Deleted CI for Swift 5.7. Updated examples CI to use Swift 5.10.

@swift-server-bot test this please

@sebsto
Copy link
Contributor Author

sebsto commented May 23, 2024

@yim-lee Thank you for the update.
Any idea why 5.7 is failing ? We can't access the server logs :-(
image

@yim-lee
Copy link
Contributor

yim-lee commented May 23, 2024

@sebsto The 5.7 pipeline has been deleted, so it doesn't get run anymore. The failure you see on this page is previous result, but because we don't run that pipeline anymore the status won't get updated.

Someone with admin permissions will need to update branch rules in this repo's settings to remove old Swift versions and make new ones required.

@sebsto
Copy link
Contributor Author

sebsto commented May 23, 2024

Looks like I have permissions to do that.
I removed 5.7 and added 5.8 as required check

@swift-server-bot test this please

@sebsto sebsto requested a review from adam-fowler May 23, 2024 17:28
@sebsto
Copy link
Contributor Author

sebsto commented May 24, 2024

@adam-fowler a last check before merging ? Thank you

Copy link
Member

@adam-fowler adam-fowler left a comment

Choose a reason for hiding this comment

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

LGTM
StructConcurrency setting should really be .enableExperimentalFeature("StrictConcurrency=complete") though.

@sebsto sebsto merged commit 5de630d into swift-server:main May 24, 2024
5 checks passed
@sebsto sebsto deleted the sebsto/bump_swift_version branch May 24, 2024 09:17
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.

Should Package@swift-5.4.swift and 5.5 be removed?
3 participants