[GAP Forum] 'test' GAP Package

Thomas Breuer thomas.breuer at math.rwth-aachen.de
Fri Dec 1 11:22:45 GMT 2006


Dear GAP Forum,

Alexandra Alecu wrote

> I am going through the 'Extending GAP' document and I am trying to create
> the 'test' package (see section 4.3) (see
> http://www.gap-system.org/Manuals/doc/htm/ext/CHAP004.htm#SECT003).
> 
> I have followed the steps detailed there, but I am getting the following
> message when I try to LoadPackage("test").
> 
> Record : '<rec>.Dependencies' must have an assigned value at
> dep := inforec.Dependencies;
> called from
> TestPackageAvailability( name, version ) called from
> <function>( <arguments> ) called from read-eval-loop
> Entering break read-eval-print loop ...

Thanks for this report.
Currently GAP erroneously assumes that the package information record
contains a component `Dependencies',
and the manual example is not aware of this assumption.

For running the example with the current version of GAP,
one can add one line to the proposed contents of the
`PackageInfo.g' file for a test package, as follows.

    SetPackageInfo( rec(
      PackageName := "test",
      Version := "1.0",
      AvailabilityTest := ReturnTrue,
      Autoload := false,
      Dependencies := rec(),             # This line was added!
      BannerString := Concatenation( [
          "#I  loading the GAP package ``test'' in version ",
          ~.Version, "\n" ] ),
      PackageDoc := rec(
          BookName  := "test",
          SixFile   := "doc/manual.six",
          Autoload  := true ) ) );

With the next version of GAP,
the `Dependencies' component will be regarded as optional,
so the original manual example will work.

Sorry for the inconveniences.

Kind regards,
Thomas Breuer




More information about the Forum mailing list