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(dev-tools): use new sync stack #1284

Merged
merged 15 commits into from
Aug 14, 2023
Merged

feat(dev-tools): use new sync stack #1284

merged 15 commits into from
Aug 14, 2023

Conversation

holic
Copy link
Member

@holic holic commented Aug 11, 2023

  • change dev tools to mount with arguments rather than magical globals
  • update dev tools to use new sync stack data
  • add basic recs support

@changeset-bot
Copy link

changeset-bot bot commented Aug 11, 2023

🦋 Changeset detected

Latest commit: 253e08a

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

This PR includes changesets to release 27 packages
Name Type
@latticexyz/common Major
@latticexyz/dev-tools Major
create-mud Major
@latticexyz/react Major
@latticexyz/block-logs-stream Major
@latticexyz/cli Major
@latticexyz/config Major
@latticexyz/network Major
@latticexyz/protocol-parser Major
@latticexyz/std-client Major
@latticexyz/store-cache Major
@latticexyz/store-indexer Major
@latticexyz/store-sync Major
@latticexyz/store Major
@latticexyz/world Major
@latticexyz/ecs-browser Major
@latticexyz/gas-report Major
@latticexyz/noise Major
@latticexyz/phaserx Major
@latticexyz/recs Major
@latticexyz/schema-type Major
@latticexyz/services Major
@latticexyz/solecs Major
solhint-config-mud Major
solhint-plugin-mud Major
@latticexyz/std-contracts 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

abi: IWorld__factory.abi,
publicClient,
walletClient: burnerWalletClient,
onWrite: (write) => write$.next(write),
Copy link
Member Author

Choose a reason for hiding this comment

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

wondering if we wanna export something like write$ from createContract rather than the onWrite callback where user land has to convert it to an observable

downside is that common will need rxjs as a dep, which is quite heavy

Copy link
Member

Choose a reason for hiding this comment

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

i like the lightweight onWrite callback

@holic holic changed the title feat(dev-tools): update to use new sync stack feat(dev-tools): use new sync stack Aug 11, 2023
worldAbi: result.network.worldContract.abi,
write$: result.network.write$,
recsWorld: result.network.world,
});
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 thoughts on this?

Copy link
Member

Choose a reason for hiding this comment

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

looks fine, maybe add a comment linking to https://vitejs.dev/guide/env-and-mode.html near import.meta.env.DEV?

@holic holic marked this pull request as ready for review August 14, 2023 09:55
alvrs
alvrs previously approved these changes Aug 14, 2023
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.

nice!

Copy link
Member

Choose a reason for hiding this comment

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

Multiple changesets in one PR might look a little odd in the global changelog because the same headline (the PR title) will be used multiple times. Would it be feasible to split these three changes to three PRs or are they too intertwined?

Copy link
Member Author

@holic holic Aug 14, 2023

Choose a reason for hiding this comment

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

Multiple changesets in one PR might look a little odd in the global changelog because the same headline (the PR title)

I think we should instead adapt how we generate the changelog to not emphasize the PR titles so much (since the changeset should capture what changed). I really like being able to encapsulate things in one PR yet publish multiple changesets.

Copy link
Member

Choose a reason for hiding this comment

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

Do you have a proposal for how to separate changesets in the global changelog? One alternative i see is manually enforcing a h2 headline in the changeset, but it might cause annoying formatting issues in case we miss it somewhere

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Yeah that's the changesets default for a single package. Since our changesets tend to be more verbose and include context on the change and how to integrate it, the list format felt a little less clear. We could use the commit hash instead of the PR title though, or just accept the same PR title being mentioned multiple times.

Copy link
Member Author

@holic holic Aug 14, 2023

Choose a reason for hiding this comment

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

gonna land this and revisit the changelog and see if there's a way to make this render nicely

abi: IWorld__factory.abi,
publicClient,
walletClient: burnerWalletClient,
onWrite: (write) => write$.next(write),
Copy link
Member

Choose a reason for hiding this comment

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

i like the lightweight onWrite callback

@holic holic merged commit 939916b into main Aug 14, 2023
@holic holic deleted the holic/dev-tools-sync branch August 14, 2023 13:33
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