Skip Menu |

This queue is for tickets about the MooseX-Storage CPAN distribution.

Report information
The Basics
Id: 73265
Status: resolved
Priority: 0/
Queue: MooseX-Storage

People
Owner: ether [...] cpan.org
Requestors: ALTREUS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.30
Fixed in: 0.39



Subject: JSON needed for testing; not installed
Breaks easy installation (cpanm for example) when you have to dig through loads of logs to find this. Should skip or prereq. --- Building and testing MooseX-Storage-0.30 cp lib/MooseX/Storage/Meta/Attribute/DoNotSerialize.pm blib/lib/MooseX/Storage/Meta/Attribute/DoNotSerialize.pm cp lib/MooseX/Storage/Basic.pm blib/lib/MooseX/Storage/Basic.pm cp lib/MooseX/Storage/IO/AtomicFile.pm blib/lib/MooseX/Storage/IO/AtomicFile.pm cp lib/MooseX/Storage/Format/JSON.pm blib/lib/MooseX/Storage/Format/JSON.pm cp lib/MooseX/Storage/Traits/OnlyWhenBuilt.pm blib/lib/MooseX/Storage/Traits/OnlyWhenBuilt.pm cp lib/MooseX/Storage/IO/StorableFile.pm blib/lib/MooseX/Storage/IO/StorableFile.pm cp lib/MooseX/Storage/Engine/Trait/OnlyWhenBuilt.pm blib/lib/MooseX/Storage/Engine/Trait/OnlyWhenBuilt.pm cp lib/MooseX/Storage/Format/YAML.pm blib/lib/MooseX/Storage/Format/YAML.pm cp lib/MooseX/Storage/Util.pm blib/lib/MooseX/Storage/Util.pm cp lib/MooseX/Storage/Format/Storable.pm blib/lib/MooseX/Storage/Format/Storable.pm cp lib/MooseX/Storage/Engine.pm blib/lib/MooseX/Storage/Engine.pm cp lib/MooseX/Storage/Deferred.pm blib/lib/MooseX/Storage/Deferred.pm cp lib/MooseX/Storage/Engine/Trait/DisableCycleDetection.pm blib/lib/MooseX/Storage/Engine/Trait/DisableCycleDetection.pm cp lib/MooseX/Storage/IO/File.pm blib/lib/MooseX/Storage/IO/File.pm cp lib/MooseX/Storage/Traits/DisableCycleDetection.pm blib/lib/MooseX/Storage/Traits/DisableCycleDetection.pm cp lib/MooseX/Storage/Meta/Attribute/Trait/DoNotSerialize.pm blib/lib/MooseX/Storage/Meta/Attribute/Trait/DoNotSerialize.pm cp lib/MooseX/Storage/Engine/IO/AtomicFile.pm blib/lib/MooseX/Storage/Engine/IO/AtomicFile.pm cp lib/MooseX/Storage.pm blib/lib/MooseX/Storage.pm cp lib/MooseX/Storage/Base/WithChecksum.pm blib/lib/MooseX/Storage/Base/WithChecksum.pm cp lib/MooseX/Storage/Engine/IO/File.pm blib/lib/MooseX/Storage/Engine/IO/File.pm Manifying blib/man3/MooseX::Storage::Meta::Attribute::DoNotSerialize.3pm Manifying blib/man3/MooseX::Storage::Traits::OnlyWhenBuilt.3pm Manifying blib/man3/MooseX::Storage::Format::JSON.3pm Manifying blib/man3/MooseX::Storage::IO::AtomicFile.3pm Manifying blib/man3/MooseX::Storage::Basic.3pm Manifying blib/man3/MooseX::Storage::IO::StorableFile.3pm Manifying blib/man3/MooseX::Storage::Engine::Trait::OnlyWhenBuilt.3pm Manifying blib/man3/MooseX::Storage::Format::YAML.3pm Manifying blib/man3/MooseX::Storage::Util.3pm Manifying blib/man3/MooseX::Storage::Format::Storable.3pm Manifying blib/man3/MooseX::Storage::Deferred.3pm Manifying blib/man3/MooseX::Storage::Engine.3pm Manifying blib/man3/MooseX::Storage::Engine::Trait::DisableCycleDetection.3pm Manifying blib/man3/MooseX::Storage::IO::File.3pm Manifying blib/man3/MooseX::Storage::Traits::DisableCycleDetection.3pm Manifying blib/man3/MooseX::Storage::Meta::Attribute::Trait::DoNotSerialize.3pm Manifying blib/man3/MooseX::Storage::Engine::IO::AtomicFile.3pm Manifying blib/man3/MooseX::Storage.3pm Manifying blib/man3/MooseX::Storage::Engine::IO::File.3pm Manifying blib/man3/MooseX::Storage::Base::WithChecksum.3pm PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/000_load.t t/001_basic.t t/002_basic_io.t t/002_basic_w_subtypes.t t/003_basic_w_embedded_objects.t t/004_w_cycles.t t/005_w_versions_and_authority_check.t t/006_w_custom_type_handlers.t t/007_false.t t/008_do_not_serialize.t t/009_do_not_serialize_lazy.t t/010_basic_json.t t/011_basic_json_w_utf8.t t/012_param_json.t t/020_basic_yaml.t t/020_basic_yaml_syck.t t/020_basic_yaml_xs.t t/030_with_checksum.t t/040_basic_utils.t t/050_basic_storable.t t/060_basic_deferred.t t/061_basic_deferred_w_io.t t/070_basic_maybe.t t/100_io.t t/101_io_atomic.t t/102_io_storable_file.t t/103_io_storable_file_custom.t t/104_io_w_utf8.t t/105_io_atomic_w_utf8.t t/200_combined_in_roles.t t/300_overloaded.t t/000_load.t ............................ ok t/001_basic.t ........................... ok t/002_basic_io.t ........................ ok t/002_basic_w_subtypes.t ................ ok t/003_basic_w_embedded_objects.t ........ ok t/004_w_cycles.t ........................ ok t/005_w_versions_and_authority_check.t .. ok t/006_w_custom_type_handlers.t .......... ok t/007_false.t ........................... ok t/008_do_not_serialize.t ................ ok t/009_do_not_serialize_lazy.t ........... ok t/010_basic_json.t ...................... skipped: Test requires module 'Test::JSON' but it's not found Couldn't find a JSON package. Need XS, JSON, or DWIW at /home/al/.cpanm/work/1323893361.10910/MooseX-Storage- 0.30/blib/lib/MooseX/Storage/Format/JSON.pm line 7 BEGIN failed--compilation aborted at /home/al/.cpanm/work/1323893361.10910/MooseX-Storage- 0.30/blib/lib/MooseX/Storage/Format/JSON.pm line 7. Compilation failed in require at /home/al/perl5/lib/perl5/Module/Runtime.pm line 205. at t/011_basic_json_w_utf8.t line 33 # Looks like you planned 16 tests but ran 1. # Looks like your test exited with 2 just after 1. t/011_basic_json_w_utf8.t ............... Dubious, test returned 2 (wstat 512, 0x200) Failed 15/16 subtests t/012_param_json.t ...................... skipped: Test requires module 'MooseX::Storage::Format::JSONpm' but it's not found t/020_basic_yaml.t ...................... skipped: Test requires module 'Test::Without::Module' but it's not found t/020_basic_yaml_syck.t ................. skipped: Test requires module 'Test::Without::Module' but it's not found t/020_basic_yaml_xs.t ................... skipped: Test requires module 'Test::Without::Module' but it's not found t/030_with_checksum.t ................... skipped: Test requires module 'Digest::SHA1' but it's not found t/040_basic_utils.t ..................... ok t/050_basic_storable.t .................. ok t/060_basic_deferred.t .................. skipped: Test requires module 'Test::JSON' but it's not found t/061_basic_deferred_w_io.t ............. skipped: Test requires module 'IO::AtomicFile' but it's not found t/070_basic_maybe.t ..................... ok t/100_io.t .............................. ok t/101_io_atomic.t ....................... skipped: Test requires module 'IO::AtomicFile' but it's not found t/102_io_storable_file.t ................ ok t/103_io_storable_file_custom.t ......... ok t/104_io_w_utf8.t ....................... skipped: Test requires module 'IO::AtomicFile' but it's not found t/105_io_atomic_w_utf8.t ................ skipped: Test requires module 'IO::AtomicFile' but it's not found t/200_combined_in_roles.t ............... ok t/300_overloaded.t ...................... ok Test Summary Report ------------------- t/004_w_cycles.t (Wstat: 0 Tests: 18 Failed: 0) TODO passed: 14 t/011_basic_json_w_utf8.t (Wstat: 512 Tests: 1 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 16 tests but ran 1. Files=31, Tests=218, 7 wallclock secs ( 0.15 usr 0.06 sys + 5.97 cusr 0.32 csys = 6.50 CPU) Result: FAIL Failed 1/31 test programs. 0/218 subtests failed. make: *** [test_dynamic] Error 255 -> FAIL Installing MooseX::Storage failed. See /home/al/.cpanm/build.log for details.
This is stranger: JSON exists $ perl -MJSON\ 9999 JSON version 9999 required--this is only version 2.53. Something's awry.
On Wed Dec 14 12:26:34 2011, ALTREUS wrote: Show quoted text
> This is stranger: JSON exists > > $ perl -MJSON\ 9999 > JSON version 9999 required--this is only version 2.53. > > Something's awry.
Any further clues?
MooseX::Storage doesn't use JSON.pm; it uses JSON::Any. At runtime, this allows it to pick up whatever is the best JSON engine installed on your machine. However, in a few of the test cases, it sets the JSON_ANY_ORDER environment variable to 'XS', which means that JSON::XS is required. These tests should either be skipped when JSON::XS is not available, or JSON::XS should be added as a test_requires dependency. http://grep.cpan.me/?q=dist%3AMooseX-Storage+JSON_ANY_ORDER
Subject: Re: [rt.cpan.org #73265] JSON needed for testing; not installed
Date: Sun, 14 Jul 2013 09:54:24 -0700
To: Toby Inkster via RT <bug-MooseX-Storage [...] rt.cpan.org>
From: Karen Etheridge <ether [...] cpan.org>
On Sat, Jul 13, 2013 at 03:42:00PM -0400, Toby Inkster via RT wrote: Show quoted text
> Queue: MooseX-Storage > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=73265 > > > MooseX::Storage doesn't use JSON.pm; it uses JSON::Any. > However, in a few of the test cases, it sets the JSON_ANY_ORDER environment variable to 'XS', which means that JSON::XS is required.
Yep, the whole dependency chain in MooseX::Storage is a mess, and some of the ways in which it calls the JSON wrappers is not the cleanest, so you end up with a bunch of JSON implementations installed that you didn't necessarily need. I hope to have this cleaned up soon as part of two initiatives: - fixing the uses of Module::Install feature() to something a little more sane, - ensuring that what JSON::Any, JSON, and JSON::MaybeXS do is all sensible and no more than needed
On 2013-07-14 09:54:40, ETHER wrote: Show quoted text
> On Sat, Jul 13, 2013 at 03:42:00PM -0400, Toby Inkster via RT wrote:
> > Queue: MooseX-Storage > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=73265 > > > > > MooseX::Storage doesn't use JSON.pm; it uses JSON::Any. > > However, in a few of the test cases, it sets the JSON_ANY_ORDER
> environment variable to 'XS', which means that JSON::XS is required. > > Yep, the whole dependency chain in MooseX::Storage is a mess, and some > of > the ways in which it calls the JSON wrappers is not the cleanest, so > you > end up with a bunch of JSON implementations installed that you didn't > necessarily need. > > I hope to have this cleaned up soon as part of two initiatives: > - fixing the uses of Module::Install feature() to something a little > more > sane, > - ensuring that what JSON::Any, JSON, and JSON::MaybeXS do is all > sensible > and no more than needed > >
related: http://www.cpantesters.org/cpan/report/12c1281a-e741-11e2-8070-21bea74d7fc3 (here probably, Test::Requires just needs to be updated to also fail out when loading fails, not simply when the .pm doesn't exist.)
I believe this was fixed with the last release.