4.10 Package Completion

Reading a larger package can take a few moments and will take up user workspace. This might be a nuisance to users, especially if the package is loaded automatically. The same problem of course affects the library, the problem there is solved using completion files (see completion files in the reference manual).

Completion files make it possible to read only short function headers initially which are completed to full functions only if the functions are actually called. This section explains how to set up completion for a share package:

Completion works for those files which are read (using ReadPkg) from the read.g file. (This is no real restriction as completion affects only the implementation part.) To create completion files, load the share package. Then issue the command

  • CreateCompletionFilesPkg(pkgname)

    This will create a new file read.co in the share packages home directory (so you must have write permissions there). When reading the share package this file is used in place of read.g if it exists and automatically takes care of completion.

    When you change files which are completed, GAP will complain about non-matching CRC files and will not load them. In this case remove the read.co file and create it anew.

    As a share package author you should consider including a completion file with the package.

    If you start GAP with the command line option -D, it displays information about reading and completion, the command line option -N turns completion off (as if all .co files were erased).

    [Top] [Previous] [Up] [Next] [Index]

    GAP 4 manual
    February 2000