-
Notifications
You must be signed in to change notification settings - Fork 213
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
make with-configure default for installdeps, or mention it in docs for installdeps #528
Comments
the thought behind this behavior is:
including configure phase by default goes contrary to this thought process. I understand the definition of "dependencies" are not always the same depending on the use case. I can probably take a doc patch to explain the default phases for |
Your thinking there seems to apply only if the dependencies are pure perl. The specific module i ran into this problem with was OpenGL::Modern, which must work out what hardware and OS it is on, which libraries are provided by the system and configure the build phase compilation of things accordingly. Did i make some logic error here? Does your logic about installdeps intentionally exclude such dists? In any case, to not be held up by that conversation i'll prepare a doc patch. |
Doc patch done, also discussed it at length with Grinnz on IRC. An important part of the puzzle here is that we want to run an XS dist on travis and want to use cpanm to handle installing the deps to build the thing, so we can test it. Normally --test-only would be fine and useful for this, but for travis reporting (errored/failed) the build and test steps need to be separate, so we can't just run test-only on the current dir. As such, the optimal solution here would be the addition of a --build-only command that's an alias to Personally, for the sake of completeness, i'd also support the addition of an unopinionated |
I think you're confused. XS dependencies are also configured, built and tested correctly. The only item being skipped here is the configuration of the main target of the command, which is the current directory if you run it with |
If you're building an XS dependency which requires the running of full blown configure, build and test, then you're right that Again, the mismatch here is that with There's a CPAN meta spec directive One compromise can be made so that |
Sorry for stating that unclearly. I didn't mean dependencies that are XS, but dependencies that are required often by XS dists; binary libraries in the system itself, e.g. glew, freeglut, etc. |
Also it turns out |
As for meta files, having those present would be counter-productive, as it means cpanfile cannot serve as the canonical and only source of dependencies in the dist, and would mean a dev has to know, and spend extra effort, on maintaining them via manual edits of build tools runs. |
I agree to your sentiment, but in most of the cases, we have a way to auto-populate META files and Makefile.PL/Build.PL using tools like Dist::Ziilla, using I wrote a piece about this about a year ago to improve this situation https://gist.github.com/miyagawa/5028262 but as with everything else, this requires a consensus and efforts across the larger group of the ecosystem, and it has not happened. And in general, |
OpenGL::Modern doesn't use a build tool beyond EUMM. And even with a build tool extra human intervention is necessary since it's easy for things to get out of synch if it isn't run on each commit. That's why i see it as important to have cpanfile not only be canonical, but also the only source of deps. META files are a fragile and expensive workaround imo. The build tool could also be run on Travis, but that then requires the extra effort of building and installing and testing that on travis. Also generally it would be helpful if XS dist authors could just tell their collaborators "run In short: I see a special case here with no discernable upside, and no strong* downside if it weren't there. (* some extra dists installed, usually a small set of them too) Edit: That proposal goes some ways beyond what i'm able to consider deeply at the moment. Sorry. |
I just spent half an hour of finding out the following, and would like to see steps taken to spare others this pain:
https://metacpan.org/pod/CPAN::Meta::Spec#Phases documents configure phase as things to be installed before Bpl or MFpl are run. This makes
cpanm --installdeps
with a cpanfile seem a good step to do before doing either of those.Currently installdeps ignores the configure phase deps without with-configure set.
However the doc entry for installdeps does not mention this.
And the doc entry for with-configure says it's experimental, but does not explain why.
So i'd like to see one of the following happen:
Or
Bonus: Remove the mention of experimental, or add docs as to why it's experimental.
Which of these makes more sense?
The text was updated successfully, but these errors were encountered: