Skip to content
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

Adding to an existing cpanfile.snapshot using 'carton install' produces unusable cpanfile.snapshot #256

Open
lumiera opened this issue Apr 24, 2019 · 2 comments

Comments

@lumiera
Copy link

lumiera commented Apr 24, 2019

Steps to reproduce:

  1. Start with the following cpanfile
requires 'Moose', '2.1604';
  1. Run carton install to generate the following snapshot:
    https://paste.debian.net/hidden/d6de656f/
  2. So far everything works, but the requirements of the project change, and require a new module, so it is added to the the cpanfile, resulting in:
requires 'Moose', '2.1604';
requires 'GeoIP2', '2.006001';
  1. Adding the new module using carton install in the same directory adds contents to cpanfile.snapshot, resulting in the following file:
    https://paste.debian.net/hidden/20288834/
  2. This cpanfile.snapshot file is unusable for deployment (in a new directory):
$ carton install --deployment
Installing modules using /tmp/oldtest/second/cpanfile (deployment mode)
Successfully installed ExtUtils-MakeMaker-7.34 (upgraded from 6.63_02)
Successfully installed Test-Requires-0.10
Successfully installed NetAddr-IP-4.079
Successfully installed Data-Validate-IP-0.27
Successfully installed LWP-MediaTypes-6.04
Successfully installed Encode-Locale-1.05
Successfully installed IO-HTML-1.001
Successfully installed URI-1.76
Successfully installed HTTP-Date-6.02
Successfully installed HTTP-Message-6.18
Successfully installed JSON-PP-4.02 (upgraded from 2.27200)
Successfully installed Cpanel-JSON-XS-4.11
Successfully installed JSON-MaybeXS-1.004000
Successfully installed Try-Tiny-0.30
! Couldn't find module or a distribution Test::Number::Delta
! Couldn't find module or a distribution Path::Class
Successfully installed Module-Runtime-0.016
Successfully installed Dist-CheckConflicts-0.11
Successfully installed File-ShareDir-Install-0.13
Successfully installed Eval-Closure-0.14
Successfully installed Scalar-List-Utils-1.50 (upgraded from 1.25)
Successfully installed Devel-StackTrace-2.03
Successfully installed Class-Data-Inheritable-0.08
Successfully installed Exception-Class-1.44
Successfully installed Params-ValidationCompiler-0.30
Successfully installed Sub-Identify-0.14
Successfully installed Sub-Exporter-Progressive-0.001013
Successfully installed Module-Implementation-0.09
Successfully installed Variable-Magic-0.62
Successfully installed B-Hooks-EndOfScope-0.24
Successfully installed Package-Stash-XS-0.29
Successfully installed Package-Stash-0.38
Successfully installed namespace-clean-0.27
Successfully installed namespace-autoclean-0.28
Successfully installed Role-Tiny-2.000006
Successfully installed Test-Fatal-0.014
Successfully installed Sub-Quote-2.006003
Successfully installed MRO-Compat-0.13
Successfully installed Specio-0.43
Successfully installed Class-Inspector-1.34
Successfully installed File-ShareDir-1.116
Successfully installed DateTime-Locale-1.24
Successfully installed Class-Singleton-1.5
Successfully installed DateTime-TimeZone-2.35
Successfully installed DateTime-1.51
Successfully installed Class-Method-Modifiers-2.12
Successfully installed Devel-GlobalDestruction-0.14
Successfully installed Moo-2.003004
Successfully installed Data-Dumper-Concise-2.023
Successfully installed CPAN-Meta-YAML-0.018 (upgraded from 0.007)
Successfully installed CPAN-Meta-Requirements-2.140 (upgraded from 2.120630)
Successfully installed CPAN-Meta-2.150010 (upgraded from 2.120630)
Successfully installed Test-Harness-3.42 (upgraded from 3.23)
Successfully installed Module-Build-0.4229 (upgraded from 0.39_01)
Successfully installed List-UtilsBy-0.11
Successfully installed List-SomeUtils-XS-0.58
Successfully installed List-SomeUtils-0.56
Successfully installed List-AllUtils-0.15
Successfully installed indirect-0.38
Successfully installed ExtUtils-Depends-0.8000
Successfully installed B-Hooks-OP-Check-0.22
Successfully installed multidimensional-0.014
Successfully installed bareword-filehandles-0.006
Successfully installed strictures-2.000006
Successfully installed MooX-StrictConstructor-0.010
Successfully installed MaxMind-DB-Common-0.040001
Successfully installed Data-IEEE754-0.02
Successfully installed Clone-PP-1.07
Successfully installed File-Which-1.23
Successfully installed File-HomeDir-1.004
Successfully installed Sort-Naturally-1.03
Successfully installed Data-Printer-0.40
Successfully installed MaxMind-DB-Reader-1.000013
Successfully installed Throwable-0.200013
Successfully installed Net-SSLeay-1.85
Successfully installed IO-Socket-SSL-2.066
Successfully installed File-Listing-6.04
Successfully installed HTTP-Negotiate-6.01
Successfully installed HTML-Tagset-3.20
Successfully installed HTML-Parser-3.72
Successfully installed ExtUtils-Helpers-0.026
Successfully installed ExtUtils-Config-0.008
Successfully installed ExtUtils-InstallPaths-0.012
Successfully installed Module-Build-Tiny-0.039
Successfully installed HTTP-Daemon-6.04
Successfully installed Net-HTTP-6.18
Successfully installed HTTP-Cookies-6.04
Successfully installed WWW-RobotRules-6.02
Successfully installed libwww-perl-6.38
Successfully installed Mozilla-CA-20180117
Successfully installed LWP-Protocol-https-6.07
Successfully installed Params-Validate-1.29
! Installing the dependencies failed: Module 'Test::Number::Delta' is not installed, Module 'Path::Class' is not installed
! Bailing out the installation for GeoIP2-2.006001.
Successfully installed Sub-Name-0.21
Successfully installed Params-Util-1.07
Successfully installed Sub-Install-0.928
Successfully installed Package-DeprecationManager-0.17
Successfully installed Data-OptList-0.110
Successfully installed Sub-Exporter-0.987
Successfully installed Devel-OverloadInfo-0.005
Successfully installed Class-Load-0.25
Successfully installed Class-Load-XS-0.10
Successfully installed Module-Runtime-Conflicts-0.003
Successfully installed Moose-2.2011
! Installing the dependencies failed: Module 'GeoIP2' is not installed
! Bailing out the installation for /tmp/oldtest/second/.
101 distributions installed
Installing modules failed
$ 
@dracos
Copy link

dracos commented Apr 24, 2019

The issue is the system EUMM is 6.63_02, predating TEST_REQUIRES in 6.63_03. Installing GeoIP2 with EUMM older than that installs Test::Number::Delta and Path::Class always; with later it knows they're needed for tests only.

So the first carton install installs updated EUMM as part of its work. The second carton install then uses that EUMM which knows Test::Number::Delta and Path::Class aren't needed, so doesn't add them to snapshot. The deployment call in a new directory is then using the system EUMM again, and so tries to find and install them, and cannot.

Running carton install --deployment a second time succeeds (discussed on IRC) as it's using the carton-installed EUMM again.

@lumiera
Copy link
Author

lumiera commented Apr 24, 2019

Updating the ExtUtils::MakeMaker in the perl installation where carton itself is installed (in my case it's a perlbrew perl) makes everything work consistently, although I am not sure if this counts as a solution or a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants