Replies: 3 comments 6 replies
-
Hey @haukurmar, thanks for the suggestion! I'll add it to our list of potential features. We're definitely making ergonomics and observability a top priority, and this feature seems to fall under those categories. |
Beta Was this translation helpful? Give feedback.
-
I'd like to echo the benefits of module boundaries. I'm pretty eager to migrate my Nx monorepo to Turborepo, but losing the guardrails that help to prevent circular dependencies is a turn off. |
Beta Was this translation helpful? Give feedback.
-
Hey, all! Let's fold this discussion and interest into #7460. Thank you! |
Beta Was this translation helpful? Give feedback.
-
Which project is this feature idea for?
Turborepo
Describe the feature you'd like to request
When you are building a mono-repo you want to avoid having circular dependencies between packages, so you would like to define what packages can import other packages.
NX has a good way of doing this with what they call module boundaries using tags and scopes define in the project.json, then the linter takes over.
https://nx.dev/core-features/enforce-module-boundaries
an example of this would look something like this.
app: web
package: ui
package: config
package: auth
The app "web" imports on all of these packages
The package "ui" should not be able to import from any of these since it's stand-alone
The package "auth" can reference "config", but not ui or web.
I hope this explains it a bit, otherwise you can look into how NX is doing it.
Describe the solution you'd like
I am not sure how this should be implemented, perhaps an inspiration from NX and how they solve it.
It would be nice that this could be configured in a turbo.json inside each package and/or on the root of the workspace.
Describe alternatives you've considered
Alternative is to use NX as it provides this feature and a lot more.
Beta Was this translation helpful? Give feedback.
All reactions