Skip to content

Conversation

@orlitzky
Copy link

@orlitzky orlitzky commented Feb 6, 2024

This is helpful when installing GAP and its packages one-at-a-time, running the test suites along the way (i.e. how the Gentoo package manager installs things). Before all of smallgrp, primgrp, transgrp, and gapdoc are installed, passing --bare to gap is needed to avoid startup errors. But in that case, transgrp needs to load them explicitly for its test suite to pass.

To help resolve the chicken and egg problem, it's nice to be able to
launch gap with --bare when testing transgrp. But without GAPDoc and
SmallGrp loaded, the test suite fails. So let's load them explicitly.
This won't hurt anything under normal circumstances where both of them
are loaded anyway.
@fingolfin
Copy link
Collaborator

Could you clarify which parts of the test suite require GAPDoc or smallgrps? Note that transgrp does not use GAPDoc for its documentation, so I find this very surprising.

When I try gap --bare -A tst/testall.g in this package, I do get an immediate error -- inside the GAP function Test, which requires GAPDoc...

Loading GAPDoc in each TestFile of every package does not seem like a good way to deal with this.

All in all, the GAP library itself really depends on smallgrp, primgrp, transgrp, and gapdoc being installed. The only reason --bare exists is to facilitate certain bootstrapping operations for some people, it is not safe to use in general.

@orlitzky
Copy link
Author

orlitzky commented Feb 6, 2024

Could you clarify which parts of the test suite require GAPDoc or smallgrps? Note that transgrp does not use GAPDoc for its documentation, so I find this very surprising.

The SmallGrp requirement looks to be new in 4.13.0-alpha1:

testing: /var/lib/portage/tmp/portage/dev-gap/transgrp-3.6.5/temp/pkg/transgrp\
/tst/bugfix-2013-05-16-t00291.tst
    3234 ms (187 ms GC) and 598MB allocated for bugfix-2013-05-16-t00291.tst
testing: /var/lib/portage/tmp/portage/dev-gap/transgrp-3.6.5/temp/pkg/transgrp\
/tst/trans.tst
########> Diff in /var/lib/portage/tmp/portage/dev-gap/transgrp-3.6.5/tem\
p/pkg/transgrp/tst/trans.tst:48
# Input is:
for n in [2..15] do
  for i in [1..NrTransitiveGroups(n)] do
     s := Random(SymmetricGroup(n));
     if TransitiveIdentification(TransitiveGroup(n,i)^s) <> i then
       Print("TransitiveIdentification error for TransitiveGroup(",
             n,",",i,") and s=", s, "\n");
     fi;
  od;
od;
# Expected output:
# But found:
Error, the Small Groups identification is required but not installed
########
########> Diff in /var/lib/portage/tmp/portage/dev-gap/transgrp-3.6.5/tem\
p/pkg/transgrp/tst/trans.tst:64
# Input is:
i=List(h,TransitiveIdentification);
# Expected output:
true
# But found:
Error, the Small Groups identification is required but not installed
########
    7069 ms (358 ms GC) and 1.05GB allocated for trans.tst
-----------------------------------
total     10303 ms (545 ms GC) and 1.63GB allocated
              2 failures in 1 of 2 files

#I  Errors detected while testing

When I try gap --bare -A tst/testall.g in this package, I do get an immediate error -- inside the GAP function Test, which requires GAPDoc...

Loading GAPDoc in each TestFile of every package does not seem like a good way to deal with this.

A priori it would only be needed for gapdoc, smallgrp, primgrp, and transgrp. We don't use --bare for anything else; see below. GAPdoc won't forget to load itself, and smallgrp and primgrp seem fine without any changes, so it's only this once instance that I've had to tweak.

All in all, the GAP library itself really depends on smallgrp, primgrp, transgrp, and gapdoc being installed. The only reason --bare exists is to facilitate certain bootstrapping operations for some people, it is not safe to use in general.

We're only using --bare when installing/testing those four packages. Everything else has an implicit dependency on those four.

Ultimately it would be possible to have each of the four depend on all of the others, but that can lead to some confusing error messages. (Basically, the package manager will want you to disable testing, install those four, re-enable testing, and then reinstall them. But it isn't smart enough to explain that.) Instead, so long as it happens to work, it's a lot nicer to have gapdoc < smallgrp,primgrp < transgrp installed in that order using --bare for testing.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants