Skip to content

Commit

Permalink
Remove obsolete code dealing with 'Revision' gvar (#5534)
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin authored Dec 4, 2023
1 parent 9a21937 commit adbd5b7
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions lib/package.gi
Original file line number Diff line number Diff line change
Expand Up @@ -3167,7 +3167,6 @@ InstallGlobalFunction( PackageVariablesInfo, function( pkgname, version )
# Save the relevant global variables, and replace them.
GAPInfo.data:= rec( userGVars:= NamesUserGVars(),
varsThisPackage:= [],
revision_components:= [],
pkgpath:= test,
pkgname:= pkgname );

Expand Down Expand Up @@ -3202,7 +3201,7 @@ InstallGlobalFunction( PackageVariablesInfo, function( pkgname, version )
UnbindGlobal( "ReadPackage" );
localBindGlobal( "ReadPackage",
function( arg )
local pos, pkgname, before, cbefore, res, after, cafter;
local pos, pkgname, before, res, after;
if Length( arg ) = 1 then
pos:= Position( arg[1], '/' );
pkgname:= LowercaseString( arg[1]{[ 1 .. pos - 1 ]} );
Expand All @@ -3213,20 +3212,12 @@ InstallGlobalFunction( PackageVariablesInfo, function( pkgname, version )
fi;
if pkgname = GAPInfo.data.pkgname then
before:= NamesUserGVars();
if IsBoundGlobal( "Revision" ) then
cbefore:= RecNames( ValueGlobal( "Revision" ) );
fi;
fi;
res:= CallFuncList( GAPInfo.data.ReadPackage, arg );
if pkgname = GAPInfo.data.pkgname then
after:= NamesUserGVars();
UniteSet( GAPInfo.data.varsThisPackage,
Filtered( Difference( after, before ), IsBoundGlobal ) );
if IsBoundGlobal( "Revision" ) then
cafter:= RecNames( ValueGlobal( "Revision" ) );
UniteSet( GAPInfo.data.revision_components,
Difference( cafter, cbefore ) );
fi;
fi;
return res;
end );
Expand Down Expand Up @@ -3385,13 +3376,6 @@ InstallGlobalFunction( PackageVariablesInfo, function( pkgname, version )
guesssource( nam ) ] ) ] );
fi;

# Have new components been added to `Revision'?
if not IsEmpty( GAPInfo.data.revision_components ) then
Add( result, [ "new components of the outdated 'Revision' record",
List( GAPInfo.data.revision_components,
x -> [ [ x, "", "" ], [ fail, fail ] ] ) ] );
fi;

# Delete the auxiliary component from `GAPInfo'.
Unbind( GAPInfo.data );

Expand Down

0 comments on commit adbd5b7

Please sign in to comment.