-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
Use computed property to PostgresConnection.Configuration.TLS.disable for concurrency safe #376
Conversation
Sources/PostgresNIO/Connection/PostgresConnection+Configuration.swift
Outdated
Show resolved
Hide resolved
…n.swift Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>
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. |
@gwynne beat me to it while i was typing on phone 😅 |
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sidepelican Thanks for uncovering this! Really appreciated!
I'm aware that this is technically a breaking change. However, if someone actually used the set on this property, they are likely in much more trouble. For this reason, I'm fine with breaking API in a non major release.
PostgresConnection.Configuration.TLS.disable
is declared asvar
but it causes compiler warning on strict concurrency checking.This value seems to not to be modified in runtime.
So this should be changed to
let
.