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

Fix warnings when building tests on Swift 5.9.2 Linux #2610

Merged

Conversation

simonjbeaumont
Copy link
Contributor

@simonjbeaumont simonjbeaumont commented Dec 15, 2023

Motivation:

Since 5.9.2 was released the 5.9 docker tags started resolving to 5.9.2 automatically, which have caused our CI to fail because 5.9.2 includes a new warning, which is promoted to error in our CI.

Explicitly using 5.9.2 tag shows this, but not for 5.9.1:

docker run --rm -v $PWD:/code -w /code -it swift:5.9.1-jammy swift build --build-tests -Xswiftc -warnings-as-errors
Build complete! (24.22s)docker run --rm -v $PWD:/code -w /code -it swift:5.9.2-jammy swift build --build-tests -Xswiftc -warnings-as-errors
...
/code/Tests/NIOCoreTests/AsyncSequences/NIOAsyncWriterTests.swift:662:9: error: instance method 'wait' is unavailable from asynchronous contexts; Use await fulfillment(of:timeout:enforceOrder:) instead.; this is an error in Swift 6
        wait(for: expectations, timeout: seconds)
        ^
error: fatalError
[464/518] Linking NIOHTTP1Client

Modifications:

Lower compiler guard for test utility backport.

Result:

Works now with both versions:

docker run --rm -v $PWD:/code -w /code -it swift:5.9.1-jammy swift build --build-tests -Xswiftc -warnings-as-errors
...
Build complete! (36.65s)docker run --rm -v $PWD:/code -w /code -it swift:5.9.2-jammy swift build --build-tests -Xswiftc -warnings-as-errors
...
Build complete! (21.74s)

@simonjbeaumont simonjbeaumont marked this pull request as ready for review December 15, 2023 16:46
@simonjbeaumont simonjbeaumont changed the title Fix building tests on Swift 5.9.2 Linux Fix warnings when building tests on Swift 5.9.2 Linux Dec 15, 2023
@simonjbeaumont simonjbeaumont enabled auto-merge (squash) December 15, 2023 17:02
@weissi
Copy link
Member

weissi commented Dec 18, 2023

@swift-nio-bot please test

@weissi
Copy link
Member

weissi commented Dec 18, 2023

@swift-nio-bot test this please

@Lukasa
Copy link
Contributor

Lukasa commented Dec 19, 2023

@swift-server-bot test this please

@Lukasa Lukasa added the semver/none No version bump required. label Dec 19, 2023
@simonjbeaumont
Copy link
Contributor Author

//cc @dnadoba

@Lukasa
Copy link
Contributor

Lukasa commented Dec 19, 2023

Merging over failing CI, as this is blocking other fixes.

@Lukasa Lukasa disabled auto-merge December 19, 2023 16:34
@Lukasa Lukasa merged commit 4c77ef0 into apple:main Dec 19, 2023
3 of 8 checks passed
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.

4 participants