Skip to content

Commit

Permalink
Removed provisional code for coexisting data libs and packages
Browse files Browse the repository at this point in the history
PR #1714 added some code needed to load either a new package for
a data library, if present, or load the existing prim, small or
trans directory otherwise. This code is not needed any more,
since we remove prim, trans, and small directories.

Also make PrimGrp, SmallGrp and TransGrp packages needed to run
GAP. This ensures that a proper error message will be displayed
in case any of these packages is missing.
  • Loading branch information
Alexander Konovalov committed Nov 6, 2017
1 parent 81a9e24 commit c008388
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 99 deletions.
19 changes: 0 additions & 19 deletions hpcgap/lib/package.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1819,25 +1819,6 @@ BindGlobal( "BANNER", false );

GAPInfo.delayedImplementationParts:= [];

# Ensure GAP loads PrimGrp, SmallGrp and TransGrp packages
# To be migrated to lib/system.g after the replacement of
# prim, small and trans directories by these packages
if TestPackageAvailability("primgrp") <> fail then
GAPInfo.Dependencies.NeededOtherPackages :=
`Concatenation( ShallowCopy(GAPInfo.Dependencies.NeededOtherPackages),
[ [ "primgrp", ">= 3.1.0" ] ]);
fi;
if TestPackageAvailability("smallgrp") <> fail then
GAPInfo.Dependencies.NeededOtherPackages :=
`Concatenation( ShallowCopy(GAPInfo.Dependencies.NeededOtherPackages),
[ [ "smallgrp", ">= 1.0" ] ]);
fi;
if TestPackageAvailability("transgrp") <> fail then
GAPInfo.Dependencies.NeededOtherPackages :=
`Concatenation( ShallowCopy(GAPInfo.Dependencies.NeededOtherPackages),
[ [ "transgrp", ">= 1.0" ] ]);
fi;

# Load the needed other packages (suppressing banners)
# that are not yet loaded.
if ForAny( GAPInfo.Dependencies.NeededOtherPackages,
Expand Down
5 changes: 5 additions & 0 deletions hpcgap/lib/system.g
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,13 @@ BIND_GLOBAL( "GAPInfo", AtomicRecord(rec(
Dependencies := rec(
NeededOtherPackages := `[
[ "gapdoc", ">= 1.2" ],
[ "primgrp", ">= 3.1.0" ],
[ "smallgrp", ">= 1.0" ],
[ "transgrp", ">= 1.0" ],
],
),
# There is no SuggestedOtherPackages here because the default value of
# the user preference PackagesToLoad does the job

HasReadGAPRC:= false,

Expand Down
13 changes: 0 additions & 13 deletions lib/package.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1814,19 +1814,6 @@ BindGlobal( "BANNER", false );

GAPInfo.delayedImplementationParts:= [];

# Ensure GAP loads PrimGrp, SmallGrp and TransGrp packages
# To be migrated to lib/system.g after the replacement of
# prim, small and trans directories by these packages
if TestPackageAvailability("primgrp") <> fail then
Add( GAPInfo.Dependencies.NeededOtherPackages, [ "primgrp", ">= 3.1.0" ] );
fi;
if TestPackageAvailability("smallgrp") <> fail then
Add( GAPInfo.Dependencies.NeededOtherPackages, [ "smallgrp", ">= 1.0" ] );
fi;
if TestPackageAvailability("transgrp") <> fail then
Add( GAPInfo.Dependencies.NeededOtherPackages, [ "transgrp", ">= 1.0" ] );
fi;

# Load the needed other packages (suppressing banners)
# that are not yet loaded.
if ForAny( GAPInfo.Dependencies.NeededOtherPackages,
Expand Down
64 changes: 0 additions & 64 deletions lib/read.g
Original file line number Diff line number Diff line change
Expand Up @@ -10,70 +10,6 @@ ReadOrComplete( "lib/read7.g" ); # character theory stuff
ReadOrComplete( "lib/read8.g" ); # overloaded operations, compiler interface
ReadLib( "colorprompt.g" );


#############################################################################
##
## Load data libraries
## The data libraries which may be absent cannot be completed, therefore
## they must be read in here!

#############################################################################
##
#X Read library of groups of small order
#X Read identification routine
##
if TestPackageAvailability("smallgrp")=fail then
ReadSmall( "readsml.g","small groups" );
fi;

#############################################################################
##
#X Checking transitive groups library
##
## Assign TransitiveGroupsAvailable to a dummy function to make it
## callable, even if the library is unavailable.
if TestPackageAvailability("transgrp")=fail then
InstallGlobalFunction(TransitiveGroupsAvailable,deg->false);
fi;

# Only load component if not available as package
# (to be removed together with the `trans` directory)
if TestPackageAvailability("transgrp")=fail then
TRANS_AVAILABLE:=ReadTrans( "trans.gd","transitive groups" );
TRANS_AVAILABLE:= TRANS_AVAILABLE and ReadTrans( "trans.grp",
"transitive groups" );
TRANS_AVAILABLE:= TRANS_AVAILABLE and ReadTrans( "trans.gi",
"transitive groups" );
fi;

#############################################################################
##
#X Checking primitive groups library
##
## Assign PrimitiveGroupsAvailable to a dummy function to make it
## callable, even if the library is unavailable.
if TestPackageAvailability("primgrp")=fail then
InstallGlobalFunction(PrimitiveGroupsAvailable,deg->false);
fi;

# Only load component if not available as package
# (to be removed together with the `prim` directory)
if TestPackageAvailability("primgrp")=fail then
PRIM_AVAILABLE:=ReadPrim( "primitiv.gd","primitive groups" );
PRIM_AVAILABLE:=PRIM_AVAILABLE and ReadPrim( "irredsol.gd","irreducible solvable groups" );
PRIM_AVAILABLE:=PRIM_AVAILABLE and ReadPrim( "primitiv.grp",
"primitive groups" );
PRIM_AVAILABLE:=PRIM_AVAILABLE and ReadPrim( "primitiv.gi",
"primitive groups" );

PRIM_AVAILABLE:=PRIM_AVAILABLE and ReadPrim( "irredsol.grp",
"irreducible solvable groups" );
PRIM_AVAILABLE:=PRIM_AVAILABLE and ReadPrim( "irredsol.gi",
"irreducible solvable groups" );
PRIM_AVAILABLE:=PRIM_AVAILABLE and ReadPrim( "cohorts.grp",
"irreducible solvable groups" );
fi;

#############################################################################
##
#E
Expand Down
8 changes: 5 additions & 3 deletions lib/system.g
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ BIND_GLOBAL( "GAPInfo", rec(
Dependencies := rec(
NeededOtherPackages := [
[ "gapdoc", ">= 1.2" ],
[ "primgrp", ">= 3.1.0" ],
[ "smallgrp", ">= 1.0" ],
[ "transgrp", ">= 1.0" ],
],
),
# There is no SuggestedOtherPackages here because the default value of
# the user preference PackagesToLoad does the job

# There is no SuggestedOtherPackages here because the default value of
# the user preference PackagesToLoad does the job

HasReadGAPRC:= false,

Expand Down

0 comments on commit c008388

Please sign in to comment.