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

Issue when using together with Oscar #4

Closed
ulthiel opened this issue May 19, 2022 · 6 comments
Closed

Issue when using together with Oscar #4

ulthiel opened this issue May 19, 2022 · 6 comments

Comments

@ulthiel
Copy link

ulthiel commented May 19, 2022

There's an issue when using Gapjm together with Oscar (Pkg.add("Oscar")), the problem seems to be within Gapjm. Can this be fixed?

% julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org/
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.7.2 (2022-02-06)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using Oscar
 -----    -----    -----      -      -----
|     |  |     |  |     |    | |    |     |
|     |  |        |         |   |   |     |
|     |   -----   |        |     |  |-----
|     |        |  |        |-----|  |   |
|     |  |     |  |     |  |     |  |    |
 -----    -----    -----   -     -  -     -

...combining (and extending) ANTIC, GAP, Polymake and Singular
Version 0.8.2 ...
 ... which comes with absolutely no warranty whatsoever
Type: '?Oscar' for more information
(c) 2019-2022 by The Oscar Development Team

julia> using Gapjm
loading Gap4
┌ Warning: Error requiring `GAP` from `Gapjm`
│   exception =
│    LoadError: ArgumentError: Package Gapjm does not have GAP in its dependencies:
│    - If you have Gapjm checked out for development and have
│      added GAP as a dependency but haven't updated your primary
│      environment's manifest file, try `Pkg.resolve()`.
│    - Otherwise you may need to report an issue with Gapjm
│    Stacktrace:
│      [1] require(into::Module, mod::Symbol)
│        @ Base ./loading.jl:980
│      [2] include(mod::Module, _path::String)
│        @ Base ./Base.jl:418
│      [3] include(x::String)
│        @ Gapjm ~/.julia/packages/Gapjm/h7yRK/src/Gapjm.jl:84
│      [4] top-level scope
│        @ ~/.julia/packages/Requires/Z8rfN/src/Requires.jl:40
│      [5] eval
│        @ ./boot.jl:373 [inlined]
│      [6] eval
│        @ ~/.julia/packages/Gapjm/h7yRK/src/Gapjm.jl:84 [inlined]
│      [7] (::Gapjm.var"#62#65")()
│        @ Gapjm ~/.julia/packages/Requires/Z8rfN/src/require.jl:101
│      [8] macro expansion
│        @ timing.jl:299 [inlined]
│      [9] err(f::Any, listener::Module, modname::String, file::String, line::Any)
│        @ Requires ~/.julia/packages/Requires/Z8rfN/src/require.jl:47
│     [10] (::Gapjm.var"#61#64")()
│        @ Gapjm ~/.julia/packages/Requires/Z8rfN/src/require.jl:100
│     [11] withpath(f::Any, path::String)
│        @ Requires ~/.julia/packages/Requires/Z8rfN/src/require.jl:37
│     [12] (::Gapjm.var"#60#63")()
│        @ Gapjm ~/.julia/packages/Requires/Z8rfN/src/require.jl:99
│     [13] listenpkg(f::Any, pkg::Base.PkgId)
│        @ Requires ~/.julia/packages/Requires/Z8rfN/src/require.jl:20
│     [14] macro expansion
│        @ ~/.julia/packages/Requires/Z8rfN/src/require.jl:98 [inlined]
│     [15] __init__()
│        @ Gapjm ~/.julia/packages/Gapjm/h7yRK/src/Gapjm.jl:139
│     [16] _include_from_serialized(path::String, depmods::Vector{Any})
│        @ Base ./loading.jl:768
│     [17] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
│        @ Base ./loading.jl:854
│     [18] _require(pkg::Base.PkgId)
│        @ Base ./loading.jl:1097
│     [19] require(uuidkey::Base.PkgId)
│        @ Base ./loading.jl:1013
│     [20] require(into::Module, mod::Symbol)
│        @ Base ./loading.jl:997
│     [21] eval
│        @ ./boot.jl:373 [inlined]
│     [22] eval_user_input(ast::Any, backend::REPL.REPLBackend)
│        @ REPL /Applications/Julia.app/Contents/Resources/julia/share/julia/stdlib/v1.7/REPL/src/REPL.jl:150
│     [23] repl_backend_loop(backend::REPL.REPLBackend)
│        @ REPL /Applications/Julia.app/Contents/Resources/julia/share/julia/stdlib/v1.7/REPL/src/REPL.jl:246
│     [24] start_repl_backend(backend::REPL.REPLBackend, consumer::Any)
│        @ REPL /Applications/Julia.app/Contents/Resources/julia/share/julia/stdlib/v1.7/REPL/src/REPL.jl:231
│     [25] run_repl(repl::REPL.AbstractREPL, consumer::Any; backend_on_current_task::Bool)
│        @ REPL /Applications/Julia.app/Contents/Resources/julia/share/julia/stdlib/v1.7/REPL/src/REPL.jl:364
│     [26] run_repl(repl::REPL.AbstractREPL, consumer::Any)
│        @ REPL /Applications/Julia.app/Contents/Resources/julia/share/julia/stdlib/v1.7/REPL/src/REPL.jl:351
│     [27] (::Base.var"#930#932"{Bool, Bool, Bool})(REPL::Module)
│        @ Base ./client.jl:394
│     [28] #invokelatest#2
│        @ ./essentials.jl:716 [inlined]
│     [29] invokelatest
│        @ ./essentials.jl:714 [inlined]
│     [30] run_main_repl(interactive::Bool, quiet::Bool, banner::Bool, history_file::Bool, color_set::Bool)
│        @ Base ./client.jl:379
│     [31] exec_options(opts::Base.JLOptions)
│        @ Base ./client.jl:309
│     [32] _start()
│        @ Base ./client.jl:495
│    in expression starting at /Users/thiel/.julia/packages/Gapjm/h7yRK/src/Gap4.jl:1
└ @ Requires ~/.julia/packages/Requires/Z8rfN/src/require.jl:51

I'm using Julia 1.7.2. Both Oscar and Gapjm have been freshly installed.

@fingolfin
Copy link

This is not specific to Oscar; it seems this always happens if GAP.jl is loaded before Gapjm.jl. I.e. doing using GAP ; using Gapjm also triggers the error.

@jmichel7
Copy link
Owner

Thank you for the bug report. I use the Require mechanism to load GAP on demand for certain computations with groups (like character tables of non-reflection groups). This caused no problem on my computer. But installing Gapjm after creating a dummy test user I could reproduce the problem. The error message says it all: I forgot to add GAP to my deps in Project.toml; it caused no problem on my computer probably because of some other environment file. Anyway adding it seems to have fixed the problem.

@ulthiel
Copy link
Author

ulthiel commented May 30, 2022

Great, thanks!

One minor thing: I now get

julia> using Gapjm
loading Gap4

Is the "loading Gap4" message coming from Gapjm or from Gap? Maybe this can be silenced.

@jmichel7
Copy link
Owner

The message "loading Gap4" is printed by Gapjm. It means something like "The Gap4 extensions to Gapjm are available". Do you think this last message is reasonable, or is silence better?

@ulthiel
Copy link
Author

ulthiel commented May 30, 2022

Well, there is a longer discussion on oscar-system/Oscar.jl#92 about these kind of things and you can find my personal opinion at the very end (also check out the link in the comment).

In the end, it's clear that functionality is more important than this of course.

@ulthiel
Copy link
Author

ulthiel commented Jun 23, 2022

The bug has been fixed, the message is gone, issue closed.

@ulthiel ulthiel closed this as completed Jun 23, 2022
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

3 participants