-
Notifications
You must be signed in to change notification settings - Fork 175
Start GAP with prescribed package versions #6057
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
base: master
Are you sure you want to change the base?
Start GAP with prescribed package versions #6057
Conversation
In order to reproduce computations from a GAP session, it is desirable to start GAP with a given set of GAP packages whose exact version numbers are prescribed. The idea is as follows. - In a GAP session, use the new function `PackagesLoaded` for collecting the names and version numbers of the currently loaded GAP packages. - Write this description to a file. - Set the new user preference `PrescribedPackageVersions`, with value the name of that file. - Start a new GAP session. The user preference will modify the autoload process such that exactly the GAP packages listed in the file will be loaded, with exactly the listed versions.
|
I like the idea. I wonder if at least a warning (and honestly, I'd be tempted to abort GAP, if the point is to ensure reproducability), if one of the package versions we expect to find is missing? Otherwise if someone loads a list of required packages and are missing one of the correct versions, that package just won't exist -- but that might not stop their calculation, just slow it down, if that package was optional. |
|
@ChrisJefferson The proposed code turns the prescribed packages (in the prescribed versions, since all other versions lying around get ignored) into needed packages of GAP. Thus one gets an error as soon as the first such package turns out to be not loadable. This is the error which one gets already now if for example the |
|
Ah, thanks. I think I didn't read carefully, I thought the packages still got loaded later when requested. |
It is not clear what we really want in this respect. The currently proposed code removes all information about packages that are not in the list of prescribed package versions. It is still possible to add a new package directory later in the GAP session, and then to load packages which can be found there. Shall we forbid this? Or shall we argue that adding a package directory does not happen silently, and users who do this can add other packages on top of the prescribed ones? |
|
A few years ago I would have said don't bother, but now I do have quite a bit of code that tries using PackageManager to install packages, and people have and maintain multiple package directories, and it might be nice to catch that. However, I don't think that's required from day one, and we can't stop people doing bad things if they really want to in GAP. |
|
@james-d-mitchell You had mentioned in a discussion during the recent GAP Days that you would like to get a better control of the loaded GAP packages. Is the current pull request helpful in this respect, and what else would you like to get? |
In order to reproduce computations from a GAP session, it is desirable to start GAP with a given set of GAP packages whose exact version numbers are prescribed.
The idea is as follows.
In a GAP session, use the new function
PackagesLoadedfor collecting the names and version numbers of the currently loaded GAP packages.Write this description to a file.
Set the new user preference
PrescribedPackageVersions, with value the name of that file.Start a new GAP session. The user preference will modify the autoload process such that exactly the GAP packages listed in the file will be loaded, with exactly the listed versions.
This is just a first proposal. There are things to discuss for example:
(One motivation is a remark in oscar-system/GAP.jl/issues/1189.)