Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpan Data::Dumper is behind blead Data::Dumper #15417

Closed
p5pRT opened this issue Jul 2, 2016 · 17 comments
Closed

cpan Data::Dumper is behind blead Data::Dumper #15417

p5pRT opened this issue Jul 2, 2016 · 17 comments
Assignees
Labels
dist-Data-Dumper issues in the dual-life blead-first Data-Dumper distribution

Comments

@p5pRT
Copy link

p5pRT commented Jul 2, 2016

Migrated from rt.perl.org#128525 (status was 'open')

Searchable as RT128525$

@p5pRT
Copy link
Author

p5pRT commented Jul 2, 2016

From @karenetheridge

The latest CPAN release of Data​::Dumper is 2.154; in blead it is 2.160. blead has been ahead of CPAN since 5.21.6!

Also, this bug must be fixed at the same time​: https://rt.cpan.org/Ticket/Display.html?id=12282

@p5pRT
Copy link
Author

p5pRT commented Jul 6, 2016

From @ribasushi

On 07/03/2016 12​:02 AM, Karen Etheridge (via RT) wrote​:

The latest CPAN release of Data​::Dumper is 2.154; in blead it is 2.160. blead has been ahead of CPAN since 5.21.6!

Also, this bug must be fixed at the same time​: https://rt.cpan.org/Ticket/Display.html?id=12282

The resolution of the above broke Data​::Dumper installs on Perl < 5.14.

Please rectify ASAP.

@p5pRT
Copy link
Author

p5pRT commented Jul 6, 2016

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jul 8, 2016

From @ribasushi

On 07/06/2016 02​:39 PM, Peter Rabbitson wrote​:

On 07/03/2016 12​:02 AM, Karen Etheridge (via RT) wrote​:

The latest CPAN release of Data​::Dumper is 2.154; in blead it is
2.160. blead has been ahead of CPAN since 5.21.6!

Also, this bug must be fixed at the same time​:
https://rt.cpan.org/Ticket/Display.html?id=12282

The resolution of the above broke Data​::Dumper installs on Perl < 5.14.

Please rectify ASAP.

Still the case almost 5 days after original upload :/

@p5pRT
Copy link
Author

p5pRT commented Jul 8, 2016

From mail@steffen-mueller.net

On 07/08/2016 03​:58 PM, Peter Rabbitson wrote​:

On 07/06/2016 02​:39 PM, Peter Rabbitson wrote​:

On 07/03/2016 12​:02 AM, Karen Etheridge (via RT) wrote​:

The latest CPAN release of Data​::Dumper is 2.154; in blead it is
2.160. blead has been ahead of CPAN since 5.21.6!

Also, this bug must be fixed at the same time​:
https://rt.cpan.org/Ticket/Display.html?id=12282

The resolution of the above broke Data​::Dumper installs on Perl < 5.14.

Please rectify ASAP.

Still the case almost 5 days after original upload :/

Sorry, missed that. Been out of order sick for most of that. I'm still
in pretty bad shape now.

Has somebody tried debugging/fixing this?

NB​: Normally, I'd say anything as old as 5.12 doesn't require going out
of the way for, but considering virtually everything (usually
inadvertently) depends on DD, this seems worth fixing.

--Steffen

@p5pRT
Copy link
Author

p5pRT commented Jul 8, 2016

From @ribasushi

On 07/08/2016 04​:06 PM, Steffen Mueller wrote​:

Has somebody tried debugging/fixing this?

Not that I am aware (sorry for not doing it myself, I am having my hands
full with another dist).

@p5pRT
Copy link
Author

p5pRT commented Jul 8, 2016

From mail@steffen-mueller.net

On 07/08/2016 04​:10 PM, Peter Rabbitson wrote​:

On 07/08/2016 04​:06 PM, Steffen Mueller wrote​:

Has somebody tried debugging/fixing this?

Not that I am aware (sorry for not doing it myself, I am having my hands
full with another dist).

Since I'm just about to crash, I'm wondering if I shouldn't just delete
the new version and reindex the old until somebody (me/you/anybody)
steps up to fix this?

BTW, sorry that I skipped the dev release stage this one time... Been a
bit out of it with lots of kid/family and (non-technical) work stuff
going on.

--Steffen

@p5pRT
Copy link
Author

p5pRT commented Jul 8, 2016

From @haarg

On Fri Jul 08 07​:07​:08 2016, mail@​steffen-mueller.net wrote​:

On 07/08/2016 03​:58 PM, Peter Rabbitson wrote​:

On 07/06/2016 02​:39 PM, Peter Rabbitson wrote​:

On 07/03/2016 12​:02 AM, Karen Etheridge (via RT) wrote​:

The latest CPAN release of Data​::Dumper is 2.154; in blead it is
2.160. blead has been ahead of CPAN since 5.21.6!

Also, this bug must be fixed at the same time​:
https://rt.cpan.org/Ticket/Display.html?id=12282

The resolution of the above broke Data​::Dumper installs on Perl < 5.14.

Please rectify ASAP.

Still the case almost 5 days after original upload :/

Sorry, missed that. Been out of order sick for most of that. I'm still
in pretty bad shape now.

Has somebody tried debugging/fixing this?

NB​: Normally, I'd say anything as old as 5.12 doesn't require going out
of the way for, but considering virtually everything (usually
inadvertently) depends on DD, this seems worth fixing.

--Steffen

Bisected to this commit​:

commit 31ac59b
Author​: Karl Williamson <public@​khwilliamson.com>
Date​: Wed Mar 13 16​:16​:14 2013 -0600

  Data​::Dumper​: Generalize for EBCDIC platforms

  This extends Data​::Dumper to work on EBCDIC platforms. This is just the
  code changes. Some .t files will be changed as well, in future commits

  This involves some code refactoring especially in the .xs code to
  collapse EBCDIC/ASCII handling into one. The if-elsif-elsif-...-else
  logic is cleaned up, so that there are fewer branches taken on average.

@p5pRT
Copy link
Author

p5pRT commented Jul 8, 2016

From @khwilliamson

On 07/08/2016 09​:57 AM, Graham Knop via RT wrote​:

On Fri Jul 08 07​:07​:08 2016, mail@​steffen-mueller.net wrote​:

On 07/08/2016 03​:58 PM, Peter Rabbitson wrote​:

On 07/06/2016 02​:39 PM, Peter Rabbitson wrote​:

On 07/03/2016 12​:02 AM, Karen Etheridge (via RT) wrote​:

The latest CPAN release of Data​::Dumper is 2.154; in blead it is
2.160. blead has been ahead of CPAN since 5.21.6!

Also, this bug must be fixed at the same time​:
https://rt.cpan.org/Ticket/Display.html?id=12282

The resolution of the above broke Data​::Dumper installs on Perl < 5.14.

Please rectify ASAP.

Still the case almost 5 days after original upload :/

Sorry, missed that. Been out of order sick for most of that. I'm still
in pretty bad shape now.

Has somebody tried debugging/fixing this?

NB​: Normally, I'd say anything as old as 5.12 doesn't require going out
of the way for, but considering virtually everything (usually
inadvertently) depends on DD, this seems worth fixing.

--Steffen

Bisected to this commit​:

commit 31ac59b
Author​: Karl Williamson <public@​khwilliamson.com>
Date​: Wed Mar 13 16​:16​:14 2013 -0600

 Data&#8203;::Dumper&#8203;: Generalize for EBCDIC platforms

 This extends Data&#8203;::Dumper to work on EBCDIC platforms\.  This is just the
 code changes\.  Some \.t files will be changed as well\, in future commits

 This involves some code refactoring especially in the \.xs code to
 collapse EBCDIC/ASCII handling into one\.  The if\-elsif\-elsif\-\.\.\.\-else
 logic is cleaned up\, so that there are fewer branches taken on average\.

---
via perlbug​: queue​: perl5 status​: open
https://rt-archive.perl.org/perl5/Ticket/Display.html?id=128525

I'll investigate

@p5pRT
Copy link
Author

p5pRT commented Jul 9, 2016

From @karenetheridge

When releasing, please include this line in Makefile.PL as arguments to WriteMakefile() (as described in https://rt.cpan.org/Ticket/Display.html?id=12282):

+ $] &gt;= 5.005 &amp;&amp; $] <= 5.011000 ? ( INSTALLDIRS => 'perl' ) : (),

@p5pRT
Copy link
Author

p5pRT commented Jul 10, 2016

From @khwilliamson

On 07/08/2016 09​:57 AM, Graham Knop via RT wrote​:

On Fri Jul 08 07​:07​:08 2016, mail@​steffen-mueller.net wrote​:

On 07/08/2016 03​:58 PM, Peter Rabbitson wrote​:

On 07/06/2016 02​:39 PM, Peter Rabbitson wrote​:

On 07/03/2016 12​:02 AM, Karen Etheridge (via RT) wrote​:

The latest CPAN release of Data​::Dumper is 2.154; in blead it is
2.160. blead has been ahead of CPAN since 5.21.6!

Also, this bug must be fixed at the same time​:
https://rt.cpan.org/Ticket/Display.html?id=12282

The resolution of the above broke Data​::Dumper installs on Perl < 5.14.

Please rectify ASAP.

Still the case almost 5 days after original upload :/

Sorry, missed that. Been out of order sick for most of that. I'm still
in pretty bad shape now.

Has somebody tried debugging/fixing this?

NB​: Normally, I'd say anything as old as 5.12 doesn't require going out
of the way for, but considering virtually everything (usually
inadvertently) depends on DD, this seems worth fixing.

--Steffen

Bisected to this commit​:

commit 31ac59b
Author​: Karl Williamson <public@​khwilliamson.com>
Date​: Wed Mar 13 16​:16​:14 2013 -0600

 Data&#8203;::Dumper&#8203;: Generalize for EBCDIC platforms

This bug turns out to be because the isASCII() macro in 5.12 (and I
presume earlier) required its argument to be unsigned (this fact is
undocumented). If you call isASCII in such a release, it always returns
TRUE for a signed argument, as it tests only that the argument < 127,
and so the C optimizer feels free to skip compiling any code in a branch
where it is tested for being false.

I fixed this bug back then, and at the time we got something in ppport.h
to do it correctly. But in looking at that file now, it looks like it's
currently only puts the correct definition if there is no isASCII at all.

It seems to me that the bug should be fixed there; other modules likely
depend on the correct functioning of isASCII, and then no changes need
to be done to D​:D except the inclusion of an up-to-date ppport.h.

While we're at it, I have updated definitions for the other isFOO macros
in handy.h, which are constructed so they are valid on EBCDIC as well.
It seems to me these should be used instead of the defintions that are
there, and they probably should override the existing definitions pulled
from the old release's handy.h.

 This extends Data&#8203;::Dumper to work on EBCDIC platforms\.  This is just the
 code changes\.  Some \.t files will be changed as well\, in future commits

 This involves some code refactoring especially in the \.xs code to
 collapse EBCDIC/ASCII handling into one\.  The if\-elsif\-elsif\-\.\.\.\-else
 logic is cleaned up\, so that there are fewer branches taken on average\.

---
via perlbug​: queue​: perl5 status​: open
https://rt-archive.perl.org/perl5/Ticket/Display.html?id=128525

@p5pRT
Copy link
Author

p5pRT commented Jul 10, 2016

From @arc

Karl Williamson <public@​khwilliamson.com> wrote​:

This bug turns out to be because the isASCII() macro in 5.12 (and I presume
earlier) required its argument to be unsigned (this fact is undocumented).

I fixed this bug back then, and at the time we got something in ppport.h to
do it correctly. But in looking at that file now, it looks like it's
currently only puts the correct definition if there is no isASCII at all.

It seems to me that the bug should be fixed there; other modules likely
depend on the correct functioning of isASCII, and then no changes need to be
done to D​:D except the inclusion of an up-to-date ppport.h.

Thanks, Karl, that does sound like the right fix.

Until PPPort is updated, Data​::Dumper 2.160 can be made to work on
5.12.x (or at least its test suite can be made to pass there) by
patching just one call to isASCII() so that its argument is cast to an
unsigned type. I've attached a patch that does this; it might be
helpful in the short term for people who are using distroprefs or
similar mechanisms.

There's an additional problem on 5.10.0 and earlier (including 5.8.9)​:
the test suite needs Test​::More 0.96, but that dependency is expressed
using BUILD_REQUIRES in Makefile.PL, and therefore isn't honoured by
the EUMM in 5.10.x or 5.8.x. So installing on (say) a vanilla 5.10.0
yields lots of test failures​: most of the *.t files try to call
note(), which doesn't exist, so they exit early with an exception.

I've attached a patch against Data-Dumper 2.160 that I think addresses
this, but I'd welcome review from anyone who knows more about
toolchain issues than me. Also, I'm not sure where it should get
applied, since the version of Data​::Dumper in core uses an
auto-generated Makefile.PL. Do we just add a new
dist/Data-Dumper/Makefile.PL to blead, with the same contents as the
CPAN version?

--
Aaron Crane ** http​://aaroncrane.co.uk/

@p5pRT
Copy link
Author

p5pRT commented Jul 10, 2016

From @arc

data_dumper_isascii.patch
diff -ur Data-Dumper-2.160.orig/Dumper.xs Data-Dumper-2.160/Dumper.xs
--- Data-Dumper-2.160.orig/Dumper.xs	2016-07-03 20:08:54.000000000 +0100
+++ Data-Dumper-2.160/Dumper.xs	2016-07-10 11:18:40.000000000 +0100
@@ -369,7 +369,7 @@
             UV k;

             if (do_utf8
-                && ! isASCII(*s)
+                && ! isASCII(*(U8*)s)
                     /* Exclude non-ASCII low ordinal controls.  This should be
                      * optimized out by the compiler on ASCII platforms; if not
                      * could wrap it in a #ifdef EBCDIC, but better to avoid

@p5pRT
Copy link
Author

p5pRT commented Jul 10, 2016

From @arc

data_dumper_makefilepl.patch
diff -ur Data-Dumper-2.160.orig/Makefile.PL Data-Dumper-2.160/Makefile.PL
--- Data-Dumper-2.160.orig/Makefile.PL	2013-03-15 09:04:11.000000000 +0000
+++ Data-Dumper-2.160/Makefile.PL	2016-07-10 13:57:06.000000000 +0100
@@ -1,5 +1,9 @@
 use 5.006001;
 use ExtUtils::MakeMaker;
+my $have_test_requires = ExtUtils::MakeMaker->VERSION ge '6.64';
+my %test_req = (
+    'Test::More' => '0.98',
+);
 WriteMakefile(
     NAME             => "Data::Dumper",
     VERSION_FROM     => 'Dumper.pm',
@@ -11,9 +15,10 @@
     MAN3PODS         => {},
     DEFINE           => '-DUSE_PPPORT_H',
     INSTALLDIRS      => 'perl',
-    BUILD_REQUIRES   => {
-        Test::More => '0.98',
+    PREREQ_PM => {
+        $have_test_requires ? () : %test_req,
     },
+    $have_test_requires ? (TEST_REQUIRES => \%test_req) : (),
     META_MERGE => {
         dynamic_config => 0,
         resources => {

@p5pRT
Copy link
Author

p5pRT commented Jul 11, 2016

From mail@steffen-mueller.net

Hi Aaron,

On 07/10/2016 03​:26 PM, Aaron Crane wrote​:

Karl Williamson <public@​khwilliamson.com> wrote​:

This bug turns out to be because the isASCII() macro in 5.12 (and I presume
earlier) required its argument to be unsigned (this fact is undocumented).

I fixed this bug back then, and at the time we got something in ppport.h to
do it correctly. But in looking at that file now, it looks like it's
currently only puts the correct definition if there is no isASCII at all.

It seems to me that the bug should be fixed there; other modules likely
depend on the correct functioning of isASCII, and then no changes need to be
done to D​:D except the inclusion of an up-to-date ppport.h.

Thanks, Karl, that does sound like the right fix.

Until PPPort is updated, Data​::Dumper 2.160 can be made to work on
5.12.x (or at least its test suite can be made to pass there) by
patching just one call to isASCII() so that its argument is cast to an
unsigned type. I've attached a patch that does this; it might be
helpful in the short term for people who are using distroprefs or
similar mechanisms.

There's an additional problem on 5.10.0 and earlier (including 5.8.9)​:
the test suite needs Test​::More 0.96, but that dependency is expressed
using BUILD_REQUIRES in Makefile.PL, and therefore isn't honoured by
the EUMM in 5.10.x or 5.8.x. So installing on (say) a vanilla 5.10.0
yields lots of test failures​: most of the *.t files try to call
note(), which doesn't exist, so they exit early with an exception.

I've attached a patch against Data-Dumper 2.160 that I think addresses
this, but I'd welcome review from anyone who knows more about
toolchain issues than me. Also, I'm not sure where it should get
applied, since the version of Data​::Dumper in core uses an
auto-generated Makefile.PL. Do we just add a new
dist/Data-Dumper/Makefile.PL to blead, with the same contents as the
CPAN version?

Thank you for this!

I've just uploaded DD 2.161 with both patches. I maintain a copy of the
code base in a separate github repo for exactly the Makefile.PL. Other
than your temporary isASCII fix it has no other diffs from blead.

Best regards,
Steffen

@p5pRT
Copy link
Author

p5pRT commented Jul 12, 2016

From @ribasushi

On 07/11/2016 10​:12 PM, Steffen Mueller wrote​:

I've just uploaded DD 2.161 with both patches.

2.161 smoked well on my setup[1] too.

Cheers!

[1] https://travis-ci.org/dbsrgits/dbix-class/builds/142004286

@karenetheridge karenetheridge self-assigned this Jan 31, 2020
@karenetheridge karenetheridge added the dist-Data-Dumper issues in the dual-life blead-first Data-Dumper distribution label Jan 31, 2020
@xenu
Copy link
Member

xenu commented May 17, 2021

A new Data::Dumper release has been uploaded to CPAN a few hours ago.

@xenu xenu closed this as completed May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dist-Data-Dumper issues in the dual-life blead-first Data-Dumper distribution
Projects
None yet
Development

No branches or pull requests

3 participants