-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[Collections] Auth tokens need to be mutable #3443
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
Conversation
@swift-ci please smoke test |
@@ -67,6 +67,14 @@ public struct PackageCollections: PackageCollectionsProtocol { | |||
} | |||
} | |||
|
|||
public mutating func updateAuthTokens(_ authTokens: [AuthTokenType: String]?) { |
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.
Not my favorite approach. Open to other options. I don't think the API should be added to PackageCollectionsProtocol
though.
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.
what about a setter for either authTokens or making configuration public?
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.
also another approach is to define Configuration::authToken to take a function that is called to retrieve the auth values
var authTokens = () -> [AuthTokenType: String]?
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.
also another approach is to define Configuration::authToken to take a function
I like this. Thanks. Changed impl to this instead. bb67334
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.
The approach in bb67334 is a breaking change though, so my original approach might be safer... 🤔
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.
I think its okay to break at this point if we think its the right API, we just need to coordinate landing it cc @neonichu
495cf4b
to
bb67334
Compare
@swift-ci please smoke test |
1 similar comment
@swift-ci please smoke test |
@swift-ci please smoke test macOS |
bb67334
to
c27410e
Compare
Rebased. @swift-ci please smoke test. |
* [Collections] Auth tokens need to be mutable rdar://77095793 * Change authTokens to be a function instead
* [Collections] Auth tokens need to be mutable rdar://77095793 * Change authTokens to be a function instead
rdar://77095793