Skip to content

Commit b19b166

Browse files
committed
Use IsExistingFileInPackageForHomalg
1 parent 1a2f29a commit b19b166

File tree

3 files changed

+5
-17
lines changed

3 files changed

+5
-17
lines changed

CAP/PackageInfo.g

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ PackageDoc := rec(
9898
Dependencies := rec(
9999
GAP := ">= 4.9.1",
100100
NeededOtherPackages := [ [ "AutoDoc", ">= 2016.02.16" ],
101-
[ "ToolsForHomalg", ">= 2021.05-02" ],
101+
[ "ToolsForHomalg", ">= 2021.08-01" ],
102102
[ "io", ">=0" ],
103103
],
104104
SuggestedOtherPackages := [ [ "Browse", ">=0" ],

CAP/gap/LimitConvenience.gi

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
InstallGlobalFunction( "CAP_INTERNAL_GENERATE_CONVENIENCE_METHODS_FOR_LIMITS",
88
function ( package_name, method_name_record, limits )
9-
local output_string, generate_universal_morphism_convenience, generate_functorial_convenience_method, number_of_diagram_arguments, functorial_record, filter_list, input_type, replaced_filter_list, replaced_filter_list_string, arguments_string, source_diagram_arguments_string, range_diagram_arguments_string, source_diagram_input_type, range_diagram_input_type, call_arguments_string, limit, existing_string, output_path;
9+
local output_string, generate_universal_morphism_convenience, generate_functorial_convenience_method, number_of_diagram_arguments, functorial_record, filter_list, input_type, replaced_filter_list, replaced_filter_list_string, arguments_string, source_diagram_arguments_string, range_diagram_arguments_string, source_diagram_input_type, range_diagram_input_type, call_arguments_string, limit, output_path;
1010

1111
output_string :=
1212
"""# SPDX-License-Identifier: GPL-2.0-or-later
@@ -562,9 +562,7 @@ InstallGlobalFunction( "CAP_INTERNAL_GENERATE_CONVENIENCE_METHODS_FOR_LIMITS",
562562

563563
od;
564564

565-
existing_string := ReadFileFromPackageForHomalg( package_name, "LimitConvenienceOutput.gi" );
566-
567-
if output_string <> existing_string then
565+
if not IsExistingFileInPackageForHomalg( package_name, "LimitConvenienceOutput.gi" ) or output_string <> ReadFileFromPackageForHomalg( package_name, "LimitConvenienceOutput.gi" ) then
568566

569567
output_path := Filename( DirectoryTemporary( ), "LimitConvenienceOutput.gi" );
570568

CompilerForCAP/gap/PrecompileCategory.gi

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -535,21 +535,11 @@ InstallGlobalFunction( "CapJitPrecompileCategory", function ( category_construct
535535
end );
536536

537537
InstallGlobalFunction( "CapJitPrecompileCategoryAndCompareResult", function ( category_constructor, given_arguments, package_name, compiled_category_name )
538-
local filepath, dirs, complete_path, old_file_content, new_file_content;
538+
local filepath, old_file_content, new_file_content;
539539

540540
filepath := Concatenation( "precompiled_categories/", compiled_category_name, ".gi" );
541541

542-
dirs := DirectoriesPackageLibrary( package_name, "gap" );
543-
544-
if Length( dirs ) <> 1 then
545-
546-
Error( Concatenation( "could not find gap directory of package ", package_name ) );
547-
548-
fi;
549-
550-
complete_path := Filename( dirs[1], filepath );
551-
552-
if IsExistingFile( complete_path ) then
542+
if IsExistingFileInPackageForHomalg( package_name, filepath ) then
553543

554544
old_file_content := ReadFileFromPackageForHomalg( package_name, filepath );
555545

0 commit comments

Comments
 (0)