oscar-system / GAP.jl

GAP packages for Julia integration
https://oscar-system.github.io/GAP.jl/
GNU Lesser General Public License v3.0
68 stars 22 forks source link

Suppress GAP warnings/errors when loading/installing messages #650

Open fingolfin opened 3 years ago

fingolfin commented 3 years ago

Right now, in a fresh Oscar installation, users are treated to this "error" message:

Error: Cannot load 'Ferret' due to missing binary library
Please run './configure; make' in the 'pkg/ferret' directory
#I  Getting PackageInfo URLs...
#I  Retrieving PackageInfo.g from https://gap-packages.github.io/ferret/PackageInfo.g ...
#I  Downloading archive from URL https://github.com/gap-packages/ferret/releases/download/v1.0.5/ferret-1.0.5.tar.gz ...
#I  Saved archive to /tmp/tmGKP9kp/ferret-1.0.5.tar.gz
#I  Extracting to /home/runner/.julia/gaproot/v4.11/pkg/ferret-1.0.5 ...
#I  Checking dependencies for ferret...
#I    GAPDoc >= 1.5: true
#I  Running compilation script on /home/runner/.julia/gaproot/v4.11/pkg/ferret-1.0.5 ...

Of course this "error" is in reality completely harmless, but the user can't know that. We should therefore not show it to them.

(The first two lines of this were actually printed by ferret's AvailabilityTest function, which was a bug in ferret; this has been fixed in 1.0.3, so with the most recent switch to GAP 4.11.1, I think this part may be gone)

To this end we could add an option "silent" (or "quiet", or conversely: "verbose") to Package.install, to suppress this output.

Whether we default to showing it or hiding it: I'd say show it, for interactive use; but in Oscar.jl, and other code which programmatically calls this, we can then use the option to suppress the output.

fingolfin commented 3 years ago

Actually, that first part will be gone once we make a new GAP.jl release. Which we really should do soon. But first: I should finish wrapping up the latest GAP master into a fresh JLL...