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

report_package prints "Package AbstractAlgebra not found" and reports many invalid errors afterwards #574

Open
fingolfin opened this issue Nov 5, 2023 · 0 comments

Comments

@fingolfin
Copy link

Doing using JET, Nemo ; report_package(Nemo) I get the following error:

═════ 7806 toplevel errors found ═════
┌ @ /Users/mhorn/Projekte/OSCAR/Nemo.jl/src/Nemo.jl:59
│ ArgumentError: Package AbstractAlgebra not found in current path, maybe you meant `import/using .AbstractAlgebra`.
│ - Otherwise, run `import Pkg; Pkg.add("AbstractAlgebra")` to install the AbstractAlgebra package.
│ Stacktrace:
│  [1] macro expansion
│    @ ./loading.jl:1630 [inlined]
│  [2] macro expansion
│    @ ./lock.jl:267 [inlined]
│  [3] require(into::Module, mod::Symbol)
│    @ Base ./loading.jl:1611
│  [4] eval(m::Module, e::Any)
│    @ Core ./boot.jl:370
└─────────────────────────
┌ @ /Users/mhorn/Projekte/OSCAR/Nemo.jl/src/flint/FlintTypes.jl:42
│ UndefVarError: `RingElem` not defined
└─────────────────────────
┌ @ /Users/mhorn/Projekte/OSCAR/Nemo.jl/src/flint/FlintTypes.jl:95
│ UndefVarError: `ZZRingElem` not defined
└─────────────────────────
...

and then a gazillion more UndefVarError due to references to things from AbstractAlgebra.

Now, of course the package works, but I think the code flagged in the first error "confuses" JET:

for i in names(AbstractAlgebra)   # <--- JET error points here
   (i in AbstractAlgebra.import_exclude || !isdefined(AbstractAlgebra, i)) && continue
   i == :GF && continue
   i == :NumberField && continue
   @eval import AbstractAlgebra: $i
   @eval export $i
end

Any ideas or hints what might cause this, or how I could perhaps avoid this? I already tried inserting import AbstractAlgebra

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

1 participant