GAP |
Main BranchesDownload Overview Data Libraries Packages Documentation Contacts FAQ GAP 3 |
|||||
SitemapNavigation Tree
|
Hints for GAP Package AuthorsChanges of the GAP package interface in GAP 4.4With the release of GAP 4.4 the package interface has been changed - unfortunately this leads to some small incompatibilities. On this page we will briefly list some reasons for the changes and explain what you should do to make your package usable with GAP 4.4. Furthermore we add some comments as to what you should change with your next update after GAP 4.4 has been released. This 2-step procedure cannot be avoided if you want to have a version which can run with GAP 4.3 and 4.4. Finally we explain how you can take advantage of a new mechanism to (re)distribute your package via the GAP website. We hope that you will find the necessary changes not too difficult and that you will enjoy the simplifications and improvements resulting from the changes. If you have further questions or need assistance don't hesitate to write to support@gap-system.org. The two chapters in the GAP manuals on using and creating packages have been adjusted to these changes, see sections 74 and 4 in the Reference Manual and Programming Reference Manual respectively. SummaryHere is a short TODO list. All points are explained in more detail below.
Why the changes?We noticed several unpleasant problems concerning the package loading in GAP and the distribution of package code with the core GAP system. To mention a few:
The basic idea to try to resolve all these problems at once was to introduce a file PackageInfo.g in the home directory of each package which contains all the meta-information as mentioned above. Using this information for all installed packages the package loading mechanism is greatly simplified and the init.g files become much simpler. Furthermore the meta-information allows the set up of an automatic procedure for a daily update of GAP's package overview webpage, package archives for redistribution and the combined package archives for convenient new installations of GAP including the latest package versions. How to prepare existing packages for use with GAP 4.4?To make your package loadable with GAP 4.4 you must create a "PackageInfo.g" file in the home directory of your package. Maybe the easiest way to do this is to take this PackageInfo.g file of the "Example" package as a template and to adjust the entries for your package. This template contains explanations of each entry, but if you strip the comments you see that it is not so long. (There is a utility in the development release: With 'ValidatePackageInfo( <filename> );' you can check your file.) Then remove a possibly explicit statement for printing a package banner (or reading a banner.g file) in your init.g file. That's it for the moment! Nevertheless, you should be aware of further changes in GAP 4.4, the most important ones are explained in the next section. Otherwise your package could become unusable with GAP 4.5. Note for users of the GAP4-dev versionMany of you have already produced a PackageInfo.g file during the development process of the new mechanisms. But maybe you have to adjust a few details which were changed or added recently:
How to adjust a package after the release of GAP 4.4?There are further changes in GAP which will probably lead to little changes in most packages. In particular some functions and variable names are made obsolete and will be removed in GAP 4.5. If you are happy with a new release of your package together with the GAP 4.4 release you may incorporate the changes explained here now. But then the package can no longer be used with the current version GAP 4.3. With the new package loading mechanism the following commands become obsolete: "DeclarePackage", "DeclareAutoPackage", "DeclarePackageDocumentation", "DeclarePackageAutoDocumentation" and "RequirePackage". All the corresponding lines in your init.g file can be deleted. The new loading mechanism gets the information given in the arguments of these functions from equivalent information in the PackageInfo.g file. You don't need to load other packages explicitly any longer (see the .Dependencies entry in PackageInfo.g). Also, the availability test function (so far given as third argument in Declare(Auto)Package) does no longer need to test the availabitiy of other packages explicitly. By the way, a package is now loaded explicitly with the new command "LoadPackage" (but, as said, you probably don't need this in your package code). We noticed that the names of functions concerning packages were spelled inconsistently. We have now made all commands containing the substring "Pkg" obsolete and substituted them by the corresponding commands with the substring "Package". In particular the change from "ReadPkg" to the new "ReadPackage" is relevant for init.g and read.g files of most packages. Some packages use certain (undocumented) global variables (for example, "VERSION", "BANNER", "QUIET", ..., see the file lib/obsolete.g in the pre-release for a complete list). All of these are obsolete now, their values are now stored as entries in a record named "GAPInfo". But maybe you just don't need these any longer with the new package loading. With the new package loading mechanism the file pkg/ALLPKG becomes unnecessary. So, it doesn't need to be mentioned in README files or the documentation after the release of GAP 4.4.
Starting from GAP 4.4 there is also more freedom for file and directory
names. Some packages already gave up the rule that file names should use
only lowercase letters and be of length at most 8 with an extension of length
at most 3. Longer filenames and mixed case spelling doesn't seem to be a
problem any longer on all systems which allow to run GAP 4. Note, however,
that the filenames must remain unique in case that they are converted to
lowercase (for instande FileName.G and filename.g together are not allowed).
How to set up a package for the new archive update mechanism?We are setting up the following service for package maintainers using an automatic update mechanism.
The best possibility to take part in this service is to submit your package to our formal refereeing system such that it becomes an "accepted" refereed package. A package can become a "deposited" package upon agreement with the GAP Group. For this the package must load properly and not produce conflicts with other distributed packages, and it must contain a README file with installation instructions and a documentation of its functionality which is available via the GAP help system. What you have to do to take part in the automatic update mechanism is also explained in the example PackageInfo.g file mentioned above:
Once your package is in the update system, it is easy to publish updates of your package:
|
|||||
The GAP Group Last updated: Wed Dec 21 12:36:22 2005 |