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(plugins): create plugins package #584

Closed
wants to merge 12 commits into from
Closed

Conversation

dk1a
Copy link
Member

@dk1a dk1a commented Apr 4, 2023

Stub so that boilerplate diffs and discussion don't have to be in the actual plugins PR

@roninjin10 I tried to account for #514 already

The idea with the dep chain: schema-type -> store -> world -> config -> world-plugins -> config defaults.
cli would be after config, and probably after config defaults.

cli and config separation is unimplemented.
config defaults is unimplemented, I think the ECS wrapper @ludens had in mind would fit here, as well as some more general default for any kind of tables

@dk1a dk1a requested review from alvrs and holic as code owners April 4, 2023 12:21
packages/world-plugins/.nvmrc Outdated Show resolved Hide resolved
alvrs
alvrs previously approved these changes Apr 4, 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.

good call on moving this to a separate PR!

@ludns
Copy link
Member

ludns commented Apr 4, 2023

I think the ECS wrapper @ludens had in mind would fit here

so would the ECS plugin basically hook into the default config and change stuff there when imported?
I specifically don't think we should have ECS stuff by default, but if an import is found in the config file (eg: mud/ecs) then it should be able to set a default config, do config rewriting (ie: go from components -> tables with some rewriting), and change the type of the createStoreConfig function (or maybe expose another entry function? maybe that would be easier).

@dk1a
Copy link
Member Author

dk1a commented Apr 4, 2023

(or maybe expose another entry function? maybe that would be easier).

yeah I think a separate entry would be easier to both implement and see what's happening.
ecsConfig could then restructure the config and pass it to mudConfig to reuse most validation

ecs stuff would also be not so much a plugin, as config wrapper that uses plugins. Well it can have a dedicated plugin too if needed

@@ -0,0 +1,38 @@
{
"name": "@latticexyz/world-plugins",
Copy link
Member

Choose a reason for hiding this comment

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

can we mark this private for now? or otherwise "hide" this from the lerna release flow so canaries can work until we have an actual package here?

@holic
Copy link
Member

holic commented Apr 6, 2023

what kind of world plugins are we thinking about? have we considered how the plugin API will look?

@dk1a
Copy link
Member Author

dk1a commented Apr 6, 2023

what kind of world plugins are we thinking about?

current modules, tsgen, prototypes

have we considered how the plugin API will look?

not in any details, I'll probably improvise a PR and we can go from there

@alvrs
Copy link
Member

alvrs commented Apr 12, 2023

i'd propose waiting with merging this one until we have a clearer picture of the plugin system

@holic holic marked this pull request as draft April 12, 2023 19:19
@dk1a dk1a mentioned this pull request Apr 26, 2023
9 tasks
@vercel
Copy link

vercel bot commented May 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mud ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 1, 2023 1:43pm

@dk1a dk1a changed the title feat(world-plugins): create world-plugins package feat(plugins): create plugins package May 1, 2023
@dk1a dk1a marked this pull request as ready for review May 1, 2023 13:53
@dk1a
Copy link
Member Author

dk1a commented May 1, 2023

Updated this to match other package.jsons and renamed to plugins because #679 is not specific to world, which is also just a plugin

@alvrs
Copy link
Member

alvrs commented Jun 16, 2023

I think the order of operations should be

  1. [WIP] local config types #1025
  2. hooks
  3. create separate plugin package (this)
  4. move existing plugins out of world/store into this

So i'm gonna temporarily close this to declutter the PR list, but generally think this is good and we can just reopen when it's time to merge it

@alvrs alvrs closed this Jun 16, 2023
@holic holic deleted the dk1a/world-plugins-init branch June 23, 2023 11:35
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.

4 participants