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

Make gap/ a GAP root directory #4591

Merged
merged 5 commits into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 7 additions & 6 deletions src/Oscar.jl
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ function __init__()
# `Julia.Oscar` if Oscar is loaded indirectly as a package dependency)
GAP.Globals.BindGlobal(GapObj("Oscar_jl"), Oscar)

# Add the directory `gap/` as a GAP root path, so that GAP can find the
# OscarInterface package and we can overload specific GAP library files.
GAP.Globals.ExtendRootDirectories(GapObj([abspath(joinpath(@__DIR__, "..", "gap"))]; recursive = true))

# We need some GAP packages (currently with unspecified versions).
for pkg in [
"atlasrep",
Expand All @@ -104,14 +108,11 @@ function __init__()
"smallgrp", # small groups library
"transgrp", # transitive groups library
"wedderga", # provides a function to compute Schur indices
"OscarInterface", # contains all GAP code that is part of Oscar
]
GAP.Packages.load(pkg) || error("cannot load the GAP package $pkg")
end
# Load the OscarInterface package in the end.
# It needs some other GAP packages,
# and is not needed by packages that can be loaded before Oscar.
GAP.Globals.SetPackagePath(GAP.Obj("OscarInterface"), GAP.Obj(joinpath(@__DIR__, "..", "gap", "OscarInterface")))
GAP.Globals.LoadPackage(GAP.Obj("OscarInterface"), false)

# Switch off GAP's info messages,
# also those that are triggered from GAP packages.
__GAP_info_messages_off()
Expand Down Expand Up @@ -240,7 +241,7 @@ include("Groups/Groups.jl")

include("GAP/GAP.jl")

include("../gap/OscarInterface/julia/alnuth.jl")
include("../gap/pkg/OscarInterface/julia/alnuth.jl")


include("Modules/Modules.jl")
Expand Down
Loading