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

Remove all warn-concurrency warnings #408

Merged
merged 9 commits into from
Oct 30, 2023

Conversation

fabianfett
Copy link
Collaborator

Patch to remove all concurrency warnings.

Comment on lines +24 to 25
//@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 9.0, *)
extension JSONDecoder: PostgresJSONDecoder {}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This creates a nasty warning in macOS:

Conformance of 'JSONDecoder' to 'Sendable' is only available in macOS 13.0 or newer

@codecov-commenter
Copy link

codecov-commenter commented Sep 1, 2023

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%.

❗ 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
@@           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 Coverage Δ
.../Connection/PostgresConnection+Configuration.swift 49.29% <ø> (ø)
...es/PostgresNIO/Message/PostgresMessage+Error.swift 0.00% <ø> (ø)
Sources/PostgresNIO/New/NotificationListener.swift 74.22% <100.00%> (+0.26%) ⬆️
Sources/PostgresNIO/New/PSQLError.swift 80.00% <ø> (ø)
Sources/PostgresNIO/New/PSQLRowStream.swift 86.00% <100.00%> (-0.05%) ⬇️
Sources/PostgresNIO/New/PSQLTask.swift 78.12% <ø> (ø)
...urces/PostgresNIO/New/PostgresChannelHandler.swift 84.77% <100.00%> (+0.15%) ⬆️
Sources/PostgresNIO/New/PostgresCodable.swift 95.23% <ø> (ø)
Sources/PostgresNIO/PostgresDatabase.swift 0.00% <ø> (ø)
...es/PostgresNIO/Utilities/PostgresJSONDecoder.swift 50.00% <100.00%> (+50.00%) ⬆️
... and 5 more

@fabianfett fabianfett marked this pull request as ready for review October 30, 2023 12:41
@fabianfett
Copy link
Collaborator Author

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

@fabianfett fabianfett requested a review from gwynne October 30, 2023 12:42
@fabianfett fabianfett added the semver-minor Adds new public API. label Oct 30, 2023
@fabianfett fabianfett merged commit 21473f5 into vapor:main Oct 30, 2023
@fabianfett fabianfett deleted the ff-warn-concurrency branch October 30, 2023 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-minor Adds new public API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants