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

Unclear error message when putting an alias on the exclude list #290

Open
mateuszbaran opened this issue Apr 29, 2024 · 0 comments
Open

Comments

@mateuszbaran
Copy link

Consider the following example:

julia> Aqua.test_all(Aqua; ambiguities=(exclude=[Aqua.ExcludeSpec],))
Method ambiguity: Error During Test at /home/mateusz/.julia/packages/Aqua/tHrmY/src/Aqua.jl:67
  Got exception outside of a @test
  Name `Core.Pair` is resolved to a different object.
  Stacktrace:
    [1] error(s::String)
      @ Base ./error.jl:35
    [2] normalize_and_check_exclude(exclude::Vector{DataType})
      @ Aqua ~/.julia/packages/Aqua/tHrmY/src/ambiguities.jl:55
    [3] _find_ambiguities(packages::Vector{Base.PkgId}; skipdetails::Bool, color::Nothing, exclude::Vector{DataType}, detect_ambiguities_options::@Kwargs{})
      @ Aqua ~/.julia/packages/Aqua/tHrmY/src/ambiguities.jl:92
    [4] _find_ambiguities
      @ ~/.julia/packages/Aqua/tHrmY/src/ambiguities.jl:82 [inlined]
    [5] _test_ambiguities(packages::Vector{Base.PkgId}; broken::Bool, kwargs::@Kwargs{exclude::Vector{DataType}})
      @ Aqua ~/.julia/packages/Aqua/tHrmY/src/ambiguities.jl:69
    [6] _test_ambiguities
      @ ~/.julia/packages/Aqua/tHrmY/src/ambiguities.jl:68 [inlined]
    [7] test_ambiguities
      @ ~/.julia/packages/Aqua/tHrmY/src/ambiguities.jl:28 [inlined]
    [8] macro expansion
      @ ~/.julia/packages/Aqua/tHrmY/src/Aqua.jl:69 [inlined]
    [9] macro expansion
      @ ~/bin/julia-1.10.1/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
   [10] test_all(testtarget::Module; ambiguities::@NamedTuple{exclude::Vector{DataType}}, unbound_args::Bool, undefined_exports::Bool, project_extras::Bool, stale_deps::Bool, deps_compat::Bool, piracies::Bool, persistent_tasks::Bool)
      @ Aqua ~/.julia/packages/Aqua/tHrmY/src/Aqua.jl:68
   [11] top-level scope
      @ REPL[25]:1
   [12] eval
      @ ./boot.jl:385 [inlined]
   [13] eval_user_input(ast::Any, backend::REPL.REPLBackend, mod::Module)
      @ REPL ~/bin/julia-1.10.1/share/julia/stdlib/v1.10/REPL/src/REPL.jl:150
   [14] repl_backend_loop(backend::REPL.REPLBackend, get_module::Function)
      @ REPL ~/bin/julia-1.10.1/share/julia/stdlib/v1.10/REPL/src/REPL.jl:246
   [15] start_repl_backend(backend::REPL.REPLBackend, consumer::Any; get_module::Function)
      @ REPL ~/bin/julia-1.10.1/share/julia/stdlib/v1.10/REPL/src/REPL.jl:231
   [16] run_repl(repl::REPL.AbstractREPL, consumer::Any; backend_on_current_task::Bool, backend::Any)
      @ REPL ~/bin/julia-1.10.1/share/julia/stdlib/v1.10/REPL/src/REPL.jl:389
   [17] run_repl(repl::REPL.AbstractREPL, consumer::Any)
      @ REPL ~/bin/julia-1.10.1/share/julia/stdlib/v1.10/REPL/src/REPL.jl:375
   [18] (::Base.var"#1013#1015"{Bool, Bool, Bool})(REPL::Module)
      @ Base ./client.jl:432
   [19] #invokelatest#2
      @ ./essentials.jl:892 [inlined]
   [20] invokelatest
      @ ./essentials.jl:889 [inlined]
   [21] run_main_repl(interactive::Bool, quiet::Bool, banner::Bool, history_file::Bool, color_set::Bool)
      @ Base ./client.jl:416
   [22] exec_options(opts::Base.JLOptions)
      @ Base ./client.jl:333
   [23] _start()
      @ Base ./client.jl:552
Test Summary:    | Error  Total  Time
Method ambiguity |     1      1  0.1s
ERROR: Some tests did not pass: 0 passed, 0 failed, 1 errored, 0 broken.

Currently putting an alias on the exclude list gives a hard-to-interpret error message. I would suggest either allowing aliases or writing in the error message that alias usage may be the cause of the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants