swift-async-algorithms icon indicating copy to clipboard operation
swift-async-algorithms copied to clipboard

Warnings when flag `-warn-concurrency` is enabled for `AsyncAlgorithms`

Open Sajjon opened this issue 3 years ago • 1 comments

If I add warn-concurrency and enable-actor-data-race-check as swiftSettings for AsyncAlgorithms target I get some warnings. This is on macOS Ventura (13.0 Beta (22A5331f)) and using Xcode 14.0 beta 5 (14A5294e).

  .unsafeFlags([
           "-Xfrontend", "-warn-concurrency",
           "-Xfrontend", "-enable-actor-data-race-checks",
     ])
Screenshot 2022-09-10 at 22 42 53

It feels like such a serious and great project like this ought to lead the way in terms of correctness of structured concurrency, so I expect:

  1. These flags to be enabled
  2. Packages, or at least the public one AsyncAlgorithms to not have any concurrency warnings.

Sajjon avatar Sep 10 '22 20:09 Sajjon

Thanks for opening this! I agree that we should fix all the warnings. I opened a PR that changes the debounce implementation which also fixes the debounce specific warnings: https://github.com/apple/swift-async-algorithms/pull/198

FranzBusch avatar Sep 11 '22 17:09 FranzBusch

we kinda need a way to add these flags without requiring them for normal builds (since iirc that poses issues to other libraries linking swift packages)

phausler avatar Dec 16 '22 18:12 phausler

I am going to close this issue because we enabled the flags and are warning free in the main package. However, we are not warning free in the validation tests which we have to tackle separately.

FranzBusch avatar Sep 21 '23 08:09 FranzBusch

Thanks for the update!

Sajjon avatar Sep 21 '23 09:09 Sajjon