Skip to content

Which packages to load by default? #906

Closed
@olexandr-konovalov

Description

This came from testing https://github.com/gap-system/gap-container today. We have started to discuss this with @markuspf - perhaps worth to create an issue here.

When the core GAP system is started and packages are not present (except GAPDoc), a series of warnings is displayed:

$ gap   
 *********   GAP 4.8.5, 25-Sep-2016, build of 2016-09-27 14:15:44 (UTC)
 *  GAP  *   http://www.gap-system.org
 *********   Architecture: x86_64-pc-linux-gnu-gcc-default64
 Libs used:  gmp, readline
 Loading the library and packages ...
#I  autpgrp package is not available. Check that the name is correct
#I  and it is present in one of the GAP root directories (see '??RootPaths')
#I  alnuth package is not available. Check that the name is correct
#I  and it is present in one of the GAP root directories (see '??RootPaths')
#I  crisp package is not available. Check that the name is correct
#I  and it is present in one of the GAP root directories (see '??RootPaths')
#I  ctbllib package is not available. Check that the name is correct
#I  and it is present in one of the GAP root directories (see '??RootPaths')
#I  factint package is not available. Check that the name is correct
#I  and it is present in one of the GAP root directories (see '??RootPaths')
#I  fga package is not available. Check that the name is correct
#I  and it is present in one of the GAP root directories (see '??RootPaths')
#I  irredsol package is not available. Check that the name is correct
#I  and it is present in one of the GAP root directories (see '??RootPaths')
#I  laguna package is not available. Check that the name is correct
#I  and it is present in one of the GAP root directories (see '??RootPaths')
#I  polenta package is not available. Check that the name is correct
#I  and it is present in one of the GAP root directories (see '??RootPaths')
#I  polycyclic package is not available. Check that the name is correct
#I  and it is present in one of the GAP root directories (see '??RootPaths')
#I  resclasses package is not available. Check that the name is correct
#I  and it is present in one of the GAP root directories (see '??RootPaths')
#I  sophus package is not available. Check that the name is correct
#I  and it is present in one of the GAP root directories (see '??RootPaths')
#I  tomlib package is not available. Check that the name is correct
#I  and it is present in one of the GAP root directories (see '??RootPaths')
 Components: trans 1.0, prim 2.1, small* 1.0, id* 1.0
 Packages:   GAPDoc 1.5.1
 Try '??help' for help. See also '?copyright', '?cite' and '?authors'
gap> 

First of all, if you're using the GAP core without packages and want to avoid these warnings, start GAP with -A option.

Second, why this list of packages is as such? This is defined in lib/package.gi:

# The packages to load during startup can be specified via a user preference.
DeclareUserPreference( rec(
  name:= "PackagesToLoad",
  description:= [
    "A list of names of packages which should be loaded during startup. \
For backwards compatibility, the default lists most of packages \
that were autoloaded in GAP 4.4 (add or remove packages as you like)."
    ],
  default:= [ "autpgrp", "alnuth", "crisp", "ctbllib", "factint", "fga", 
              "irredsol", "laguna", "polenta", "polycyclic", "resclasses", 
              "sophus", "tomlib" ],
  values:= function() return RecNames( GAPInfo.PackagesInfo ); end,
  multi:= true,
  ) );

Indeed the comment is right in saying "most of packages" as in a version of GAP 4.4.12 that I've just compiled, I have the following packaged loaded by default:

AClib 1.1, Polycyclic 2.8.1, Alnuth 2.3.1, AutPGrp 1.4, CrystCat 1.1.3, Cryst 4.1.6, CRISP 1.3.4, CTblLib 1.1.3, TomLib 1.1.4, FactInt 1.5.3, GAPDoc 1.3, FGA 1.1.0.1, IRREDSOL 1.2, LAGUNA 3.5.0, Sophus 1.23, Polenta 1.2.7, ResClasses 3.0.0

so AClib and CrystCat were omitted.

Third, do we want to revise this list? IIRC the intention was to keep it as such for backwards compatibility in GAP 4.5, and return to it later. IMHO we should only revise it by reducing it (either by not loading a package or by making it needed to run GAP), and if we decide why some packages should stay in this user preference then it may be good to keep that decision recorded under this issue. I've created a checklist and suggest to collect comments on individual packages under this issue.

  • autpgrp
  • alnuth
  • atlasrep
  • crisp
  • ctbllib
  • factint
  • fga
  • irredsol
  • laguna : ok to remove from packages loaded by default
  • polenta
  • polycyclic
  • resclasses
  • sophus
  • tomlib

I think these packages fall into two categories: those which may be used by the library if they are marked for loading (atlasrep, though it is not in the default list, and also factint and tomlib) and the rest.

(Updated: the last paragraph seems unclear because any package is used by the library. Here is what I had in mind: sometimes, we can use ShowPackageVariables to detect e.g. that the package installs new method for an operation defined in the library, and in this case we can decide when the method from the package is used from a well-defined mechanisms. But other cases when the library calls IsPackageMarkedForLoading and then calculation goes one way or another dependently on the availability of the package, can not be decided looking at the package - they can be figured out only if you look at the corresponding library code. That's the main difference between these two cases).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Labels

kind: discussiondiscussions, questions, requests for comments, and so ontopic: packagesissues or PRs related to package handling, or specific to a package (for packages w/o issue tracker)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions