-
Notifications
You must be signed in to change notification settings - Fork 214
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
Installing dependencies without "test" phase #651
Comments
I'm having the same issue. +1 for this proposal (or a documented alternative). |
TL;DR: I was working on a PR with a proof of concept for the proposed This code selects the phases that shall be installed: In my branch I added a commit trying to make this more readable: dboehmer@108981e So there’s already logic to skip the
The man page https://github.com/miyagawa/cpanminus/blob/287cfbda837ab74160a068a4ce21c98b8a0c5b44/App-cpanminus/script/cpanm.PL#L136-143 on
I tried to sum up the actual conditionals but there are too many levels of negation that I couldn’t wrap my head around. Instead I made a truth table of the 5 inputs with all 32 combinations: After all there are only 3 cases where Status quo:
Question @miyagawa: Why are all test dependencies considered (regardless of I’d like to see the code revisited because I found the complexity of the logic and the naming of states like
To find out I made another truth table over installing/running primary/secondary test dependencies from dist/
I see three possible solutions to provide the missing use case 1 fast install/lightweight container from
@miyagawa: What are your thoughts about this? Do you understand my reasoning? Which solution would you consider? |
@ehuelsmann Can you package your code in a CPAN dist file? Then you could use |
You're making the behavior look more complex than it actually is :) The logic to skip the testing deps is as simple as (as you put it somewhere in the middle): "test deps are skipped if the reasoning for this is that
These two options are deprecated and the behavior should be considered accidental. I think |
Although I agree you'd want this in CI scenarios, I think that |
You'll need it in case |
Ok, my PR is adding |
I’m going to build a minimal Docker image for an application that should only include runtime dependencies. I want to install all dependencies with
--notest
and just realized that this still installs all dependencies of my app’scpanfile
’stest
phase.I suggest adding options
--without-test
and--with-test
just like the new--with-configure
.Or is there any other way to do this?
The text was updated successfully, but these errors were encountered: