-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
Support flint 3.1 in sagelib #37484
Support flint 3.1 in sagelib #37484
Conversation
I have a feeling this auto-generated bindings of the entire flint API are going to cause packagers many headaches |
I am not in a great position to test this right now. But it does feel like your changes are backward compatible with flint 3.0 if you only remove deprecated stuff. Correct? Binding autogeneration is what cypari2 does. Maybe there should be a cyflint? |
cypari generates bindings at build time from the installed version of pari. This, OTOH, is a static copy which is manually generated (IIUC) https://github.com/sagemath/sage/blob/develop/src/sage_setup/autogen/flint/README.md. Quite a different story. Yes, this should be backwards compatible with flint 3.0. I haven't tested, but CI will tell. |
Oh, I get it. It is really bothersome. |
Yes that's correct. My PR #37458 improves the README slightly, but the bindings for FLINT are indeed generated manually. |
@antonio-rojas I'd suggest to clarify the scope of the PR (only sagelib) in the title of the PR; this can help avoid bizarre and intense complaints by other developers later. |
Documentation preview for this PR (built with commit 6e904cf; changes) is ready! 🎉 |
Can you explain what is bothering you? I view these scripts simply as tools to help Sage developers maintain the pxd files containing declarations of flint functions; there is no requirement that the pxd we ship be complete or correspond to any particular flint release or anything like that; and the output of the scripts is pretty similar to the bindings we used to maintain manually, only more consistent. So I don't really see what difference it makes if the bindings are (partially) auto-generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
@vbraun This PR is not technically a blocker, but I think it would be nice if it could be part of sage-10.3. |
@mezzarobba This would only help if we can sort out the trouble with Singular - see #37203 |
It would still be beneficial for distros |
OK, I was under the (wrong) impression that things would break if the pxd contains bindings for API that no longer exists, which would force distro patching for every API change in flint even if it wasn't directly used in sage. Still, header removals (such as |
Yes, there's a tradeoff here: we are shipping bindings for things that are not used, but it is convenient to have them already available when you are writing new code using flint, be it in sagelib (and I hope sagelib will make use of more of flint in the future!) or in sage packages... That being said, I hoped that the flint developers had removed everything they wanted to remove with the 3.0 release, and that does not seem to be the case. We'll see how things develop with the next few releases! |
A |
Works for me. Singular 4.3.2p10 works fine. To build singular 4.3.2p10 with flint 3.1, I use Singular/Singular@b5605a7 + https://gitlab.archlinux.org/archlinux/packaging/packages/singular/-/blob/main/flint-3.1.patch |
It's a blocker for sagelib. |
This is upstreamed now Singular/Singular@772cf3b |
Thanks for the pointer. OTOH, singular 4.3.2p15 is not released in the same way as p10, and it breaks sagelib in other ways (I know you have a patch but that one is less clear to me so I'll stick to p10). |
I've also been tracking Singular spielwiese, and there's still a bunch of build problems - see Singular/Singular#1205 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all good with Flint 3.0.1 from the system
<!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes sagemath#1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> For this upgrade we tighten the check for GMP so that 6.2.1 is accepted but 6.2.0 is rejected. For example `ubuntu-focal-standard` brings 6.2.0, we accept it, and then FLINT complains: https://github.com/mkoeppe/flint2/actions/runs/7718792281/job/2104079370 6#step:11:5395 We also change the upper bound on system `flint` accepted by `configure`. Closes sagemath#37838. <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> - Depends on sagemath#37484 - Depends on sagemath#37495 (merged and reverted here) - Depends on sagemath#37570 (merged here) - Depends on sagemath#37351 (merged here) - Depends on sagemath#37726 (merged here to resolve merge conflict) <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#37203 Reported by: Matthias Köppe Reviewer(s): Kwankyu Lee, Matthias Köppe
Drop uses of deprecated API
fmpq_get_mpz_frac/fmpq_init_set_mpz_frac_readonly
, replace by verbatim code from the removed functionsarb_version
was only used by the obsoletearb216
andarb218
doctest tags, remove it