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

Ready for Swift 6 false negatives #3233

Open
finestructure opened this issue Jul 20, 2024 · 3 comments
Open

Ready for Swift 6 false negatives #3233

finestructure opened this issue Jul 20, 2024 · 3 comments

Comments

@finestructure
Copy link
Member

finestructure commented Jul 20, 2024

The APNSwift package is reporting 1 Swift 6 error via Sema.NumSwift6Errors while the package itself does not show any concurrency warnings during compilation.

Test case:

git clone https://github.com/swift-server-community/APNSwift && cd APNSwift
git checkout 36fec7
mkdir .stats
env DEVELOPER_DIR=/Applications/Xcode-16.0.0-Beta.3.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete

Build log:

~/D/APNSwift on HEAD (36fec7e)
❯ env DEVELOPER_DIR=/Applications/Xcode-16.0.0-Beta.3.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete

Fetching https://github.com/apple/swift-nio-http2.git from cache
Fetching https://github.com/apple/swift-nio-ssl.git from cache
Fetching https://github.com/swift-server/async-http-client.git from cache
Fetching https://github.com/apple/swift-crypto.git from cache
Fetching https://github.com/apple/swift-log.git from cache
Fetching https://github.com/apple/swift-docc-plugin from cache
Fetching https://github.com/apple/swift-nio.git from cache
Fetched https://github.com/apple/swift-log.git from cache (1.15s)
Fetched https://github.com/apple/swift-docc-plugin from cache (1.21s)
Fetched https://github.com/apple/swift-nio-http2.git from cache (1.21s)
Fetched https://github.com/swift-server/async-http-client.git from cache (1.34s)
Fetched https://github.com/apple/swift-crypto.git from cache (1.47s)
Fetched https://github.com/apple/swift-nio-ssl.git from cache (1.48s)
Fetched https://github.com/apple/swift-nio.git from cache (1.54s)
Computing version for https://github.com/apple/swift-docc-plugin
Computed https://github.com/apple/swift-docc-plugin at 1.3.0 (0.02s)
Fetching https://github.com/apple/swift-docc-symbolkit from cache
Fetched https://github.com/apple/swift-docc-symbolkit from cache (1.40s)
Computing version for https://github.com/apple/swift-docc-symbolkit
Computed https://github.com/apple/swift-docc-symbolkit at 1.0.0 (0.02s)
Computing version for https://github.com/swift-server/async-http-client.git
Computed https://github.com/swift-server/async-http-client.git at 1.21.2 (0.02s)
Fetching https://github.com/apple/swift-atomics.git from cache
Fetching https://github.com/apple/swift-nio-transport-services.git from cache
Fetching https://github.com/apple/swift-algorithms from cache
Fetching https://github.com/apple/swift-nio-extras.git from cache
Fetched https://github.com/apple/swift-nio-transport-services.git from cache (1.02s)
Fetched https://github.com/apple/swift-atomics.git from cache (1.03s)
Fetched https://github.com/apple/swift-nio-extras.git from cache (1.06s)
Fetched https://github.com/apple/swift-algorithms from cache (1.09s)
Computing version for https://github.com/apple/swift-algorithms
Computed https://github.com/apple/swift-algorithms at 1.2.0 (0.02s)
Fetching https://github.com/apple/swift-numerics.git from cache
Fetched https://github.com/apple/swift-numerics.git from cache (1.01s)
Computing version for https://github.com/apple/swift-numerics.git
Computed https://github.com/apple/swift-numerics.git at 1.0.2 (0.02s)
Computing version for https://github.com/apple/swift-atomics.git
Computed https://github.com/apple/swift-atomics.git at 1.2.0 (0.02s)
Computing version for https://github.com/apple/swift-nio-transport-services.git
Computed https://github.com/apple/swift-nio-transport-services.git at 1.21.0 (0.01s)
Computing version for https://github.com/apple/swift-nio.git
Computed https://github.com/apple/swift-nio.git at 2.68.0 (0.02s)
Fetching https://github.com/apple/swift-collections.git from cache
Fetching https://github.com/apple/swift-system.git from cache
Fetched https://github.com/apple/swift-system.git from cache (0.96s)
Fetched https://github.com/apple/swift-collections.git from cache (1.02s)
Computing version for https://github.com/apple/swift-system.git
Computed https://github.com/apple/swift-system.git at 1.3.1 (0.01s)
Computing version for https://github.com/apple/swift-nio-ssl.git
Computed https://github.com/apple/swift-nio-ssl.git at 2.27.0 (0.02s)
Computing version for https://github.com/apple/swift-log.git
Computed https://github.com/apple/swift-log.git at 1.6.1 (0.01s)
Computing version for https://github.com/apple/swift-collections.git
Computed https://github.com/apple/swift-collections.git at 1.1.2 (0.01s)
Computing version for https://github.com/apple/swift-nio-extras.git
Computed https://github.com/apple/swift-nio-extras.git at 1.23.0 (0.01s)
Fetching https://github.com/apple/swift-http-types from cache
Fetched https://github.com/apple/swift-http-types from cache (0.74s)
Computing version for https://github.com/apple/swift-http-types
Computed https://github.com/apple/swift-http-types at 1.3.0 (0.01s)
Computing version for https://github.com/apple/swift-nio-http2.git
Computed https://github.com/apple/swift-nio-http2.git at 1.33.0 (0.02s)
Computing version for https://github.com/apple/swift-crypto.git
Computed https://github.com/apple/swift-crypto.git at 3.5.2 (0.02s)
Creating working copy for https://github.com/apple/swift-nio-ssl.git
Working copy of https://github.com/apple/swift-nio-ssl.git resolved at 2.27.0
warning: /Users/sas/Downloads/APNSwift/.build/repositories/swift-numerics-d936ec6c is not valid git repository for 'https://github.com/apple/swift-numerics.git', will fetch again.
Fetching https://github.com/apple/swift-numerics.git from cache
Fetched https://github.com/apple/swift-numerics.git from cache (0.06s)
warning: /Users/sas/Downloads/APNSwift/.build/repositories/swift-numerics-d936ec6c is not valid git repository for 'https://github.com/apple/swift-numerics.git', will fetch again.
Fetching https://github.com/apple/swift-numerics.git from cache
Fetched https://github.com/apple/swift-numerics.git from cache (0.06s)
Creating working copy for https://github.com/apple/swift-numerics.git
Working copy of https://github.com/apple/swift-numerics.git resolved at 1.0.2
Creating working copy for https://github.com/apple/swift-crypto.git
Working copy of https://github.com/apple/swift-crypto.git resolved at 3.5.2
Creating working copy for https://github.com/apple/swift-system.git
Working copy of https://github.com/apple/swift-system.git resolved at 1.3.1
warning: /Users/sas/Downloads/APNSwift/.build/repositories/swift-algorithms-bf5a01cd is not valid git repository for 'https://github.com/apple/swift-algorithms', will fetch again.
Fetching https://github.com/apple/swift-algorithms from cache
Fetched https://github.com/apple/swift-algorithms from cache (0.09s)
warning: /Users/sas/Downloads/APNSwift/.build/repositories/swift-algorithms-bf5a01cd is not valid git repository for 'https://github.com/apple/swift-algorithms', will fetch again.
Fetching https://github.com/apple/swift-algorithms from cache
Fetched https://github.com/apple/swift-algorithms from cache (0.08s)
Creating working copy for https://github.com/apple/swift-algorithms
Working copy of https://github.com/apple/swift-algorithms resolved at 1.2.0
Creating working copy for https://github.com/apple/swift-nio.git
Working copy of https://github.com/apple/swift-nio.git resolved at 2.68.0
Creating working copy for https://github.com/apple/swift-atomics.git
Working copy of https://github.com/apple/swift-atomics.git resolved at 1.2.0
Creating working copy for https://github.com/apple/swift-log.git
Working copy of https://github.com/apple/swift-log.git resolved at 1.6.1
Creating working copy for https://github.com/swift-server/async-http-client.git
Working copy of https://github.com/swift-server/async-http-client.git resolved at 1.21.2
Creating working copy for https://github.com/apple/swift-nio-http2.git
Working copy of https://github.com/apple/swift-nio-http2.git resolved at 1.33.0
Creating working copy for https://github.com/apple/swift-nio-transport-services.git
Working copy of https://github.com/apple/swift-nio-transport-services.git resolved at 1.21.0
Creating working copy for https://github.com/apple/swift-nio-extras.git
Working copy of https://github.com/apple/swift-nio-extras.git resolved at 1.23.0
Creating working copy for https://github.com/apple/swift-docc-symbolkit
Working copy of https://github.com/apple/swift-docc-symbolkit resolved at 1.0.0
Creating working copy for https://github.com/apple/swift-docc-plugin
Working copy of https://github.com/apple/swift-docc-plugin resolved at 1.3.0
Creating working copy for https://github.com/apple/swift-collections.git
Working copy of https://github.com/apple/swift-collections.git resolved at 1.1.2
Creating working copy for https://github.com/apple/swift-http-types
Working copy of https://github.com/apple/swift-http-types resolved at 1.3.0
warning: 'swift-algorithms': found 1 file(s) which are unhandled; explicitly declare them as resources or exclude from the target
    /Users/sas/Downloads/APNSwift/.build/checkouts/swift-algorithms/Sources/Algorithms/Documentation.docc
warning: 'swift-nio-ssl': found 1 file(s) which are unhandled; explicitly declare them as resources or exclude from the target
    /Users/sas/Downloads/APNSwift/.build/checkouts/swift-nio-ssl/Sources/NIOSSL/PrivacyInfo.xcprivacy
Building for debugging...
[1115/1115] Applying APNSExample
Build complete! (235.40s)

Error count:

❯ grep Sema.NumSwift6Errors .stats/stats-*-swift-frontend-APNS-all-arm64_apple_macosx13.0-swiftmodule-Onone-*.json
	"Sema.NumSwift6Errors": 1,
@finestructure
Copy link
Member Author

finestructure commented Aug 29, 2024

Another package that's affected is https://github.com/vapor/jwt-kit (Xcode 16b6)

@Joannis
Copy link

Joannis commented Aug 29, 2024

Hummingbird 2 seems to be affected as well

@finestructure
Copy link
Member Author

@finestructure finestructure changed the title Sema.NumSwift6Errors discrepancy Ready for Swift 6 false negatives Oct 7, 2024
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

No branches or pull requests

2 participants