Skip to content

Commit

Permalink
Ensure Ncurses_jll is new enough
Browse files Browse the repository at this point in the history
Since 6.4.1 it sets TERMINFO_DIRS automatically, so we can get rid of
our workaround for setting it before loading GAP.

That workaround was always incomplete anyway, because while it worked
for GAP's builtin GNU readline support, it is also needed for the
`Browse` packages. But for that it only works if `Browse` is loaded
during GAP startup, which is not always the case: with a fresh GAP.jl
installation, won't have been compiled yet. The user may now try to
compile/install it via `GAP.Packages.install` resp. `GAP.Packages.load`.

All kinds of things can go wrong at that point (including that it may
end up linking against the "wrong").

Note that we do not even load `Ncurses_jll` directly; this is done
indirectly via `GAP_jll`. So the only reason it now appears in
`Project.toml` is to ensure a "new enough" version of it is used. At
some point in the future this should probably instead be moved to
`GAP_jll`.
  • Loading branch information
fingolfin committed Jul 6, 2023
1 parent 43288a5 commit 87ca4a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ GMP_jll = "781609d7-10c4-51f6-84f2-b8444358ff6d"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
Ncurses_jll = "68e3532b-a499-55ff-9963-d1c0c0748b3a"
Pidfile = "fa939f87-e72e-5be4-a000-7fc836dbe307"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
Expand All @@ -24,6 +25,7 @@ GAP_jll = "~400.1200.101"
GAP_lib_jll = "~400.1201.100"
GAP_pkg_juliainterface_jll = "=0.800.201, =0.800.202"
MacroTools = "0.5"
Ncurses_jll = "6.4.1"
Pidfile = "1.3"
Scratch = "1.1"
julia = "1.6"
8 changes: 1 addition & 7 deletions src/GAP.jl
Original file line number Diff line number Diff line change
Expand Up @@ -286,13 +286,7 @@ function __init__()
push!(cmdline_options, "-b")
end


# The following withenv is needed to get readline input to work right; see also
# https://github.com/JuliaPackaging/Yggdrasil/issues/455 and
# https://github.com/oscar-system/GAP.jl/issues/415
withenv("TERMINFO_DIRS" => joinpath(GAP_jll.Readline_jll.Ncurses_jll.find_artifact_dir(), "share", "terminfo")) do
initialize(cmdline_options)
end
initialize(cmdline_options)

if !show_banner
# Leave it to GAP's `LoadPackage` whether package banners are shown.
Expand Down

0 comments on commit 87ca4a9

Please sign in to comment.