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

feat(store,world): enable namespaces input #2968

Merged
merged 18 commits into from
Jul 29, 2024
Merged

feat(store,world): enable namespaces input #2968

merged 18 commits into from
Jul 29, 2024

Conversation

holic
Copy link
Member

@holic holic commented Jul 23, 2024

  • multiple namespace tests
  • validate that each namespace is only specified once (since the same namespace can be used with diff labels)
  • output table libs to namespaced dirs
  • support deploying systems from namespace dirs
  • enable systems input in namespaces

Copy link

changeset-bot bot commented Jul 23, 2024

🦋 Changeset detected

Latest commit: 78ff2fa

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

This PR includes changesets to release 24 packages
Name Type
@latticexyz/cli Major
@latticexyz/store Major
@latticexyz/world Major
@latticexyz/world-modules Major
mock-game-contracts Major
@latticexyz/dev-tools Major
@latticexyz/query Major
@latticexyz/react Major
@latticexyz/store-indexer Major
@latticexyz/store-sync Major
ts-benchmarks Major
@latticexyz/abi-ts Major
@latticexyz/block-logs-stream Major
@latticexyz/common Major
@latticexyz/config Major
create-mud Major
@latticexyz/faucet Major
@latticexyz/gas-report Major
@latticexyz/protocol-parser Major
@latticexyz/recs Major
@latticexyz/schema-type Major
solhint-config-mud Major
solhint-plugin-mud Major
@latticexyz/utils Major

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

}
}
// Copied from store/ts/config/v2/namespaces.ts but using world namespace validate/resolve methods
// TODO: figure out how to dedupe these?
Copy link
Member Author

Choose a reason for hiding this comment

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

@alvrs Curious if you have any ideas/strategies for this kind of thing. It's similar to table shorthands where we need to deeply extend particular things (in this case extending store namespaces with systems).

Copy link
Member

Choose a reason for hiding this comment

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

don't really have a good strategy for this either :/

@holic holic marked this pull request as ready for review July 29, 2024 10:53
@holic holic requested a review from alvrs as a code owner July 29, 2024 10:53
*
* Defaults to `true` when using top-level `namespaces` key, `false` otherwise.
* @deprecated We recommend importing directly from table libraries rather than from the index for better compile times and deterministic deploys.
Copy link
Member

Choose a reason for hiding this comment

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

ooc do we know that it impacts compile times?

Copy link
Member Author

@holic holic Jul 29, 2024

Choose a reason for hiding this comment

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

I haven't measured it but it's very likely given 1) more files need to be compiled, even if not used and 2) reports from @0xhank and others on more files = worse compile times (which may be fixable upstream in forge/foundry/solc)

The main motivation to deprecate this here is that any change to tables impacts bytecode of all things import index.sol, even if they aren't importing the table that changed. Which means systems become less consistent in terms of bytecode.

Copy link
Member

@alvrs alvrs left a comment

Choose a reason for hiding this comment

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

🔥🔥🔥

@holic holic merged commit a10b453 into main Jul 29, 2024
13 checks passed
@holic holic deleted the holic/namespaces-input branch July 29, 2024 11:12
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