Skip Menu |

This queue is for tickets about the Test-CleanNamespaces CPAN distribution.

Report information
The Basics
Id: 125678
Status: resolved
Priority: 0/
Queue: Test-CleanNamespaces

People
Owner: Nobody in particular
Requestors: kwilliams [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.23



Subject: Test::CleanNamespaces blocks install of Moose
Trying to upgrade my Moose installation, but it fails when trying to install Test-CleanNamespaces - which fails trying to use Moose in its tests: ---------------------------- [Test-CleanNamespaces-0.22] % head -n 8 t/moose-parameterized-role.t use strict; use warnings; use Test::More 0.88; plan skip_all => 'skipping for regular installs, due to possible circular dependency issues' unless $ENV{AUTHOR_TESTING} || $ENV{AUTOMATED_TESTING}; use Test::Needs { 'Moose' => 0, 'MooseX::Role::Parameterized' => 0 }; [Test-CleanNamespaces-0.22] % head -n 8 t/moose-parameterized-role.t | perl -Mblib Invalid version format (version required) at /Library/Perl/5.18/Module/Runtime.pm line 396. BEGIN failed--compilation aborted at /System/Library/Perl/Extras/5.18/MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm line 2. Compilation failed in require at /System/Library/Perl/Extras/5.18/MooseX/Role/Parameterized.pm line 8. BEGIN failed--compilation aborted at /System/Library/Perl/Extras/5.18/MooseX/Role/Parameterized.pm line 8. Compilation failed in require at /Library/Perl/5.18/Test/Needs.pm line 25. BEGIN failed--compilation aborted at - line 8. [Test-CleanNamespaces-0.22] % head -n7 t/moose-parameterized-role.t | perl -Mblib 1..0 # SKIP skipping for regular installs, due to possible circular dependency issues --------------------------------- Looks like it's getting its runtime/compiletime timing messed up. The Moose check gets executed (and blows up) before the skip_all, because it's in a `use` directive.
On 2018-06-24 20:32:38, KWILLIAMS wrote: Show quoted text
> Trying to upgrade my Moose installation, but it fails when trying to > install Test-CleanNamespaces - which fails trying to use Moose in its > tests:
Show quoted text
> Looks like it's getting its runtime/compiletime timing messed up. The > Moose check gets executed (and blows up) before the skip_all, because > it's in a `use` directive.
Yes, your existing installation of MooseX::Role::Parameterized dies (your Module::Runtime is a newish version, which has a more strict prototype of 'use_package_optimistically' that the old Moose::Util is violating. When Test::Needs tries to load the module, it should treat "is installed, and when loaded it blows up" the same as "it's not installed at all" - by failing the 'needs' check and skipping the test (which it would have done anyway by virtue of the missing environment variables, in your case). To get around this, you can uninstall the old versions of Moose and MXRP, or just delete the .pm files that are being complained about in the error. Show quoted text
> use strict; > use warnings; > > use Test::More 0.88; > plan skip_all => 'skipping for regular installs, due to possible > circular dependency issues' > unless $ENV{AUTHOR_TESTING} || $ENV{AUTOMATED_TESTING}; > > use Test::Needs { 'Moose' => 0, 'MooseX::Role::Parameterized' => 0 };
In addition to the above problem, I also seem to have a persistent moose that can't be killed by conventional weapons: -------------- % perl -MMoose -e1 Invalid version format (version required) at /Library/Perl/5.18/Module/Runtime.pm line 396. BEGIN failed--compilation aborted. % perldoc -l Moose /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/Moose.pm % sudo rm /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/Moose.pm override rw-r--r-- root/wheel restricted,compressed for /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/Moose.pm? y rm: /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/Moose.pm: Operation not permitted -------------- I'm guessing this is left over from stuff I installed many years ago, before "System Integrity Protection" existed. I'm asking this over on Stack Exchange: https://apple.stackexchange.com/questions/328644/perl-library-locations-and-system-integrity-protection . Still, a solution in Test::CleanNamespaces would be good.
On Mon Jun 25 00:26:33 2018, KWILLIAMS wrote: Show quoted text
> In addition to the above problem, I also seem to have a persistent > moose that can't be killed by conventional weapons: > > -------------- > % perl -MMoose -e1 > Invalid version format (version required) at > /Library/Perl/5.18/Module/Runtime.pm line 396. > BEGIN failed--compilation aborted. > > % perldoc -l Moose > /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/Moose.pm > > % sudo rm /System/Library/Perl/Extras/5.18/darwin-thread-multi- > 2level/Moose.pm > override rw-r--r-- root/wheel restricted,compressed for > /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/Moose.pm? > y > rm: /System/Library/Perl/Extras/5.18/darwin-thread-multi- > 2level/Moose.pm: Operation not permitted > -------------- > > I'm guessing this is left over from stuff I installed many years ago, > before "System Integrity Protection" existed.
That Moose installation ships with macOS. If you install a new version of Moose, it should go into /Library/Perl/5.18/darwin-thread-multi-2level and will shadow the system installed version. Show quoted text
> > > I'm asking this over on Stack Exchange: > https://apple.stackexchange.com/questions/328644/perl-library- > locations-and-system-integrity-protection . Still, a solution in > Test::CleanNamespaces would be good.
On Mon Jun 25 05:42:35 2018, haarg wrote: Show quoted text
> > That Moose installation ships with macOS.
Oh, darn - so I shouldn't delete it. Show quoted text
> If you install a new > version of Moose, it should go into /Library/Perl/5.18/darwin-thread- > multi-2level and will shadow the system installed version.
However, I can't install a new version of Moose, because there's an apparent circular dependency here - Moose needs Test::CleanNamespaces, which needs Moose (by an unofficial and undeclared dependency, due to `Test::Needs` misbehaving when trying to check whether Moose is available). So unless I start editing Test::Needs or Test::CleanNamespaces, or install with `force` by skipping tests, I can't get around it. Won't anybody trying to install Moose (or Test::CleanNamespaces) on a clean Mac have this problem?
I'll be shipping a new TCN later today. In the meantime, install with --force, or don't install modules with sudo on top of your system installation (there are ample reasons for never touching the system perl).
I just tried this on another machine and hit the same problem. This is a fresh MacBook Pro with High Sierra 10.13.4 (17E202) installed, and no previous OS ever installed. I think this is the first Perl module I tried to I think this will happen to anyone who tries to install Moose on a clean High Sierra, or at least I haven't thought of a way it wouldn't happen.
On Mon Jun 25 14:06:33 2018, ETHER wrote: Show quoted text
> I'll be shipping a new TCN later today.
Thanks. Show quoted text
> In the meantime, install with --force, or don't install modules with > sudo on top of your system installation (there are ample reasons for > never touching the system perl).
I used to maintain multiple separate perls for testing & isolation & so on, but I don't anymore. Anyway, installing things isn't really the core problem - Moose on the system perl is clearly broken, trying to fix it. Multiple reasons to do that, of course.
The tests are fixed in 0.23.