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

Remove lazy #433

Merged
merged 1 commit into from
Aug 15, 2022
Merged

Remove lazy #433

merged 1 commit into from
Aug 15, 2022

Conversation

mattiamanzati
Copy link
Contributor

No description provided.

Copy link
Contributor

@IMax153 IMax153 left a comment

Choose a reason for hiding this comment

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

A few comments:

  • The code should be reviewed for places where Effect|Query.succeed was being used to convert a LazyArg to a value. These should be removed if the LazyArg was removed. I've tried to note these situations where I saw them.
  • The orElse*, orFail*, and generally any constructors that accept an error should probably remain lazy (as we have done in the core library)

packages/query/_src/Query/operations/fail.ts Show resolved Hide resolved
packages/query/_src/Query/operations/provideSomeLayer.ts Outdated Show resolved Hide resolved
packages/query/_src/Query/operations/runCache.ts Outdated Show resolved Hide resolved
packages/query/_src/Query/operations/provideLayer.ts Outdated Show resolved Hide resolved
packages/query/_src/Query/operations/fromRequest.ts Outdated Show resolved Hide resolved
packages/query/_src/Query/operations/cached.ts Outdated Show resolved Hide resolved
packages/query/_src/Query/operations/someOrElse.ts Outdated Show resolved Hide resolved
packages/query/_src/Query/operations/timeoutFail.ts Outdated Show resolved Hide resolved
packages/query/_src/Query/operations/timeoutFailCause.ts Outdated Show resolved Hide resolved
packages/query/_src/Query/operations/uncached.ts Outdated Show resolved Hide resolved
@mattiamanzati mattiamanzati requested a review from IMax153 August 15, 2022 17:17
@mattiamanzati
Copy link
Contributor Author

Thanks a lot for your comments! Helped me understood deeply why some where lazy and some non-lazy in core!
Ideally should have fixed all of them!

Copy link
Contributor

@IMax153 IMax153 left a comment

Choose a reason for hiding this comment

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

No problem at all 😃

The only thing left is to make sure that the version PR will get triggered. To do that, you can run the following command:

yarn changeset

and follow the prompts in your shell. I would suggest incrementing patch versions for now, since that's what we're doing in core until v1.0.0.

Additionally, I would suggest squashing all the commits in this PR into one commit locally (after running the changesets command above). This will ensure a nice clean update to the CHANGELOG can be made.

@IMax153 IMax153 merged commit 50faec2 into main Aug 15, 2022
@IMax153 IMax153 deleted the remove-lazy branch August 15, 2022 19:55
@github-actions github-actions bot mentioned this pull request Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants