Code Monkey home page Code Monkey logo

Comments (9)

sverweij avatar sverweij commented on July 28, 2024

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.

marcghorayeb avatar marcghorayeb commented on July 28, 2024

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.

sverweij avatar sverweij commented on July 28, 2024

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.

marcghorayeb avatar marcghorayeb commented on July 28, 2024

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.

sverweij avatar sverweij commented on July 28, 2024

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.

marcghorayeb avatar marcghorayeb commented on July 28, 2024

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.

sverweij avatar sverweij commented on July 28, 2024

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.

sverweij avatar sverweij commented on July 28, 2024

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.

marcghorayeb avatar marcghorayeb commented on July 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.