vapor / sql-kit

*️⃣ Build SQL queries in Swift. Extensible, protocol-based design that supports DQL, DML, and DDL.
MIT License
244 stars 59 forks source link

Fix Swift compiler choosing wrong overload for SQLInsertBuilder.values(Encodable) #142

Closed gwynne closed 2 years ago

gwynne commented 2 years ago

Under certain specific circumstances, the Swift compiler will choose the wrong overload of SQLInsertBuilder.values(_:) for the variants that take Encodable (specifically when an explicit Array is used in a generic context). Since it's too late to fix the API (it's public now), adding @_disfavoredOverload works around the issue in what should be a backwards-compatible fashion.

VaporBot commented 2 years ago

These changes are now available in 3.13.1