Bug#901082: libpgobject-type-json-perl: FTBFS with Perl 5.28: t/02-serialization.t failure

Niko Tyni ntyni at debian.org
Sat Jun 9 08:14:22 BST 2018


Control: retitle -1 libpgobject-type-json-perl: FTBFS with newer versions of JSON::PP: t/02-serialization.t failure
On Fri, Jun 08, 2018 at 11:14:35PM +0200, gregor herrmann wrote:
> On Fri, 08 Jun 2018 21:38:12 +0300, Niko Tyni wrote:
> 
> > Source: libpgobject-type-json-perl
> > Version: 2.000001-1
> > Severity: important
> > User: debian-perl at lists.debian.org
> > Usertags: perl-5.28-transition
> > 
> > This package fails to build with Perl 5.28 (currently in experimental.)
> > 
> >   http://perl.debian.net/rebuild-logs/perl-5.28-throwaway/libpgobject-type-json-perl_2.000001-1/libpgobject-type-json-perl_2.000001-1_amd64-2018-06-08T17:55:53Z.build
> > 
> >   #   Failed test 'Literal serializes correctly'
> >   #   at t/02-serialization.t line 49.
> >   #          got: '123'
> >   #     expected: '"123"'
> >   # Looks like you failed 1 test of 23.
> >  
> > I don't see an upstream bug or a failing CPAN test report
> > but it fails consistently for me.
> 
> I can confirm the failure with 5.28, and it still passes the tests
> with 5.26.
> 
> No idea which JSON thing in which part adds/removes the quotation
> marks. All I can think of is the different version of JSON::PP but
> then the problem should show up elsewhere as well.

It's indeed to do with JSON::PP and not specific to Perl 5.28.

Reduced to

 perl -MJSON::PP -le '$p=123; "". $p; print JSON::PP->new->allow_nonref->encode($p)'

which gives the string "123" on older versions of JSON::PP and the number 123
on newer ones (at least 2.97001-1).

I don't know why CPAN testers don't see this. Maybe there's JSON::XS installed
underneath that masks it?
-- 
Niko Tyni   ntyni at debian.org



More information about the pkg-perl-maintainers mailing list