You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
module MyPackage
using GAP
GAP.Globals.LoadPackage( GAP.julia_to_gap( "ctbllib" ) ) # or any other package
g = GAP.Globals.SymmetricGroup( 3 ) # pointer to a global variable that will be needed
function deal_with_g()
return GAP.Globals.Size( g )
end
end # module
If one creates a proper Julia package from this (with dependency on GAP.jl listed in Project.toml) then the first using MyPackage will create a .ji file for MyPackage.
Leave Julia, start Julia anew, and call using MyPackage.
Now GAP is running, the Julia variable MyPackage.g exists, but the GAP object to which it shall point has not been created.
Analogously, GAP claims that the GAP package in question has not been loaded.
This is because the statements in MyPackage.jl are not executed w.r.t. the GAP that has been started now but w.r.t. the GAP that was used at compile time.
What is an elegant workaround for this situation?
I think it is quite common to have initializations of this kind.
The text was updated successfully, but these errors were encountered:
Consider the following file
MyPackage.jl
.If one creates a proper Julia package from this (with dependency on
GAP.jl
listed inProject.toml
) then the firstusing MyPackage
will create a.ji
file forMyPackage
.Leave Julia, start Julia anew, and call
using MyPackage
.Now GAP is running, the Julia variable
MyPackage.g
exists, but the GAP object to which it shall point has not been created.Analogously, GAP claims that the GAP package in question has not been loaded.
This is because the statements in
MyPackage.jl
are not executed w.r.t. the GAP that has been started now but w.r.t. the GAP that was used at compile time.What is an elegant workaround for this situation?
I think it is quite common to have initializations of this kind.
The text was updated successfully, but these errors were encountered: