Repo restructuring to remove circular dependencies
See original GitHub issueRelated issues
- https://github.com/colinhacks/zod/issues/175#issuecomment-724316421
- https://github.com/colinhacks/zod/pull/226
RFC
-
base
s shouldn’t import other modules- for example,
src/types/base.ts
should be reconsidered
- for example,
- api reused in other modules should be modularized, for example:
src/parser.ts
should be split into two filessrc/parser/index.ts
&src/parser/types.ts
so the circular dependency between ZodError & parser is removed- and a similar approach could be done on other instances of circular dependency
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Remove Circular Dependencies by Using the Repository ...
I'll show you how we used the Repository pattern in Ruby to remove that circular dependency and help us make gems thin and...
Read more >How to solve circular dependencies between JARs?
You can break dependencies by dependency inversion. To avoid and resolve circular dependencies, it helps to design a tiered architecture.
Read more >How to Eliminate Circular Dependencies from Your JavaScript ...
In my experience, the best way to deal with circular dependencies is to avoid them altogether. Circular dependencies are usually an indication ...
Read more >Circular dependencies · Issue #2517 · hapijs/joi - GitHub
While running npm run build which builds joi using rollup, there are warnings regarding circular dependencies.
Read more >Cyclic dependency - OutSystems
Hi all,. I am working on an application which has several dependent applications each with number of modules,.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@o-alexandrov zod@3.0.0-alpha.7 now contains no circular dependencies.
@colinhacks I have tried and resolved most of them before locally, but then I read the recommendation to follow the Medium article and decided to demonstrate first that article doesn’t resolve the issue. I plan to clean up the PR on circular dependencies later this week, since: