Skip Menu |
 

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

Report information
The Basics
Id: 57904
Status: resolved
Priority: 0/
Queue: MooseX-Types-Structured

People
Owner: Nobody in particular
Requestors: erik [...] hollensbe.org
Cc:
AdminCc:

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



Subject: Failing tests in 5.12.0/5.12.1
It seems this module breaks in 5.12.0 and 5.12.1, installed with perlbrew and under App::cpanminus -- platform is 10.6 OS X. Sorry for the verbosity, but please allow me to assist if I can with additional testing. Here are the test logs: Building and testing MooseX-Types-Structured-0.21 for MooseX::Types::Structured cp lib/MooseX/Types/Structured.pm blib/lib/MooseX/Types/Structured.pm cp lib/MooseX/Meta/TypeCoercion/Structured.pm blib/lib/MooseX/Meta/TypeCoercion/Structured.pmcp lib/MooseX/Meta/TypeCoercion/Structured/Optional.pm blib/lib/MooseX/Meta/TypeCoercion/Structured/Optional.pmcp lib/MooseX/Meta/TypeConstraint/Structured.pm blib/lib/MooseX/Meta/TypeConstraint/Structured.pmcp lib/MooseX/Types/Structured/OverflowHandler.pm blib/lib/MooseX/Types/Structured/OverflowHandler.pm cp lib/MooseX/Meta/TypeConstraint/Structured/Optional.pm blib/lib/MooseX/Meta/TypeConstraint/Structured/Optional.pm Manifying blib/man3/MooseX::Types::Structured.3pm Manifying blib/man3/MooseX::Meta::TypeConstraint::Structured.3pm Manifying blib/man3/MooseX::Meta::TypeCoercion::Structured.3pm PERL_DL_NONLAZY=1 /opt/local/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t t/00-load.t ....... ok t/01-basic.t ...... ok t/02-tuple.t ...... ok t/03-dict.t ....... ok t/04-combined.t ... okt/04-map.t ........ ok t/05-advanced.t ... ok # Failed test 'MyDict2 is_a_type_of MyDict4' # at t/06-api.t line 112. # Failed test 'tuple of tuple'# at t/06-api.t line 127. # Failed test 'tuple of tuple' # at t/06-api.t line 128. # Failed test 'tuple of tuple' # at t/06-api.t line 129. # Failed test 'MyDict1 is_subtype_of MyDict4' # at t/06-api.t line 133. # Looks like you failed 5 tests of 88. t/06-api.t ........ Dubious, test returned 5 (wstat 1280, 0x500) Failed 5/88 subtests t/07-coerce.t ..... ok t/08-examples.t ... skipped: Tests require MooseX::Types::DateTime t/09-optional.t ... ok t/10-recursion.t .. ok t/11-overflow.t ... ok # Failed test 'Wrong basic type' # at t/12-error.t line 25. # 'Validation failed for 'simple_tuple' with value { a: 1, b: 2 }' # doesn't match '(?-xism:Validation failed for 'simple_tuple' failed with value { a: 1, b: 2 })' # Failed test 'Correctly failed due to "a" not an Int' # at t/12-error.t line 29. # 'Validation failed for 'simple_tuple' with value [ "a", "b" ], Internal Validation Error is: Validation failed for 'Int' with value a' # doesn't match '(?-xism:failed for 'simple_tuple' failed with value \[ "a", "b" \])' # Failed test 'Correctly failed due to object not a Str' # at t/12-error.t line 33. # 'Validation failed for 'simple_tuple' with value [ 1, MooseX::Meta::TypeConstraint::Structured{ coercion: MooseX::Meta::TypeCoercion::Structured=HASH(0x100b8a520), compiled_type_constraint: CODE(0x100b88eb0), constraint: CODE(0x1009940f0), constraint_generator: CODE(0x100b81808), name: "simple_tuple", package_defined_in: "main", ... } ], Internal Validation Error is: Validation failed for 'Str' with value MooseX::Meta::TypeConstraint::Structured=HASH(0x100b88e98)' # doesn't match '(?-xism:Validation failed for 'simple_tuple' failed with value \[ 1, MooseX::Meta::TypeConstraint::Structured)' # Failed test 'Not enought values' # at t/12-error.t line 37. # 'Validation failed for 'simple_tuple' with value [ 1 ], Internal Validation Error is: Validation failed for 'Str' with value NULL' # doesn't match '(?-xism:Validation failed for 'Str' failed with value NULL)' # Failed test 'Wrong basic type' # at t/12-error.t line 47. # 'Validation failed for 'simple_dict' with value [ 1, 2 ]' # doesn't match '(?-xism: failed with value \[ 1, 2 \])' # Failed test 'Correctly failed due to age not an Int' # at t/12-error.t line 51. # 'Validation failed for 'simple_dict' with value { age: "a", name: "John" }, Internal Validation Error is: Validation failed for 'Int' with value a' # doesn't match '(?-xism:failed for 'Int' failed with value a)' # Failed test 'Correctly failed due to object not a Str' # at t/12-error.t line 55. # 'Validation failed for 'simple_dict' with value { age: 1, name: MooseX::Meta::TypeConstraint::Structured{ coercion: MooseX::Meta::TypeCoercion::Structured=HASH(0x100b8cc88), compiled_type_constraint: CODE(0x100b8a958), constraint: CODE(0x1009940f0), constraint_generator: CODE(0x10087c120), name: "simple_dict", package_defined_in: "main", ... } }, Internal Validation Error is: Validation failed for 'Str' with value MooseX::Meta::TypeConstraint::Structured=HASH(0x100b8a868)' # doesn't match '(?-xism:failed with value { age: 1, name: MooseX:)' # Failed test 'Not enought values' # at t/12-error.t line 59. # 'Validation failed for 'simple_dict' with value { name: "John" }, Internal Validation Error is: Validation failed for 'Int' with value NULL' # doesn't match '(?-xism:failed for 'Int' failed with value NULL)' # Failed test 'Wrong basic type' # at t/12-error.t line 72. # 'Validation failed for 'optional_tuple' with value { a: 1, b: 2 }' # doesn't match '(?-xism:Validation failed for 'optional_tuple' failed with value { a: 1, b: 2 })' # Failed test 'Correctly failed due to "a" not an Int' # at t/12-error.t line 76. # 'Validation failed for 'optional_tuple' with value [ "a", "b" ], Internal Validation Error is: Validation failed for 'Int' with value a' # doesn't match '(?-xism:failed for 'Int' failed with value a)' # Failed test 'Correctly failed due to object not a Str' # at t/12-error.t line 80. # 'Validation failed for 'optional_tuple' with value [ 1, MooseX::Meta::TypeConstraint::Structured{ coercion: MooseX::Meta::TypeCoercion::Structured=HASH(0x100b8a520), compiled_type_constraint: CODE(0x100b88eb0), constraint: CODE(0x1009940f0), constraint_generator: CODE(0x100b81808), name: "simple_tuple", package_defined_in: "main", ... } ], Internal Validation Error is: Validation failed for 'MooseX::Types::Structured::Optional[Str]' with value MooseX::Meta::TypeConstraint::Structured=HASH(0x100b88e98)' # doesn't match '(?-xism:failed for 'MooseX::Types::Structured::Optional\[Str\]' failed with value MooseX)' # Failed test 'Wrong basic type' # at t/12-error.t line 88. # 'Validation failed for 'optional_dict' with value [ 1, 2 ]' # doesn't match '(?-xism: failed with value \[ 1, 2 \])' # Failed test 'Correctly failed due to age not an Int' # at t/12-error.t line 92. # 'Validation failed for 'optional_dict' with value { age: "a", name: "John" }, Internal Validation Error is: Validation failed for 'MooseX::Types::Structured::Optional[Int]' with value a' # doesn't match '(?-xism:Validation failed for 'MooseX::Types::Structured::Optional\[Int\]' failed with value a)' # Failed test 'Correctly failed due to object not a Str' # at t/12-error.t line 96. # 'Validation failed for 'optional_dict' with value { age: 1, name: MooseX::Meta::TypeConstraint::Structured{ coercion: MooseX::Meta::TypeCoercion::Structured=HASH(0x100b8cc88), compiled_type_constraint: CODE(0x100b8a958), constraint: CODE(0x1009940f0), constraint_generator: CODE(0x10087c120), name: "simple_dict", package_defined_in: "main", ... } }, Internal Validation Error is: Validation failed for 'Str' with value MooseX::Meta::TypeConstraint::Structured=HASH(0x100b8a868)' # doesn't match '(?-xism:failed with value { age: 1, name: MooseX:)' # Looks like you failed 14 tests of 25. t/12-error.t ...... Dubious, test returned 14 (wstat 3584, 0xe00) Failed 14/25 subtests t/bug-optional.t .. ok Test Summary Report ------------------- t/06-api.t (Wstat: 1280 Tests: 88 Failed: 5) Failed tests: 46, 56-58, 61 Non-zero exit status: 5 t/12-error.t (Wstat: 3584 Tests: 25 Failed: 14) Failed tests: 5-8, 10-13, 15-17, 19-21 Non-zero exit status: 14 Files=15, Tests=319, 3 wallclock secs ( 0.09 usr 0.04 sys + 2.95 cusr 0.27 csys = 3.35 CPU) Result: FAIL Failed 2/15 test programs. 19/319 subtests failed.
Subject: [rt.cpan.org #57904] Also fails with perl 5.10.1
Date: Fri, 28 May 2010 23:55:53 +0900
To: bug-MooseX-Types-Structured [...] rt.cpan.org
From: Ansgar Burchardt <ansgar [...] 43-1.org>
Download (untitled) / with headers
text/plain 466b
Hi, the tests also fail [1] on Debian (unstable) with perl-5.10.1 and Moose-1.05. For the failing tests in t/12-error.t, this was caused by a change in Moose. From the Moose changelog for 1.05: * Fix type constraint validation messages to not include the string 'failed' twice in the same sentance (Florian Ragwitz). The attached patch fixes these. Another five failing tests in t/06-api.t remain. Regards, Ansgar [1] http://bugs.debian.org/583463
Download tests.patch
text/x-diff 3.7k

Message body is not shown because sender requested not to inline it.

Download (untitled) / with headers
text/plain 1.1k
Hey, This seems to be a problem with a change to the way Moose type constraints checked for equality. Its actually a problem with Moose and MooseX Types, just that the test cases fro MX:T:Structured picked up the problem. I have patches pending for Moose and MooseX::Types, hopefully we can get that stuff out shortly. Unfortunately this will mean if you upgrade Moose you'll need to update MX:Types and possible several other bits. I'll post when I have more. If you desperately need patches you can pull from the Moose git repo the latest from Moose and MooseX::Types. That will probably solve it. THanks for the report! John On Fri May 28 10:56:06 2010, ansgar@43-1.org wrote: Show quoted text
> Hi, > > the tests also fail [1] on Debian (unstable) with perl-5.10.1 and > Moose-1.05. > > For the failing tests in t/12-error.t, this was caused by a change in > Moose. From the Moose changelog for 1.05: > > * Fix type constraint validation messages to not include the string > 'failed' twice in the same sentance (Florian Ragwitz). > > The attached patch fixes these. > > Another five failing tests in t/06-api.t remain. > > Regards, > Ansgar > > [1] http://bugs.debian.org/583463
Subject: Re: [rt.cpan.org #57904] Also fails with perl 5.10.1
Date: Sat, 29 May 2010 01:53:35 +0200
To: Ansgar Burchardt via RT <bug-MooseX-Types-Structured [...] rt.cpan.org>
From: Florian Ragwitz <rafl [...] debian.org>
Download (untitled) / with headers
text/plain 468b
On Fri, May 28, 2010 at 10:56:07AM -0400, Ansgar Burchardt via RT wrote: Show quoted text
> For the failing tests in t/12-error.t, this was caused by a change in > Moose. From the Moose changelog for 1.05: > > * Fix type constraint validation messages to not include the string > 'failed' twice in the same sentance (Florian Ragwitz).
That part is already fixed in the repo. But there's more fail. -- BOFH excuse #152: My pony-tail hit the on/off switch on the power strip.
Download signature.asc
application/pgp-signature 189b

Message body not shown because it is not plain text.

RT-Send-CC: rafl [...] debian.org, ansgar [...] 43-1.org
Does updating to newer Moose/MooseX::Types resolve the issue? If so, I think we can close this.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.