vapor / postgres-nio

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

Use computed property to PostgresConnection.Configuration.TLS.disable for concurrency safe #376

Closed sidepelican closed 1 year ago

sidepelican commented 1 year ago

PostgresConnection.Configuration.TLS.disable is declared as var but it causes compiler warning on strict concurrency checking.

cocurrency error

This value seems to not to be modified in runtime. So this should be changed to let.

MahdiBM commented 1 year ago

This is a breaking change but it does seem to me that the property was supposed to be a computed property not stored.

I personally don't mind letting it slide although it's a breaking change, because it isn't supposed to be used like that anyway.

MahdiBM commented 1 year ago

@gwynne beat me to it while i was typing on phone 😅

gwynne commented 1 year ago

It is technically a breaking change, but in this case the likelihood of someone having an actual source-compatibility issue is very low, and would have required doing something that was fairly obviously unintended.