Skip to content
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

Refactor of ClientOptions #348

Merged
merged 8 commits into from Mar 22, 2022
Merged

Refactor of ClientOptions #348

merged 8 commits into from Mar 22, 2022

Conversation

ikurek
Copy link
Contributor

@ikurek ikurek commented Mar 18, 2022

This is a part of #61, including changes only for ClientOptions and AuthOptions, without moving the fields as private. Main changes:

  • Updated constructor of AuthOptions and ClientOptions to use named parameters
  • Deprecated fromKey methods, since the object can be now created with constructor invocation
  • Refactored all places where ClientOptions was created with public parameter setters

Although this PR is fairly large, most of the changes were done in integration testing, and none of the changes are breaking in any way - users should be able to migrate without any issues. Moving the variables as private is a breaking change, so I decided to implement this later, in a separate PR, to give users some more time to adopt these changes before we deprecate the public fields

@ikurek ikurek added the enhancement New feature or improved functionality. label Mar 18, 2022
@ikurek ikurek self-assigned this Mar 18, 2022
@github-actions github-actions bot temporarily deployed to staging/pull/348/dartdoc March 18, 2022 12:28 Inactive
Copy link

@KacperKluka KacperKluka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall everything looks good but I think that one thing is missing - update in the README and Ably docs 😉 Since we've deprecated the fromKey I believe we shouldn't suggest it in our usage guides.

I took a quick look and found at least 3 places (but there may be more) in which we're using the deprecated fromKey approach:

@ikurek
Copy link
Contributor Author

ikurek commented Mar 21, 2022

Overall everything looks good but I think that one thing is missing - update in the README and Ably docs 😉 Since we've deprecated the fromKey I believe we shouldn't suggest it in our usage guides.

Good catch! I forgot about README, I'm going to update it in a while, but I'm not sure about the docs and quickstart guide - I've checked the spec before this refactor and there's no reference to fromKey in the spec itself, so I'm not sure if we should include it in quickstart guide?

You're correct with pub.dev descriptions, it's generated from the readme file 🙂

I've fixed these references in 8a7666d

@ikurek ikurek requested a review from KacperKluka March 21, 2022 12:04
@github-actions github-actions bot temporarily deployed to staging/pull/348/dartdoc March 21, 2022 12:06 Inactive
Copy link

@KacperKluka KacperKluka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now, thanks 😉 The only thing left is the fromKey() reference in the Ably docs but this is outside of this PR scope, as the change should probably be made after this PR is released in a new ably-flutter version 🤔

Copy link
Contributor

@QuintinWillison QuintinWillison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, albeit admitting I have skim read much of the contents.

CHANGELOG.md Outdated Show resolved Hide resolved
@ikurek ikurek merged commit d005726 into main Mar 22, 2022
@ikurek ikurek deleted the refactor/named-constructors branch March 22, 2022 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improved functionality.
Development

Successfully merging this pull request may close these issues.

None yet

3 participants