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(store): reorder core table registration #2164

Merged
merged 11 commits into from
Jan 30, 2024
Merged

Conversation

holic
Copy link
Member

@holic holic commented Jan 19, 2024

fixes #2061

Copy link

changeset-bot bot commented Jan 19, 2024

🦋 Changeset detected

Latest commit: 7e240d3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 30 packages
Name Type
@latticexyz/store Patch
@latticexyz/cli Patch
@latticexyz/dev-tools Patch
@latticexyz/react Patch
@latticexyz/store-indexer Patch
@latticexyz/store-sync Patch
@latticexyz/world-modules Patch
@latticexyz/world Patch
@latticexyz/abi-ts Patch
@latticexyz/block-logs-stream Patch
@latticexyz/common Patch
@latticexyz/config Patch
create-mud Patch
@latticexyz/ecs-browser Patch
@latticexyz/faucet Patch
@latticexyz/gas-report Patch
@latticexyz/network Patch
@latticexyz/noise Patch
@latticexyz/phaserx Patch
@latticexyz/protocol-parser Patch
@latticexyz/recs Patch
@latticexyz/schema-type Patch
@latticexyz/services Patch
@latticexyz/solecs Patch
solhint-config-mud Patch
solhint-plugin-mud Patch
@latticexyz/std-client Patch
@latticexyz/std-contracts Patch
@latticexyz/store-cache Patch
@latticexyz/utils Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@yonadaa
Copy link
Contributor

yonadaa commented Jan 19, 2024

I think I prefer low-level approach described here: #2061 (comment)

It encapsulates this bootstrapping issue in StoreCore instead of having to handle it in every client/indexer implementation. I really like if they can "just work". It does make registerCoreTables a bit harder to maintain, but ideally Store should be ossified soon anyway.

Are there other reasons to not use .register()?

yonadaa
yonadaa previously approved these changes Jan 19, 2024
Copy link
Contributor

@yonadaa yonadaa left a comment

Choose a reason for hiding this comment

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

All inlined, it's gnarlier than I thought, but these low-level calls are still the best approach IMO

@holic
Copy link
Member Author

holic commented Jan 19, 2024

@hanchon Do you wanna test if this fix works for you?

alvrs
alvrs previously approved these changes Jan 30, 2024
@holic holic merged commit 05b3e88 into main Jan 30, 2024
11 checks passed
@holic holic deleted the holic/store-core-table-order branch January 30, 2024 14:13
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.

store:ResourcesIds getting records before its schema is registered in store:Tables
3 participants