Package management in GAP
Future plans
Michael Young
Where’s Michael Torpey?
- It’s still me
- I got married in 2021 and took my wife’s name
Before 2018
- No package manager
- Install new packages by hand
- download, extract, autoconf, configure, make
- Same process for each dependency
- Monolithic package distribution with GAP
GAP Days Fall 2018
- University of Siegen, 17–21 September 2018
- Among “further topics”: Package manager for
GAP
Early prototype
- I hacked something together!
- End of week: PackageManager 0.1
Design philosophy
- Get something working quickly
- Reuse existing infrastructure
- Build script
- Package list
- Checking packages
- Allow multiple sources
- Package name (look up in official list)
- Archive URL
- Version control repo
- Do checks, and fail loudly
Used from inside GAP
gap> LoadPackage("automata");
#I automata package is not available. Check that the name is correct
#I and it is present in one of the GAP root directories (see '??RootPaths')
fail
gap> InstallPackage("automata");
#I Getting PackageInfo URLs...
#I Retrieving PackageInfo.g from https://gap-packages.github.io/automata/PackageInfo.g ...
#I Downloading archive from URL https://github.com/gap-packages/automata/releases/download/v1.15/automata-1.15.tar.gz ...
#I Saved archive to /tmp/gaptempdirc2LzuR/automata-1.15.tar.gz.pkgman
#I Extracting to /home/mtorpey/.gap/pkg/automata-1.15 ...
true
gap> LoadPackage("automata");
─────────────────────────────────────────────────────────────────────────────────────────────────
Loading Automata 1.15 (Automata, a GAP package for finite state automata)
by Manuel Delgado (https://cmup.fc.up.pt/cmup/mdelgado/),
Steve Linton (http://www-groups.dcs.st-and.ac.uk/~sal/), and
José João Morais.
maintained by:
Manuel Delgado (https://cmup.fc.up.pt/cmup/mdelgado/) and
Steve Linton (http://www-groups.dcs.st-and.ac.uk/~sal/).
Homepage: https://gap-packages.github.io/automata/
Report issues at https://github.com/gap-packages/automata/issues
─────────────────────────────────────────────────────────────────────────────────────────────────
true
gap>
User level only
- Only modifies
~/.gap/pkg/
- Doesn’t touch GAP install directory
- Doesn’t touch packages bundled with GAP
Bootstrapping packages
- GAP requires GAPDoc, primgrp, SmallGrp, and transgrp to run
- We now have
InstallRequiredPackages
- Can load GAP with
gap --bare
- In principle, only need to install PackageManager manually
Release timeline
0.1 |
Sep 2018 |
InstallPackage, InstallPackageFrom*, RemovePackage |
0.2 |
Oct 2018 |
Automatically install dependencies |
0.3 |
Mar 2019 |
InstallRequiredPackages |
0.4 |
May 2019 |
UpdatePackage |
0.5 |
Jul 2019 |
Build package doc |
1.0 |
Feb 2020 |
“Major version number indicating a mature project” |
1.1 |
Oct 2020 |
Manual CompilePackage function |
1.2 |
Oct 2021 |
Specify minimum package versions |
1.3 |
Aug 2022 |
Improvements |
1.4 |
Feb 2023 |
New bundled package building script |
Current state
- Included with GAP since 2019
- Definitely used by scripts
- Apparently used by people
- Co-authored by “The GAP Team”
- Often works correctly
Things we don’t have
- Old versions of packages
- Auto-removing dependencies
- Updating GAP itself
- Caching?
- …
Bigger future plans
- Question: should the foundation of the package manager change?
- What was easy in 2018 might not be what’s best in 2025
Sources of packages
- URLs come from package list at https://github.com/gap-system/PackageDistro
- Submitted by package authors
- Most hosted at
github.io
(some under gap-packages
organisation)
- Others at
colostate.edu
, rwth-aachen.de
,
tu-bs.de
, uni-bielefeld.de
- Pros and cons
Model 1: Debian
- Tightly controlled package distribution
- Single source by default
- Debian authors test everything and only import new versions when
they pass
- A bit like the monolithic distribution that comes with GAP
- Stable and Testing branches?
Model 2: PyPI/npm
- Wild West!
- Anyone can submit anything, only a few automated checks
- Still all stored in a single repository
Model 3: Status quo+
- Current system with some improvements
- List of package URLs would include older versions
- Allows older packages to be installed
- Host structured data including dependency tree
- Seriously reduces number of requests
- Easy to cache/update locally?
- Mark packages as manually/automatically installed
Model 4: Do nothing
- No major structural change needed
- Focus on bug fixes and usability