Comments (9)
Thanks for the kind words 😊
I haven't started on a circular dependency check yet - was waiting for a demand for it.
from dependency-cruiser.
I work on a large codebase mixing up JS/Coffee/TS and we are starting to see a lot of problems due to circular dependencies, making a tool to check these quite important to us.
I haven't any clue as to how complicated it would be to develop such a check but I'm ready to help out if you're open to PRs?
from dependency-cruiser.
Yesterday I've given some thoughts on how to implement this. Today I have a version running on my machine that correctly detects circular dependencies. It needs some polishing; I will try to publish coming week.
Are you willing to beta test it on your code base and provide me with feedback?
(Generally PR's are welcome b.t.w.)
from dependency-cruiser.
That was quick! Thanks a lot.
Sure, will check out the PR against our codebase, anything specific you want me to test out first?
from dependency-cruiser.
Cool!
Nothing specific to test first - just want to know whether it works as you expect it to (accuracy, usability, speed).
B.t.w. how do (/ will) you use dependency-cruiser in your development process?
from dependency-cruiser.
Did a quick check, it seems to work as expected 👍 I'll do some more testing tomorrow.
At first the accuracy seems good. Maybe some more info would be nice when outputting to the console (what path was used to see the circular?). The speed seems acceptable, we have around 2000 files and it went through it in approximately 10 seconds (no transpilers, going through the transpiled code, so only JS files in it).
At first we only want to show some warnings when the branches are being built on our CI tool (Atlassian Bamboo) and later on we might enforce no circular dependencies. At the very least, we know of a couple of files that are quite sensitive to any dependency changes and we might enforce no more than X circulars on a given file.
from dependency-cruiser.
Thanks. This is useful feedback!
- I'll see if I can add the offending path to the output - doesn't seem to be very complex to do and it'd be massively useful. Thanks for that suggestion! I'll include it with the publish later this week if possible.
- It might be possible to help you enforce to not have > X circulars on a file - but I'll have to think about how to implement it.
I've been using this version against a warty codebase as well and found the speed to be in need of improvement (~20s). Although acceptable for some scenarios (like on a CI), it isn't ideal for others (e.g. in a pre-push trigger) - I have some ideas on how to improve it but it'll be in a separate task.
from dependency-cruiser.
Hi @marcghorayeb I've published v2.2.0 - it seems stable enough. It includes the basic dependency-detection and it is a little faster than the branch version you tested (thanks again!).
I've put separate items on the roadmap for including the offending path in the output and for enforcing to not have > X circulars on a file.
If you have more suggestions/ results based on usage on your codebase let me know
from dependency-cruiser.
That's great 👍 I'll test the new version today and will let you know how it goes, thanks for the quick update.
from dependency-cruiser.
Related Issues (20)
- Persistent error on npx depcruise --init HOT 2
- Issue: numberOfDependentsLessThan does not calculate dependents properly when index.ts is used inbetween HOT 5
- Feature request: Allow to have rules checking Typescript types but also rules that ignore Typescript types HOT 2
- Issue: false positive for couldNotResolve for type only package HOT 5
- Question: A dependency view of each "TYPE" or "INTERFACE" HOT 3
- Question: monorepo, combinedDependencies & not-dev-dep HOT 2
- Error: No "exports" main defined in <project_name>/node_modules/dependency-cruiser/package.json HOT 3
- What am I missing about rcdot? "'rcdot' is not a valid output type" HOT 2
- Issue: not-to-unresolvable return error when using typescript alias in module project HOT 2
- Why doesn't dependency-cruiser "ignore" my private-registry package like it does with node-modules? HOT 6
- Q: Dep Graph for each file HOT 3
- Feature request: consider symlinked workspaces HOT 5
- Issue: not-to-spec and not-to-dev-dep default config should include tsx and jsx HOT 3
- Issue: using `workspace:` to implement nohoist in a package.json while using pnpm throws an error HOT 4
- Missing mermaid example HOT 1
- Feature request: reporters might report `comment` of rules other than `forbidden` HOT 3
- Issue: cruise API - breaking changes HOT 4
- Question: Resolving typescript source files imported from outside specified package HOT 2
- Question: dependency-cruiser API gives a different result when `baseDir` is changed HOT 6
- Question: Can I access the classes/methods/functions in modules? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dependency-cruiser.