Skip to content

BBC: Blead breaks DANAJ/Math-Prime-Util-0.73.tar.gz #19539

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

Closed
hvds opened this issue Mar 15, 2022 · 9 comments · Fixed by #19624
Closed

BBC: Blead breaks DANAJ/Math-Prime-Util-0.73.tar.gz #19539

hvds opened this issue Mar 15, 2022 · 9 comments · Fixed by #19624
Labels
BBC Blead Breaks CPAN - changes in blead broke a cpan module(s)
Milestone

Comments

@hvds
Copy link
Contributor

hvds commented Mar 15, 2022

See http://matrix.cpantesters.org/?dist=Math-Prime-Util+0.73 for examples.

Manual check shows that at the point we merged bignum-0.64 at 9bfb09e the test t/70-rt-bignum.t starts hanging. I'm investigating, and have also reported to danaj/Math-Prime-Util#61 and https://rt.cpan.org/Ticket/Display.html?id=141772

@hvds
Copy link
Contributor Author

hvds commented Mar 15, 2022

Initial investigation shows that the immediate root cause is this incompatible change in bignum-0.60:

   - The bignum pragma now converts every numeric constant to a Math::BigFloat
     object.

Before v0.60 the docs said:

    All operators (including basic math operations) are overloaded. Integer
    and floating-point constants are created as proper BigInts or BigFloats,
    respectively.

.. and the hanging test in Math::Prime::Util is expecting a Math::BigInt object.

I've asked PJACKLAM to talk to DANAJ to try and resolve it, not sure what else might be affected.

@jkeenan jkeenan added BBC Blead Breaks CPAN - changes in blead broke a cpan module(s) and removed Needs Triage labels Mar 15, 2022
@xsawyerx xsawyerx modified the milestones: 5.35.10, 5.35.11 Mar 15, 2022
@leonerd
Copy link
Contributor

leonerd commented Apr 8, 2022

We stared at this briefly in the PSC call. The breaking unit-test file is:
https://metacpan.org/release/DANAJ/Math-Prime-Util-0.73/source/t/70-rt-bignum.t

It doesn't immediately appear to be "overly-sensitive test is overly-sensitive", so it may be this is real issue here.

@hvds
Copy link
Contributor Author

hvds commented Apr 8, 2022

@leonerd please see danaj/Math-Prime-Util#61 for the latest state of affairs: there is progress, albeit slowly.

I'm expecting both a change to Math::Prime::Util to fix the test failures with bignum-0.64 and a change to bignum that achieves the original goal of v0.60 in a manner that restores back-compat with pre-0.60 versions (by reversing the changes to bignum.pm and introducing a new bigfloat for the new behaviour). Whether the latter will land in time to be considered for inclusion in perl-5.36 remains to be seen.

If it does not, we could consider backing out the v0.64 upgrade: I expect the bignum family are mainly used for one-liners and throwaway scripts, but there's a smallish risk it is baked into some sysadminy scripts (eg for crypto), where up to now you'd have got away with a use bignum when you only intend to use ints.

The likeliest failure case is probably similar to the MPU test failure, that code like this:

perl -Mbignum -e '$x=1; $x >>= 1, ++$bits while $x'

will loop forever, because $x now gets upgraded to Math::BigFloat instead of Math::BigInt.

[edit: my bignum versions were wrong]

@hvds
Copy link
Contributor Author

hvds commented Apr 8, 2022

I got the bignum versions wrong in my last comment, I've edited to fix them up.

The incompatible change was introduced in bignum-0.60. We upgraded from 0.59 to 0.63 in 6853e8a (which also updated other modules), and to 0.64 in 9bfb09e.

@hvds
Copy link
Contributor Author

hvds commented Apr 12, 2022

bignum-0.65 has been released, reversing the incompatibility introduced with v0.60, along with associated updates to Math-BigInt-1.999830 and Math-BigRat-0.2621. I've verified manually that these build and install ok with bleadperl, and with them in place we no longer get a hang in the Math-Prime-Util-0.73 testsuite.

I propose that we should consider bringing those updates into blead to be part of perl-5.36. I'll work on putting together a smoke branch with the relevant updates.

@hvds
Copy link
Contributor Author

hvds commented Apr 12, 2022

I propose that we should consider bringing those updates into blead to be part of perl-5.36. I'll work on putting together a smoke branch with the relevant updates.

Now created as smoke-me/hv/sync-bignum-20220412.

@hvds
Copy link
Contributor Author

hvds commented Apr 14, 2022

I propose that we should consider bringing those updates into blead to be part of perl-5.36. I'll work on putting together a smoke branch with the relevant updates.

Now created as smoke-me/hv/sync-bignum-20220412.

Smokes look clean so far : only failures are for Solaris 2.11 which is tripping up in t/porting/utils, I think on utils/zipdetails which is a separate problem.

@demerphq
Copy link
Collaborator

demerphq commented Apr 14, 2022 via email

@hvds
Copy link
Contributor Author

hvds commented Apr 14, 2022

I propose that we should consider bringing those updates into blead to be part of perl-5.36. I'll work on putting together a smoke branch with the relevant updates.

Now created as smoke-me/hv/sync-bignum-20220412.

Smokes look clean so far : only failures are for Solaris 2.11 which is tripping up in t/porting/utils, I think on utils/zipdetails which is a separate problem.

Did you rebase on top of the latest blead?

No, but I can see on blead smokes that this exact error showed up around the time I made this branch, and has since gone away again. It doesn't seem worth using more smoke capacity just to prove that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BBC Blead Breaks CPAN - changes in blead broke a cpan module(s)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants