-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
altis/dev-tools as a dependency causes unnecessary non-dev dependencies #101
Comments
Having given it further thought, I think the problem is that the altis/dev-tools package is a combination of stuff that you want deployed (debugging plugins) and stuff that you don't (PHPUnit) but they're packaged together. Maybe altis/dev-tools needs to be split into two packages? |
@johnbillion yeah that's a difficult one because dependencies can't install their dev dependencies when you run the install from your root project. It's not ideal to have phpunit installed in the production environment I agree. There are a few options we could consider here:
I think the first one might be the best option, or along those lines. Can you elaborate more on how an additional package would solve the issue? Another meta package of dev dependencies like this? {
"require": {
"altis/altis": "^3.0.0"
},
"require-dev": {
"altis/dev": "^3.0.0"
}
} I'm more in favour of whatever solution keeps things easier to install. |
Apart from PHPUnit, are there any others? |
Nope not right now |
Thinking about this just now and I wonder if we can just get the |
My preference would be to split altis-dev-tools into two packages, one for the dependencies used on production (eg plugins) and one used for developer tooling (eg phpunit). They serve two different purposes really. Then you could do as you suggest Rob and use the former in |
Yeah that'd be simpler really. I guess an Seems like the cleanest solution. Thanks for your input @johnbillion |
Gonna park this for a bit and write up an RFC for the new module. |
We noticed this effect again on SC today, there are almost 100 unnecessary non-dev dependencies being pulled in as a result of altis/dev-tools dependencies which should be dev dependencies. They come from Codeception, wp-browser, phpunit, and the phpunit tools. Can this package be split up please? |
Here's the list, if you're interested
antecedent/patchwork |
Might be able to do something similar to the trick with installing plugin packages to Only a subset of that list but I think Guzzle will be required by the AWS SDK anyway. |
@johnbillion is this causing specific problems with the container build size limitations? |
Nope, just something we noticed while doing dependency updates today |
I'm not sure on what the issue is here ultimately, aside from having unused code? |
Yes that's the issue, we have a greatly inflated dependency tree which means time gets spent periodically updating dependencies that aren't used. |
If you follow the basic Getting Started instructions for an Altis project you end up with a bunch of testing libraries in your Composer dependency graph when installing the site for production use with
composer install --non-dev
.This includes
phpunit/phpunit
,wp-phpunit/wp-phpunit
, and others.The reason is that this
altis/altis
meta package hasaltis/dev-tools
as a non-dev dependency, which in turn has a non-dev dependency onphpunit/phpunit
andwp-phpunit/wp-phpunit
.I think the problem is that
altis/dev-tools
should be a dev dependency rather than a dependency.Thoughts?
The text was updated successfully, but these errors were encountered: