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

fix: await remote even when instance is present in memory cache #358

Merged
merged 1 commit into from
Jul 10, 2023

Conversation

tshedor
Copy link
Collaborator

@tshedor tshedor commented Jul 10, 2023

No description provided.

@tshedor tshedor changed the title fix: await remote even when instance present in memory cache fix: await remote even when instance is present in memory cache Jul 10, 2023
* Apply standardized lints
* Respect `awaitRemote` policy for `OfflineFirstRepository#get` - fixes a bug where an instance in memory cache would early-return before hitting remote despite the requested `await` or `alwaysHydrate` policy
Copy link
Collaborator

Choose a reason for hiding this comment

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

i feel like i can point to this for bugs we looked at years ago in GB register

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah for sure

Comment on lines +187 to +188
// ignore: unawaited_futures
hydrate<TModel>(query: query, deserializeSqlite: !seedOnly);
Copy link
Collaborator

Choose a reason for hiding this comment

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

do you prefer this lint ignore to wrapping in unawaited?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Well...I genuinely don't know the difference. What would you favor?

Copy link
Collaborator

Choose a reason for hiding this comment

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

there isn't; it's stylistic. but i think unawaited brings the decision into code and out of comments which i generally like

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok yeah that's a great point

@tshedor tshedor merged commit de8c83e into main Jul 10, 2023
2 checks passed
@tshedor tshedor deleted the await-remote-policy-get branch July 10, 2023 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants