-
-
Notifications
You must be signed in to change notification settings - Fork 92
Description
Describe the issue
As the API has evolved, there's a slight mismatch between the parameter name in the protocol and what's used in some of the conforming types
Vapor version
4.119.2
Operating system and version
macOS 16.4
Swift version
Swift Package Manager - Swift 6.3.0
Steps to reproduce
swift package add-dependency https://github.com/swiftlang/swift-docc-plugin --from 1.1.0swift package generate-documentation --target PostgresNIO
Outcome
No response
Additional notes
While I was making fixes to spelling and resolving DocC warnings (#628), a few couldn't be resolved due to a mismatch in protocol and conforming types. I wasn't sure which was a preferable solution, so opening this bug to inquire
The protocol PostgresDecodable and its PostgresRange conformance declare the parameter as from byteBuffer:, but all other conforming types (Bool, String, UUID, Int, Float, Double, Date, Data, ByteBuffer, Array, Decimal, ClosedRange, Range, RawRepresentable) use from buffer:. The doc comment now documents buffer, so the 2 remaining declarations generate warnings because their code doesn't match.
A suggested fix I found was to rename byteBuffer to buffer in these two locations:
- Sources/PostgresNIO/New/PostgresCodable.swift:85 β the protocol requirement
- Sources/PostgresNIO/New/Data/Range+PostgresCodable.swift:102 β the PostgresRange conformance (which also references byteBuffer throughout its method body)
Happy to propose a PR with the change, but wanted to ask before I did such a thing, potentially causing a fuss with other places I can't see, just to resolve from DocC warnings.