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

Idiomatic monorepo setup #619

Open
mitschabaude opened this issue Apr 15, 2024 · 1 comment
Open

Idiomatic monorepo setup #619

mitschabaude opened this issue Apr 15, 2024 · 1 comment

Comments

@mitschabaude
Copy link
Member

mitschabaude commented Apr 15, 2024

There are some excellent proposals made here by @sam-goodman for how to improve the monorepo setup with separate contracts/ and ui/: o1-labs/o1js#1576 (comment)

Configuring workspaces (probably npm workspaces?) and TS as described in that comment seems like a major improvement over the flow of locally npm-linking subdirectories that we recommend in our docs: https://docs.minaprotocol.com/zkapps/how-to-write-a-zkapp-ui#local-development

  • npm link is an extra step that is easily missed, and it breaks the usual expectation that everything needed to develop is part of a repo and shared between developers explicitly
  • It's bad practice to override behavior globally on your machine, as npm link does

Alternative

A different way to approach this would be to move contracts and UI into the same project. Pro: it's simpler. I don't have a good sense of the trade-offs there tbh, should ask existing developers for their preferences

@ymekuria
Copy link
Collaborator

ymekuria commented Apr 15, 2024

Configuring workspaces (probably npm workspaces?) and TS as described in that comment seems like a major improvement over the flow of locally npm-linking subdirectories that we recommend in our docs: https://docs.minaprotocol.com/zkapps/how-to-write-a-zkapp-ui#local-development

We need to revisit this and probably move away from recommending npm link as the workflow.

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

No branches or pull requests

2 participants