-
Notifications
You must be signed in to change notification settings - Fork 23
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
Replace Setup.regenerate_gaproot()
by Setup.gaproot_for_building()
#1162
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1162 +/- ##
==========================================
+ Coverage 75.43% 75.46% +0.03%
==========================================
Files 55 55
Lines 4709 4716 +7
==========================================
+ Hits 3552 3559 +7
Misses 1157 1157
|
Uuh, Oscar also wants to put things in a gap root, notably https://github.com/oscar-system/Oscar.jl/blob/7c2d569c224a462f05d0e2d50ebf0da024b0dc3e/src/GAP/utils.jl#L2 which is called from the initialization code of the perfect groups library. In any case, this PR will need a breaking bump in GAP.jl's Version number. |
As for testing we could use a package that is guaranteed to never be shipped in the distro. https://github.com/gap-packages/RegisterPackageTNUMDemo might be perfect candidate. I just made a fresh release of it. |
Yeah it would be good to get rid of
(Hm, shouldn't that be using Instead of creating these files dynamically, we could just put them all permanently into Having such a GAP root in Oscar might be useful to other things, too (e.g. we can use it to overload specific GAP library files. Anyway, just a thought. Using a Julia scratch space or an OS temp dir created via |
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.
Thank you for working on this!
const sysinfo = Setup.regenerate_gaproot() | ||
|
||
const GAP_VERSION = VersionNumber(sysinfo["GAP_VERSION"]) | ||
const GAP_VERSION = VersionNumber(Setup.read_sysinfo_gap(joinpath(GAP_jll.find_artifact_dir(), "lib", "gap", "sysinfo.gap"))["GAP_VERSION"]) |
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.
I actually have written code in the past that used GAP.sysinfo
. From that POV it would be nice to at least retain it, e.g.
const GAP_VERSION = VersionNumber(Setup.read_sysinfo_gap(joinpath(GAP_jll.find_artifact_dir(), "lib", "gap", "sysinfo.gap"))["GAP_VERSION"]) | |
const sysinfo = Setup.read_sysinfo_gap(joinpath(GAP_jll.find_artifact_dir(), "lib", "gap", "sysinfo.gap")) | |
const GAP_VERSION = VersionNumber(sysinfo["GAP_VERSION"]) |
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.
The difference would be that GAP.sysinfo
used to be the sysinfo with updated fields that was created during startup, but with this change it would instead be the sysinfo that is bundled with GAP_jll
.
sysinfo = read_sysinfo_gap(joinpath(gaproot, "sysinfo.gap")) | ||
|
||
return normpath(joinpath(jipath, "bin", sysinfo["GAParch"])) |
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.
If we add the global sysinfo
back, then this could also be
sysinfo = read_sysinfo_gap(joinpath(gaproot, "sysinfo.gap")) | |
return normpath(joinpath(jipath, "bin", sysinfo["GAParch"])) | |
return normpath(joinpath(jipath, "bin", GAP.sysinfo["GAParch"])) |
assuming that something like import ...GAP: GAP
is added at the top of this file
I am not sure this is the right candidate, because it does not check if its kernel extension is indeed available in |
I really like that idea. Didn't know that this would work, but I'll give it a go.
If we would ever want to change any files in there, and people use multiple different Oscar versions on the same system, we get basically to the same discussion that we already had in #1079. I.e. how to parameterize the scratch keys, and when to clean up and how to prevent the OS from cleaning up too early. |
Implements the second bullet point of #1158 in the following way:
gaproot_for_building()
that creates a temporary directory just containingsysinfo.gap
andgac
(as they are currently ingaproot_mutable
). This directory is cached for the duration of the current session, but each time we want to use it, we check that the content hasn't been deleted by some OS cronjob that cleans/tmp
regularly.gaproot_for_building
is injected both into the build process ofJuliaInterface
and the PackageManager right before callingInstallPackage
orCompilePackage
.gaproot_mutable
that we had previously.Resolves #840.
For testing the compilation of packages, we need a package with a kernel extension that has no jll (and will never get one). The prime candidate would be
example
. However, itsTestPackageAvailability
does not tell us anything about the build status of its kernel extension, so I don't see a way to tell if compiling it has actually worked. For the meantime, I disabledGAP_pkg_json_jll
and usejson
for testing, but this should be changed before merging. @fingolfin do you have an idea how to do a proper test here?