Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using GAP does not see packages in ~/.gap/pkg #340

Closed
mohamed-barakat opened this issue Feb 10, 2020 · 5 comments
Closed

using GAP does not see packages in ~/.gap/pkg #340

mohamed-barakat opened this issue Feb 10, 2020 · 5 comments

Comments

@mohamed-barakat
Copy link
Contributor

mohamed-barakat commented Feb 10, 2020

I have the package ZariskiFrames and all its dependencies under ~/.gap/pkg. Indeed

$ ~/.julia/packages/GAP/ABCDE/gap.sh
gap> LoadPackage( "ZariskiFrames" );
true

However using GAP does not see the packages

julia> using GAP
Adding path ~/.julia/packages/GAP/ABCDE/gap/.libs to DL_LOAD_PATH
 ┌───────┐   GAP 4.dev of today
 │  GAP  │   https://www.gap-system.org
 └───────┘   Architecture: x86_64-apple-darwin19.3.0-julia64-kv7
 Configuration:  gmp 6.1.2, Julia GC, Julia 1.2.0, readline
 Loading the library and packages ...
 Packages:   GAPDoc 1.6.3, PrimGrp 3.4.0, SmallGrp 1.4.1, TransGrp 2.0.4
 Try '??help' for help. See also '?copyright', '?cite' and '?authors'

julia> LoadPackageAndExposeGlobals( "ZariskiFrames", Main, all_globals = true )
ERROR: cannot load package ZariskiFrames
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] #LoadPackageAndExposeGlobals#9(::Bool, ::Bool, ::typeof(LoadPackageAndExposeGlobals), ::String, ::Module) at ~/.julia/packages/GAP/C70xu/src/packages.jl:47
 [3] (::getfield(GAP, Symbol("#kw##LoadPackageAndExposeGlobals")))(::NamedTuple{(:all_globals,),Tuple{Bool}}, ::typeof(LoadPackageAndExposeGlobals), ::String, ::Module) at ./none:0
 [4] top-level scope at REPL[2]:1
@ThomasBreuer
Copy link
Member

@mohamed-barakat Yes, currently Julia starts its GAP with the -r option, see #284 .
This means that the contents of the user's ~/.gap directory is ignored.

For the moment, you can call GAP.Globals.ExtendRootDirectories( GAP.julia_to_gap( [ GAP.Globals.UserHomeExpand( g"~/.gap" ) ] ) ),
afterwards LoadPackageAndExposeGlobals should work.

I will create a pull request, in order to omit the -r option when starting GAP.

@ThomasBreuer
Copy link
Member

fixed by #341

@mohamed-barakat
Copy link
Contributor Author

@ThomasBreuer: Ah, I was unaware of the GAP command ExtendRootDirectories. Excellent, thank you very much.

@mohamed-barakat
Copy link
Contributor Author

mohamed-barakat commented Feb 14, 2020

@ThomasBreuer: Thank you very much for the fix by #341

@mohamed-barakat
Copy link
Contributor Author

mohamed-barakat commented Mar 4, 2020

For the moment, you can call GAP.Globals.ExtendRootDirectories( GAP.julia_to_gap( [ GAP.Globals.UserHomeExpand( g"~/.gap" ) ] ) ),
afterwards LoadPackageAndExposeGlobals should work.

I will create a pull request, in order to omit the -r option when starting GAP.

For the record: I tested it with another directory and it did not. What is missing is a trailing slash. So this works

GAP.Globals.ExtendRootDirectories( GAP.julia_to_gap( [ GAP.Globals.UserHomeExpand( g"~/.gap/" ) ] ) )

mohamed-barakat added a commit to homalg-project/HomalgProject.jl that referenced this issue Mar 4, 2020
this is a temporary solution until

oscar-system/GAP.jl#284

is merged.

See also

oscar-system/GAP.jl#340
mohamed-barakat added a commit to homalg-project/HomalgProject.jl that referenced this issue Mar 6, 2020
this is a temporary solution until

oscar-system/GAP.jl#284

is merged.

See also

oscar-system/GAP.jl#340
mohamed-barakat added a commit to homalg-project/HomalgProject.jl that referenced this issue Mar 6, 2020
this is a temporary solution until

oscar-system/GAP.jl#284

is merged.

See also

oscar-system/GAP.jl#340
mohamed-barakat added a commit to homalg-project/HomalgProject.jl that referenced this issue Mar 6, 2020
this is a temporary solution until

oscar-system/GAP.jl#284

is merged.

See also

oscar-system/GAP.jl#340
mohamed-barakat added a commit to homalg-project/HomalgProject.jl that referenced this issue Mar 6, 2020
this is a temporary solution until

oscar-system/GAP.jl#284

is merged.

See also

oscar-system/GAP.jl#340
mohamed-barakat added a commit to homalg-project/HomalgProject.jl that referenced this issue Mar 6, 2020
this is a temporary solution until

oscar-system/GAP.jl#284

is merged.

See also

oscar-system/GAP.jl#340
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants