vapor / postgres-nio

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

Fix warnings #454

Closed fabianfett closed 4 months ago

fabianfett commented 4 months ago

Fix warnings:

  1. Use non deprecated NIOThrowingAsyncSequenceProducer factory method
  2. Remove UInt8's conformance to ExpressibleByUnicodeScalarLiteral
  3. Fix @retroactive conformance issues in test by fully specifying all types
codecov-commenter commented 4 months ago

Codecov Report

Attention: 23 lines in your changes are missing coverage. Please review.

Comparison is base (69ccfdf) 62.28% compared to head (35f5192) 62.27%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #454 +/- ## ========================================== - Coverage 62.28% 62.27% -0.01% ========================================== Files 124 124 Lines 9937 9936 -1 ========================================== - Hits 6189 6188 -1 Misses 3748 3748 ``` | [Files](https://app.codecov.io/gh/vapor/postgres-nio/pull/454?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor) | Coverage Δ | | |---|---|---| | [Sources/PostgresNIO/New/PSQLRowStream.swift](https://app.codecov.io/gh/vapor/postgres-nio/pull/454?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9Qb3N0Z3Jlc05JTy9OZXcvUFNRTFJvd1N0cmVhbS5zd2lmdA==) | `86.37% <100.00%> (+0.04%)` | :arrow_up: | | [...IO/Utilities/SASLAuthentication+SCRAM-SHA256.swift](https://app.codecov.io/gh/vapor/postgres-nio/pull/454?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9Qb3N0Z3Jlc05JTy9VdGlsaXRpZXMvU0FTTEF1dGhlbnRpY2F0aW9uK1NDUkFNLVNIQTI1Ni5zd2lmdA==) | `47.20% <54.90%> (-0.29%)` | :arrow_down: |
fabianfett commented 4 months ago

Breaking changes:

3 breaking changes detected in PostgresNIO:
  💔 API breakage: extension UInt8 has removed conformance to ExpressibleByUnicodeScalarLiteral
  💔 API breakage: constructor UInt8.init(unicodeScalarLiteral:) has been removed
  💔 API breakage: typealias UInt8.UnicodeScalarLiteralType has been removed

While those are actual breaking changes, it was 100% wrong that this is part of our public API and noone should have ever relied on this! @gwynne are you fine with deciding that this doesn't require a major version?

gwynne commented 4 months ago

@fabianfett The API breakage checker is more trouble than it's worth most of the time, the false positive rate is astronomical.

fabianfett commented 4 months ago

@gwynne this is not a false positive! We are really removing public API here.