-
-
Notifications
You must be signed in to change notification settings - Fork 482
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
gap: support gap 4.13.1 in sagelib (does NOT touch sage-the-distro) #37884
Conversation
Documentation preview for this PR (built with commit 3faaa24; changes) is ready! 🎉 |
The failures here are real:
and the reason why this PR can't be merged if gap is not updated to 4.13. But really, either output (the one with gap 4.12 or the one with 4.13) is just fine. Hence, updating gap to 4.13 in sage-the-distro and apply this PR at the same time, is a pain for using system gap (either we restrict the version of gap that is allowed from system, or we end up with failing doctests on some systems). We really need to come up with a system to be able to support different versions of dependencies in doctests... at this time we have a similar problem with the difference between singular 4.3 and 4.4 (which we worked around with an ugly hack of patching the output of singular when running via doctests!). |
We had specific tags for Python 2 and 3 differences. Since there are only a few differences (some of which are really not easy to rectify by changing the doctests), one option might be to introduce such tags for GAP versions. Or we just tell people that some tests might not pass for trivial reasons if you do not have a sufficiently updated version of GAP... |
Here's one idea to think about:
A quick example with one test (very crude first try): In
The traslation file for gap has something like:
I'm not sure if the doctest label has to include the gap version or even the program name (maybe just have a common tag to mark the test to be applied this mechanism). |
Here's another (maybe simpler?) idea. See src/sage/arith/long.pxd where we have this doctest:
so the output is labeled here... If we could have labels e.g "gap < 4.13" and "gap >= 4.13" or something like this... Would that we workable? |
Sorry for loosing track of this. Yes, I think having something as a tag on the output with, e.g., |
Or, for simplicity, how about we just update gap to 4.13 and require the same version from the system. RIght now, only >= 4.12.2 is accepted, but there's not really anything relevant that actually has 4.12.2 but not 4.13 - https://repology.org/project/gap/versions |
I've opened #38169 for the update, based on this PR. |
Let's close this in favor of #38169 |
<!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> - Based on sagemath#37884 by @tornaria - Fixes sagemath#37616 ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [ ] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> - Depends on sagemath#38144 (merged here for testing) URL: sagemath#38169 Reported by: Matthias Köppe Reviewer(s):
Then perhaps for the upcoming release we should reject system gap 4.13 |
Happening in #38222 |
I'm lost here. Both gap 4.13 and 4.13.1 work just fine. The doctests in sage math fail only because they test something that is not part of the interface (generators, order, etc). As an example, void-linux/void-packages#51902 is using this PR. We are also shipping sagemath 10.4 with this. |
Which other tests fail? In a fresh installation of |
Do you mean to say that on void you somehow could not reproduce This would be rather strange.
|
I mean sagemath seem to be working fine, and all doctests pass, as long as the changes in this PR are applied. |
by "this PR", do you mean the GAP upstream PR ? |
"This PR" means #37884 (i.e. the one you are currently looking at). FWIW, I'm shipping gap 4.13.1 unpatched. |
Could you please double-check that you are not linking the sagelib with libgap.so from GAP 4.12.2 ? |
The failing tests are optional on |
that's not quite true. All you need is a GAP package GRAPE installed. @orlitzky - is there a Gentoo bug filed for this? It's also not clear to me why Gentoo does not package GAP's |
No, I hadn't realized it was an issue with GRAPE, although in hindsight I had probably installed dev-gap/grape in order to keyword it ~riscv.
Because you should use the Gentoo packages instead :) My usual tirade about toy package managers being insufficient and insecure, but also they tend to break system packages in unexpected ways. We have two examples of GAP packages (Browse and now GRAPE) that can mess things up by being installed. I'm sure there would be more if users could install any untested package locally. |
There is no issue with GRAPE per se. The issue is with core GAP 4.13.[0-1], which, with GRAPE installed, causes test failures. |
Ok, thanks for the heads up. I also had the failure mentioned in #38169 (comment) the last time I tried, but now that you have made me think about it, that too is probably caused by some other package. I'm leaving for a conference in a minute but I'll try to sort it out next week and will probably add that patch in Gentoo. |
I used gap upstream patch and now I do not have gap-related failure tests as predicted. I would be for a positive review (the patch must be added) but maybe I am skipping something. |
GRAPE has not messed up anything. It is used in several places in Sage, and these places are not tested if GRAPE is not installed. This is not what "breaking" means, at all. Sorry, but GAP is a living, extendable, system with people developing packages (I wrote or co-wrote a few)! And PackageManager is the easiest way to try them out. It installs things into |
I've applied gap-system/gap#5796, but there are still failures with GRAPE, e.g.
The GAP example provided by @dimpase does work though, so something was fixed:
|
In Fedora 40 with gap and gap_packages 4.13.1, this order works. Actually I needed to apply a couple of patches since gap-system/gap#5796 depended on another one. |
I rebuilt sage from scratch, and now it works? So the GRAPE problem is gone, but now I have to wonder why updates to the system libgap are not noticed by sage... |
Actually I am not using system packages because I got plenty of errors, which disappiear with the spkg. |
Well I committed the patch for GAP in Gentoo, now it's a Sage problem :P I'm going to focus on the remaining test failures in #38169 today. It would be criminal if we released another version of Sage with GAP 4.12.2. |
I'm under impression that Sage libgap interface is more flaky with GAP 4.13 |
must be another copy of GAP somewhere. |
No such luck. I only ever have two copies of GAP, the Gentoo one, and the SPKG. This was after a I'm telling myself it has something to do with the saved workspace so that I can move on. |
yeah, saved workspace. They usually live in ~/.sage/ The latter keeps creating unpleasant surprises for me. |
Follow-up to: * sagemath#37884 * sagemath#38169 With the four additional work items I mentioned in a comment on the latter: 1. Everything has been rebased 2. There's a new feature to detect the polenta GAP package 3. The three failing simplicial sets tests have been marked `# needs gap_package_polenta` 4. I backported gap-system/gap#5796 to the GAP spkg so that the optional GRAPE tests will pass (untested). Let's see what the CI has to say... URL: sagemath#38804 Reported by: Michael Orlitzky Reviewer(s): Dima Pasechnik, Enrique Manuel Artal Bartolo
Follow-up to: * sagemath#37884 * sagemath#38169 With the four additional work items I mentioned in a comment on the latter: 1. Everything has been rebased 2. There's a new feature to detect the polenta GAP package 3. The three failing simplicial sets tests have been marked `# needs gap_package_polenta` 4. I backported gap-system/gap#5796 to the GAP spkg so that the optional GRAPE tests will pass (untested). Let's see what the CI has to say... URL: sagemath#38804 Reported by: Michael Orlitzky Reviewer(s): Dima Pasechnik, Enrique Manuel Artal Bartolo
Follow-up to: * sagemath#37884 * sagemath#38169 With the four additional work items I mentioned in a comment on the latter: 1. Everything has been rebased 2. There's a new feature to detect the polenta GAP package 3. The three failing simplicial sets tests have been marked `# needs gap_package_polenta` 4. I backported gap-system/gap#5796 to the GAP spkg so that the optional GRAPE tests will pass (untested). Let's see what the CI has to say... URL: sagemath#38804 Reported by: Michael Orlitzky Reviewer(s): Dima Pasechnik, Enrique Manuel Artal Bartolo
Done as part of #38804 |
In gap 4.13 there are some improvements, e.g. converting fp groups to permutation groups, computing abelianization of fp groups, which lead to different generators.
This PR fixes doctests so they pass using gap 4.13.
I don't see a way to have this work with gap 4.12.2 at the same time, so this is not in principle ready to merge.
📝 Checklist
⌛ Dependencies
#37883: don't use deprecated
LaTeX()
gap function.