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/Scalar-List-Utils/t/uniq.t fails on perl built with -Duselongdouble #17125
Comments
From @jkeenanTest output: ##### # Failed test 'uniqnum preserves uniqness of full integer range This breakage occurred upstream on CPAN ##### Update Scalar-List-Utils to CPAN version 1.51 Occurs when perl is built with -Dlongdouble. See Reporting here because of importance of this module within core, but fix Thank you very much. ##### |
From @andkSee also See also Perl Info
|
From @jkeenanMost of the failures are in t/uniq.t from Scalar-List-Utils's test suite. This has already been reported for -Dlongdouble builds by Slaven in the cpan bug ticket referenced, as well as 134358. On IRC #p5p, ilmari has diagnosed this as affecting -Dusequadmath builds as well. Ilmari has prepared a pull request for PEVANS, the upstream maintainer of Scalar-List-Utils. Pull request looked good to me; awaiting new CPAN release of Scalar-List-Utils. So we can merge this RT into the earlier one. -- |
From @sisyphusOn Tue, 13 Aug 2019 12:25:00 -0700, jkeenan wrote:
There are, however, also issues with uniqnum() on double builds, too. For example, the strings '1.73205080756888' and '1.7320508075688772' numify to different values: C:\>perl -le "print 'ok' if '1.73205080756888' != '1.7320508075688772';" but uniqnum() regards them as the same value: C:\>perl -MList::Util -le "@x = List::Util::uniqnum('1.73205080756888', '1.7320508075688772'); print \"@x\"; " This happens because of this line in ListUtil.xs: sv_setpvf(keysv, "%.15" NVgf, SvNV(arg)); On 'double' builds it should be "%.17" (not "%.15"). At least that's the way it looks to me - though I haven't had time to fully evaluate this. (I think that "%.36" should probably be ok for *all* builds of perl - though that may not be optimal, and it's also untested at this stage.) I can say that replacing "%.15" with "%.21" on the long double build fixed the failing test. C:\>perl -MList::Util -le "@x = List::Util::uniqnum('1.73205080756888', '1.7320508075688772'); print \"@x\"; " I also think that such a fix renders ilmari's pull request unnecessary. However, I'm out of time for tonight, and further testing will have to wait until tomorrow. Cheers, |
The RT System itself - Status changed from 'new' to 'open' |
From @jkeenanOn Wed, 14 Aug 2019 15:18:24 GMT, sisyphus@cpan.org wrote:
When you get back, could you make sure that that gets reported upstream in https://rt.cpan.org/Ticket/Display.html?id=130277 ? That's where this has to be resolved first. Thank you very much. -- |
From @leonerdOn Wed, 14 Aug 2019 08:18:24 -0700
This feels the sort of thing crying out for an abstracting macro -- leonerd@leonerd.org.uk | https://metacpan.org/author/PEVANS |
From @jkeenanOn Wed, 14 Aug 2019 15:18:24 GMT, sisyphus@cpan.org wrote:
Can you clarify what you mean by "'double' builds"? In INSTALL, for instance, I see '-Duselongdouble' but I don't see '-Dusedouble'. Perhaps provide a 'perl -V' output for such a build?
[snip] Thank you very much. -- |
From @leonerdOn Wed, 14 Aug 2019 21:36:41 +0200
Oh right - but I meant more having a singly-named macro provided by printf("My NV value is " NVgf_ALL_DIGITS "\n", (NV)1.23); and get whatever is correct for your configured size of NV. -- leonerd@leonerd.org.uk | https://metacpan.org/author/PEVANS |
From @sisyphus
I mean any build of perl where the nvtype is double. Cheers, via perlbug: queue: perl5 status: open |
From @sisyphusOn Thu, Aug 15, 2019 at 2:14 AM James E Keenan via RT <
Seems that the test failure has already been fixed on github by enacting https://rt.cpan.org/Ticket/Display.html?id=130302 Cheers, via perlbug: queue: perl5 status: open |
shouldn't this be in the cpan queue for this module? |
The OP does specifically say "Reporting here because of importance of this module within core, but fix I don't know what the current status is though: @jkeenan reported at least one PR related to https://rt-archive.perl.org/perl5/Ticket/Display.html?id=134358 was applied on github, but it isn't clear whether there has been a new release, or if it has been pulled into blead; and @sisyphus appears to mention further test failures not addressed by that PR. If this module fails its tests with -Duselongdouble, it would be good to get that fixed before 5.36; but I assume our own smokes should be able to tell us that. I guess @leonerd should be the one that decides whether to close this, and perhaps whether it should be a blocker for 5.36. |
On 4/17/22 13:53, Karl Williamson wrote:
shouldn't this be in the cpan queue for this module?
https://rt.cpan.org/Ticket/Display.html?id=130277
Opened Aug 2019; still open.
|
I think that this issue was fixed long ago. Cheers, |
The matrix isn't currently reporting anything for @leonerd, can you review the upstream ticket queue for Scalar-List-Utils and close tickets that have been resolved? |
Migrated from rt.perl.org#134358 (status was 'open')
Searchable as RT134358$
The text was updated successfully, but these errors were encountered: