oscar-system / gap_pkg Goto Github PK
View Code? Open in Web Editor NEWJulia wrapper packages for GAP packages
License: MIT License
Julia wrapper packages for GAP packages
License: MIT License
One plan is to just drop one of them and require the user to always depend on both of them
For the JLLs (GAP_pkg_*_jll
) the pattern is to map GAP version 1.2.3
to 100.200.300
, plus potentially an offset. This decouples the GAP version from the Julia version a bit and gives us room to update the wrapper packages even if the underlying GAP packages have not changed.
2021.04-03
(used by Homalg and CAP these days)?1.0c
. I don't think that is the case for anything right now, but perhaps the GAP side should start to impose tighter constraints on version patterns?The following distributed GAP packages seem to either have a kernel extension, or ship some binaries that need to be compiled. In either case, having a JLL would be nice.
For packages which use an external binary, we also need a way to allow the GAP code to interact with these binaries; that may require interposing wrapper scripts, possibly using https://github.com/oscar-system/BinaryWrappers.jl
ace
-- JuliaPackaging/Yggdrasil#6062anupq
-- JuliaPackaging/Yggdrasil#6061browse
caratinterface
cddinterface
-- JuliaPackaging/Yggdrasil#6058cohomolo
crypting
-- JuliaPackaging/Yggdrasil#6063 -- alternatively, make this obsolete, as GAP now has SHA256 code builtincurlinterface
cvec
datastructures
deepthought
-- JuliaPackaging/Yggdrasil#6059digraphs
edim
example
ferret
float
fplsa
-- JuliaPackaging/Yggdrasil#6060gauss
-- JuliaPackaging/Yggdrasil#6057grape
guava
-- JuliaPackaging/Yggdrasil#6056io
json
kbmag
normalizinterface
nq
orb
profiling
semigroups
simpcomp
-- JuliaPackaging/Yggdrasil#6055xgap
-- possibly out of scopezeromqinterface
This script (or a function it provides) would take a path to a GAP package directory, extract data from its PackageInfo.g
, and use that to either create a corresponding GAP_pkg_FOOBAR.jl
, or update an existing such .jl package to match the package version.
Some thought needs to be put into how this would deal with those GAP packages that need a kernel extension or other binary executable, and thus need a JLL; for now I think it would suffice to add an optional flag argument that allows saying "this needs a JLL"; plus perhaps a list of package names for which we hardcode that needs_jll=true
holds.
Then we could use this script to import the whole package distribution, and also do that whenever the distribution is updated. Of course also non-distributed GAP packages could be treated like that.
Right now I am getting this:
julia> using GAP_pkg_ferret
julia> GAP_pkg_ferret.load()
#W dlopen() error: dlopen(/Users/mhorn/.julia/artifacts/49b1930968bd5aa85f37a4c6770a3a524bba6db7/lib/gap/ferret.so, 5): Symbol not found: __ZdlPvm
Referenced from: /Users/mhorn/.julia/artifacts/49b1930968bd5aa85f37a4c6770a3a524bba6db7/lib/gap/ferret.so
Expected in: /usr/lib/libstdc++.6.dylib
in /Users/mhorn/.julia/artifacts/49b1930968bd5aa85f37a4c6770a3a524bba6db7/lib/gap/ferret.so
ERROR: Error thrown by GAP: Error, module '/Users/mhorn/.julia/artifacts/49b1930968bd5aa85f37a4c6770a3a524bba6db7/lib/gap/ferret.so' not found in
LOAD_DYN( filename ) at /Users/mhorn/.julia/artifacts/1ae5d8f1898d9dcbe8dc3d93f56369c864a8e717/share/gap/lib/files.gd:578 called from
<function "LoadDynamicModule">( <arguments> )
called from read-eval loop at /Users/mhorn/.julia/gaproot/v4.12/pkg/ferret-1.0.6/read.g:15
Need to figure out how to resolve this, and how to adjust generate_wrapper.jl
so that it inserts it into any wrapper package like GAP_pkg_ferret
that needs it
There is some deactivated code for doing this already in generate_wrapper.jl
.
The idea is that e.g. GAP_pkg_cvec
should depend on ``GAP_pkg_io(and do
using GAP_pkg_io`) because `cvec` depends on `io`. With that in place, it will suffice to do this to load cvec into Julia:
using GAP_pkg_cvec ; GAP_pkg_cvec.load()
But there are a bunch of questions:
GAP_pkg_io
when it is not yet in the (resp. "a") registry
GAP_pkg_*/Project.toml
files and extract the UUID from there?Naively we could simply invoke GAP.Globals.TestPackage("FOOBAR")
. However, in the current model that exits GAP (and hence OSCAR / Julia), which we don't want...
In the short term, we could hack TestDirectory
to handle exitGAP := true
differently... But most GAP packages call FORCE_QUIT_GAP(1);
after their TestDirectory
call...
Short term solution: temporarily replace the GAP functions QuitGap
(called by TestDirectory
) and FORCE_QUIT_GAP
with our own, which just record the exit code set by GAP, i.e., GapExitCode()
, to determine the test outcome
We could add a helper function doing all that to GAP.jl. It ain't pretty, but it should work for the majority of packages
Long term:
FORCE_QUIT_GAP
callsTestDirectory
to use that, and/or add a sanctioned way to override the exitGAP
option... and/or add a better named alternative to exitGAP
(however, most GAP packages will want to stay compatible with older GAP versions, switching to such a new option would be a hassle for them)This is mostly about the JLL.
Of course were possible alternative implementations should be provided (e.g. perhaps we can do it for IO_Popen3
???)
Strictly speaking this should be redundant with issue #16 because HeLP uses 4ti2interface; but in practice it also has a check for a zsolve
binary being around...
In particular ensure the Julia wrapper package has the right dependencies.
This allows us to improve the wrapper packages by updating this shared package, instead of having to regenerate all wrapper packages each time we improve the wrapper code generator.
It might also improve precompilation and/or load times a bit (I think that was one of the motivations for JLLWrappers.jl
), but that's at beast secondary for me right now.
julia> using GAP_pkg_foobar ; GAP_pkg_foobar.load()
pkginfo.License
field, if present (in which case it contains an SPDX ID)Other information that should be included?
GAP_pkg_browse
should set up terminfo paths, see oscar-system/Oscar.jl#1891 -- once that is done and we once we use it, we can remove the corresponding from Oscar.jl and from GAP.jl
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.