vapor / postgres-nio

🐘 Non-blocking, event-driven Swift client for PostgreSQL.
https://api.vapor.codes/postgresnio/documentation/postgresnio/
MIT License
322 stars 75 forks source link

Remove all warn-concurrency warnings #408

Closed fabianfett closed 11 months ago

fabianfett commented 1 year ago

Patch to remove all concurrency warnings.

codecov-commenter commented 1 year ago

Codecov Report

Merging #408 (8515d87) into main (abca6b3) will increase coverage by 0.00%. Report is 1 commits behind head on main. The diff coverage is 45.61%.

:exclamation: Current head 8515d87 differs from pull request most recent head a1e04ea. Consider uploading reports for the commit a1e04ea to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #408 +/- ## ======================================= Coverage 49.03% 49.04% ======================================= Files 108 108 Lines 8845 8874 +29 ======================================= + Hits 4337 4352 +15 - Misses 4508 4522 +14 ``` | [Files](https://app.codecov.io/gh/vapor/postgres-nio/pull/408?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor) | Coverage Ξ” | | |---|---|---| | [.../Connection/PostgresConnection+Configuration.swift](https://app.codecov.io/gh/vapor/postgres-nio/pull/408?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9Qb3N0Z3Jlc05JTy9Db25uZWN0aW9uL1Bvc3RncmVzQ29ubmVjdGlvbitDb25maWd1cmF0aW9uLnN3aWZ0) | `49.29% <ΓΈ> (ΓΈ)` | | | [...es/PostgresNIO/Message/PostgresMessage+Error.swift](https://app.codecov.io/gh/vapor/postgres-nio/pull/408?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9Qb3N0Z3Jlc05JTy9NZXNzYWdlL1Bvc3RncmVzTWVzc2FnZStFcnJvci5zd2lmdA==) | `0.00% <ΓΈ> (ΓΈ)` | | | [Sources/PostgresNIO/New/NotificationListener.swift](https://app.codecov.io/gh/vapor/postgres-nio/pull/408?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9Qb3N0Z3Jlc05JTy9OZXcvTm90aWZpY2F0aW9uTGlzdGVuZXIuc3dpZnQ=) | `74.22% <100.00%> (+0.26%)` | :arrow_up: | | [Sources/PostgresNIO/New/PSQLError.swift](https://app.codecov.io/gh/vapor/postgres-nio/pull/408?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9Qb3N0Z3Jlc05JTy9OZXcvUFNRTEVycm9yLnN3aWZ0) | `80.00% <ΓΈ> (ΓΈ)` | | | [Sources/PostgresNIO/New/PSQLRowStream.swift](https://app.codecov.io/gh/vapor/postgres-nio/pull/408?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9Qb3N0Z3Jlc05JTy9OZXcvUFNRTFJvd1N0cmVhbS5zd2lmdA==) | `86.00% <100.00%> (-0.05%)` | :arrow_down: | | [Sources/PostgresNIO/New/PSQLTask.swift](https://app.codecov.io/gh/vapor/postgres-nio/pull/408?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9Qb3N0Z3Jlc05JTy9OZXcvUFNRTFRhc2suc3dpZnQ=) | `78.12% <ΓΈ> (ΓΈ)` | | | [...urces/PostgresNIO/New/PostgresChannelHandler.swift](https://app.codecov.io/gh/vapor/postgres-nio/pull/408?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9Qb3N0Z3Jlc05JTy9OZXcvUG9zdGdyZXNDaGFubmVsSGFuZGxlci5zd2lmdA==) | `84.77% <100.00%> (+0.15%)` | :arrow_up: | | [Sources/PostgresNIO/New/PostgresCodable.swift](https://app.codecov.io/gh/vapor/postgres-nio/pull/408?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9Qb3N0Z3Jlc05JTy9OZXcvUG9zdGdyZXNDb2RhYmxlLnN3aWZ0) | `95.23% <ΓΈ> (ΓΈ)` | | | [Sources/PostgresNIO/PostgresDatabase.swift](https://app.codecov.io/gh/vapor/postgres-nio/pull/408?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9Qb3N0Z3Jlc05JTy9Qb3N0Z3Jlc0RhdGFiYXNlLnN3aWZ0) | `0.00% <ΓΈ> (ΓΈ)` | | | [...es/PostgresNIO/Utilities/PostgresJSONDecoder.swift](https://app.codecov.io/gh/vapor/postgres-nio/pull/408?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9Qb3N0Z3Jlc05JTy9VdGlsaXRpZXMvUG9zdGdyZXNKU09ORGVjb2Rlci5zd2lmdA==) | `50.00% <100.00%> (+50.00%)` | :arrow_up: | | ... and [5 more](https://app.codecov.io/gh/vapor/postgres-nio/pull/408?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor) | |
fabianfett commented 11 months ago

Those breaking changes are false positives:

15 breaking changes detected in PostgresNIO:
  πŸ’” API breakage: func PostgresConnection.query(_:logger:file:line:_:) is now with @preconcurrency
  πŸ’” API breakage: func PostgresConnection.withConnection(_:) is now with @preconcurrency
  πŸ’” API breakage: func PreparedQuery.execute(_:_:) is now with @preconcurrency
  πŸ’” API breakage: protocol PostgresDatabase has generic signature change from  to <Self : Swift.Sendable>
  πŸ’” API breakage: protocol PostgresDatabase is now with @preconcurrency
  πŸ’” API breakage: protocol PostgresDatabase has added inherited protocol Sendable
  πŸ’” API breakage: func PostgresDatabase.prepare(query:handler:) is now with @preconcurrency
  πŸ’” API breakage: func PostgresDatabase.query(_:_:onMetadata:onRow:) is now with @preconcurrency
  πŸ’” API breakage: func PostgresDatabase.simpleQuery(_:_:) is now with @preconcurrency
  πŸ’” API breakage: protocol PostgresJSONDecoder has generic signature change from  to <Self : Swift.Sendable>
  πŸ’” API breakage: protocol PostgresJSONDecoder is now with @preconcurrency
  πŸ’” API breakage: protocol PostgresJSONDecoder has added inherited protocol Sendable
  πŸ’” API breakage: protocol PostgresJSONEncoder has generic signature change from  to <Self : Swift.Sendable>
  πŸ’” API breakage: protocol PostgresJSONEncoder is now with @preconcurrency
  πŸ’” API breakage: protocol PostgresJSONEncoder has added inherited protocol Sendable