From c351e6cf82442d1a770f1bda1dd2d08b19adbaf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Thu, 19 Sep 2024 18:04:27 +0200 Subject: [PATCH 1/2] Disable caching of julia modules in julia module storage --- pkg/JuliaInterface/gap/JuliaInterface.gi | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/JuliaInterface/gap/JuliaInterface.gi b/pkg/JuliaInterface/gap/JuliaInterface.gi index 5da6d7dc2..5eda53186 100644 --- a/pkg/JuliaInterface/gap/JuliaInterface.gi +++ b/pkg/JuliaInterface/gap/JuliaInterface.gi @@ -61,7 +61,6 @@ InstallMethod( \., global_variable := _JuliaFunction( global_variable ); elif _JULIA_ISA( global_variable, _JULIA_MODULE_TYPE ) then global_variable := _WrapJuliaModule( rnam, global_variable ); - \.\:\=( module!.storage, rnum, global_variable ); fi; return global_variable; From d9b2abb9bb880efdcac2e69e541933baf4722dca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Thu, 19 Sep 2024 18:04:33 +0200 Subject: [PATCH 2/2] Add test --- pkg/JuliaInterface/tst/utils.tst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/JuliaInterface/tst/utils.tst b/pkg/JuliaInterface/tst/utils.tst index 6100358d6..a12ee1dea 100644 --- a/pkg/JuliaInterface/tst/utils.tst +++ b/pkg/JuliaInterface/tst/utils.tst @@ -103,5 +103,15 @@ gap> path:= GetJuliaScratchspace( "test_scratch" );; gap> IsDirectoryPath( path ); true +# Julia modules should not get cached, see #1044 +gap> JuliaEvalString("module foo x = 1 end"); + +gap> Julia.foo.x; +1 +gap> JuliaEvalString("module foo x = 2 end"); + +gap> Julia.foo.x; +2 + ## gap> STOP_TEST( "utils.tst" );