ugexe / zef

Raku Module Management
Artistic License 2.0
207 stars 44 forks source link

Installing `DateTime::Timezones:ver<0.4.1>:auth<zef:guifa>` fails but keeps installation #515

Open patrickbkr opened 1 year ago

patrickbkr commented 1 year ago

Context

When installing DateTime::Timezones:ver<0.4.1>:auth<zef:guifa> without testing in a clean Rakudo installation (in particular Timezones::ZoneInfo is not installed) causes the installation to fail with

===> Installing: DateTime::Timezones:ver<0.4.1>:auth<zef:guifa>
===> Install [FAIL] for DateTime::Timezones:ver<0.4.1>:auth<zef:guifa>: ===SORRY!=== Error while compiling /home/patrickb/repos/oom-tester/site#sources/2A9434081F71A52370A042FD17EC5DA3DDA7F641 (DateTime::Timezones)
Could not find Timezones::ZoneInfo in:
    /home/patrickb/.rakubrew/versions/moar-2023.04/share/perl6/site
    /home/patrickb/.rakubrew/versions/moar-2023.04/share/perl6/vendor
    /home/patrickb/.rakubrew/versions/moar-2023.04/share/perl6/core
    CompUnit::Repository::AbsolutePath<95404224>
    CompUnit::Repository::NQP<85623944>
    CompUnit::Repository::Perl5<85623984>
at /home/patrickb/repos/oom-tester/site#sources/2A9434081F71A52370A042FD17EC5DA3DDA7F641 (DateTime::Timezones):3

===SORRY!=== Error while compiling /home/patrickb/repos/oom-tester/site#sources/2A9434081F71A52370A042FD17EC5DA3DDA7F641 (DateTime::Timezones)
Could not find Timezones::ZoneInfo in:
    /home/patrickb/.rakubrew/versions/moar-2023.04/share/perl6/site
    /home/patrickb/.rakubrew/versions/moar-2023.04/share/perl6/vendor
    /home/patrickb/.rakubrew/versions/moar-2023.04/share/perl6/core
    CompUnit::Repository::AbsolutePath<95404224>
    CompUnit::Repository::NQP<85623944>
    CompUnit::Repository::Perl5<85623984>
at /home/patrickb/repos/oom-tester/site#sources/2A9434081F71A52370A042FD17EC5DA3DDA7F641 (DateTime::Timezones):3

That makes sense as the dependency specification in META6.json is faulty.

Observed Behavior

The package is installed.

Expected Behavior

The package is not installed.

Wild guess: The installation (as in copy files into the CURI) actually succeeds. But the precompilation of the sources fails. That's not part of the installation process itself and in principle optional. So technically the installation actually succeeded. If that is the case, then the error message is misleading.

Steps to Reproduce

$ zef install --/test 'DateTime::Timezones:ver<0.4.1>:auth<zef:guifa>'
# Results in an installation failure
$ zef install --/test 'DateTime::Timezones:ver<0.4.1>:auth<zef:guifa>'
All candidates are currently installed
No reason to proceed. Use --force-install to continue anyway

Your Environment

alabamenhu commented 1 year ago

Per my and @patrickbkr 's IRC discussion, recommend closing this, as the issue with v0.4.1 is that I messed up the depends section. This has been fixed in v0.4.2 which installs correctly.

patrickbkr commented 1 year ago

@alabamenhu But this issue is not about the error in the module. It's about the module installation erroring, but then - against my expectation - still having the module installed. Is the error ignorable and the resulting installation is just fine? Is the resulting installation faulty? A user can't know. The same issue could pop up with any other module that happens to fail to install for any reason. That's why I created a zef issue (instead of a DateTime::Timezones issue).