-
Notifications
You must be signed in to change notification settings - Fork 10.5k
False positives reported in Sema.NumSwift6Errors
via -stats-output-dir
#79291
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
Comments
Here's another test case with 9 Swift 6 errors reported via
|
I'll chime in not because I think I can help in this specific issue, but because I want to remind that Swift 6 is very sensitive to nuances in the concurrency annotations of the language toolchain (compiler, stdlib, Foundation, Dispatch, other Core Libs). Two different toolchains can have very different behavior. We have this issue here, which is not cool because the Swift Package Index pretends our packages have issues they do not (see image below). We also have issues in the Swift Source Compatibility Suite, where a pull request that submits GRDB for Swift 6 compatibility checking is blocked because nightly toolchains have regressions (exactly the reason why this PR should be merged): swiftlang/swift-source-compat-suite#964). Everyone is confused, we lose a lot of energy, and a lot of wrong messages are sent. ![]() (The incorrect support for iOS, visionOS, etc is due to another bug - but, well, bugs pile up, and those all say something wrong about reasonably maintained projects.) |
@xedin is looking into this and confirmed that the problem is that data-race safety issues that are suppressed by |
…t6Errors` statistic Since the diagnostic is not going to be emitted counting it in `Swift6Errors` statistics is going to be confusing to the users. Resolves: swiftlang#79291 Resolves: rdar://145341605
…t6Errors` statistic Since the diagnostic is not going to be emitted counting it in `Swift6Errors` statistics is going to be confusing to the users. Resolves: swiftlang#79291 Resolves: rdar://145341605 (cherry picked from commit 664c119)
Description
As part of the Swift Package Index' "Ready for Swift 6" project we've been building packages in Swift 5 language mode with complete concurrency checking enabled and reporting the number of Swift 6 errors via
Sema.NumSwift6Errors
in the stats output.We've since received a number of user reports where our reported numbers disagreed with their observed error counts. They are typically observing no or fewer errors than we are reporting. (No one is complaining about getting more errors than reported, alas 😅)
We've been tracking these reports here: SwiftPackageIndex/SwiftPackageIndex-Server#3233
cc @hborla
Reproduction
Build log:
Expected behavior
The Swift 6 error count should be 0.
Environment
Xcode Version 16.2 (16C5032a), macOS 15.3
Additional information
No response
The text was updated successfully, but these errors were encountered: