Coder Social home page Coder Social logo

Comments (8)

indeyets avatar indeyets commented on June 19, 2024

A bit more complex than that.

--dev should show development dependencies of the package itself. dev-dependencies further by tree should be ignored always

from graph-composer.

clue avatar clue commented on June 19, 2024

A bit more complex than that.

Indeed, just analyzing this whole thing took me like an hour. The actual package information is parsed by jms/composer-deps-analyzer and I think we've encountered a few minor flaws. The following observations have been performed on a temporarily patched version and I'll file a few PRs in the next couple of days.

Considering the project "clue/graph" for example. If you happen to install it via "composer install --no-dev", its graph will look like this:
install-nodev

And alternatively, if you install it via "composer install --dev" (the default), its graph will look like this:
install-dev

So the behavior depends on whether the development dependencies are installed. And in my opinion this is what makes most sense, in order to display what is actually installed.

Even if "phpunit/phpunit" is not installed in the former case, it still makes sense to provide just the indication that it is a development dependency. One thing I'd like to change though, is to give an additional indication that it's in fact not installed (like semi-transparency).

dev-dependencies further by tree should be ignored always

Agreed, and I think this should already be the case.

Additionally, I think instead of adding a "--dev" option, it's probably better to add an "--no-dev" option instead, to mimic composer's current behavior. No matter how the root package is installed, its graph should then looks like this:
nodev

Any thoughts?

from graph-composer.

shprink avatar shprink commented on June 19, 2024

mimicking composer's --no-dev option is a good idea. I do not have any idea how to make it happen but it is definitely a need :) +1

from graph-composer.

clue avatar clue commented on June 19, 2024

@shprink, absolutely! I've opened a PR to support this in the underlying library just yesterday (schmittjoh/composer-deps-analyzer#9). I'll report progress in this ticket.

from graph-composer.

shprink avatar shprink commented on June 19, 2024

Good to know thanks. At the moment I had to re-install temporary repo with --no-dev to get the right diagram.
Good job btw, you saved my day :)

from graph-composer.

gimler avatar gimler commented on June 19, 2024

any news?

from graph-composer.

clue avatar clue commented on June 19, 2024

any news?

Yeah, I've pushed an upstream PR (schmittjoh/composer-deps-analyzer#9), but haven't received any feedback so far.

Meanwhile, there's also a pending PR (#19) which implements this in our code base instead of pushing this upstream. I suppose any input is welcome :) Perhaps coordinate efforts and pick up either / decide on either PR? 👍

from graph-composer.

GaryJones avatar GaryJones commented on June 19, 2024

Not much to add, except a strong +1 for being able to ignore require-dev dependencies of my package and those of the require packages my package depends on.

from graph-composer.

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.