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

Pkg add fails when name of package has a typo #2857

Closed
PallHaraldsson opened this issue Nov 24, 2021 · 1 comment
Closed

Pkg add fails when name of package has a typo #2857

PallHaraldsson opened this issue Nov 24, 2021 · 1 comment

Comments

@PallHaraldsson
Copy link
Contributor

PallHaraldsson commented Nov 24, 2021

On all versions adding CMPlot works, this is about with extra s. My first instinct was to file at JuliaLang (only), I guess if in doubt do there, but ok for this to file only here?

I tested this (with default) and non-default option, and both fail (both work on 1.7.0-rc3):

"a4f7f2d1e4 (3 days old master)":

(@v1.8) pkg> add --preserve=all CMPlots
    Updating registry at `~/.julia/registries/General.toml`
ERROR: Unhandled Task ERROR: UndefVarError: bt not defined
Stacktrace:
 [1] display_error(io::Base.TTY, exception::ErrorException, backtrace::Vector{Ptr{Nothing}})
   @ Base ./client.jl:111
 [2] do_cmd(repl::REPL.LineEditREPL, input::String; do_rethrow::Bool)
   @ Pkg.REPLMode ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/Pkg/src/REPLMode/REPLMode.jl:392
 [3] do_cmd
   @ ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/Pkg/src/REPLMode/REPLMode.jl:377 [inlined]
 [4] (::Pkg.REPLMode.var"#24#27"{REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::IOBuffer, ok::Bool)
   @ Pkg.REPLMode ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/Pkg/src/REPLMode/REPLMode.jl:550
 [5] #invokelatest#2
   @ ./essentials.jl:731 [inlined]
 [6] invokelatest
   @ ./essentials.jl:729 [inlined]
 [7] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
   @ REPL.LineEdit ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/REPL/src/LineEdit.jl:2509
 [8] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
   @ REPL ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/REPL/src/REPL.jl:1249
 [9] (::REPL.var"#49#54"{REPL.LineEditREPL, REPL.REPLBackendRef})()
   @ REPL ./task.jl:466

caused by: The following package names could not be resolved:
 * CMPlots (not found in project, manifest or registry)

Stacktrace:
  [1] pkgerror(msg::String)
    @ Pkg.Types ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/Pkg/src/Types.jl:67
  [2] ensure_resolved(manifest::Pkg.Types.Manifest, pkgs::Vector{Pkg.Types.PackageSpec}; registry::Bool)
    @ Pkg.Types ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/Pkg/src/Types.jl:963
  [3] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::Base.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}})
    @ Pkg.API ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/Pkg/src/API.jl:263
  [4] add(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Pairs{Symbol, Pkg.Types.PreserveLevel, Tuple{Symbol}, NamedTuple{(:preserve,), Tuple{Pkg.Types.PreserveLevel}}})
    @ Pkg.API ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/Pkg/src/API.jl:155
  [5] do_cmd!(command::Pkg.REPLMode.Command, repl::REPL.LineEditREPL)
    @ Pkg.REPLMode ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/Pkg/src/REPLMode/REPLMode.jl:408
  [6] do_cmd(repl::REPL.LineEditREPL, input::String; do_rethrow::Bool)
    @ Pkg.REPLMode ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/Pkg/src/REPLMode/REPLMode.jl:386
  [7] do_cmd
    @ ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/Pkg/src/REPLMode/REPLMode.jl:377 [inlined]
  [8] (::Pkg.REPLMode.var"#24#27"{REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::IOBuffer, ok::Bool)
    @ Pkg.REPLMode ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/Pkg/src/REPLMode/REPLMode.jl:550
  [9] #invokelatest#2
    @ ./essentials.jl:731 [inlined]
 [10] invokelatest
    @ ./essentials.jl:729 [inlined]
 [11] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
    @ REPL.LineEdit ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/REPL/src/LineEdit.jl:2509
 [12] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
    @ REPL ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/REPL/src/REPL.jl:1249
 [13] (::REPL.var"#49#54"{REPL.LineEditREPL, REPL.REPLBackendRef})()
    @ REPL ./task.jl:466
ERROR: TaskFailedException
Stacktrace:
  [1] try_yieldto(undo::typeof(Base.ensure_rescheduled))
    @ Base ./task.jl:820
  [2] wait()
    @ Base ./task.jl:880
  [3] wait(c::Base.GenericCondition{ReentrantLock})
    @ Base ./condition.jl:124
  [4] take_buffered(c::Channel{Any})
    @ Base ./channels.jl:415
  [5] take!
    @ ./channels.jl:409 [inlined]
  [6] repl_backend_loop(backend::REPL.REPLBackend)
    @ REPL ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/REPL/src/REPL.jl:240
  [7] start_repl_backend(backend::REPL.REPLBackend, consumer::Any)
    @ REPL ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/REPL/src/REPL.jl:230
  [8] run_repl(repl::REPL.AbstractREPL, consumer::Any; backend_on_current_task::Bool)
    @ REPL ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/REPL/src/REPL.jl:367
  [9] run_repl(repl::REPL.AbstractREPL, consumer::Any)
    @ REPL ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/REPL/src/REPL.jl:354
 [10] (::Base.var"#933#935"{Bool, Bool, Bool})(REPL::Module)
    @ Base ./client.jl:403
 [11] #invokelatest#2
    @ ./essentials.jl:731 [inlined]
 [12] invokelatest
    @ ./essentials.jl:729 [inlined]
 [13] run_main_repl(interactive::Bool, quiet::Bool, banner::Bool, history_file::Bool, color_set::Bool)
    @ Base ./client.jl:388
 [14] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:318
 [15] _start()
    @ Base ./client.jl:506

    nested task error: UndefVarError: bt not defined
    Stacktrace:
     [1] display_error(io::Base.TTY, exception::ErrorException, backtrace::Vector{Ptr{Nothing}})
       @ Base ./client.jl:111
     [2] do_cmd(repl::REPL.LineEditREPL, input::String; do_rethrow::Bool)
       @ Pkg.REPLMode ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/Pkg/src/REPLMode/REPLMode.jl:392
     [3] do_cmd
       @ ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/Pkg/src/REPLMode/REPLMode.jl:377 [inlined]
     [4] (::Pkg.REPLMode.var"#24#27"{REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::IOBuffer, ok::Bool)
       @ Pkg.REPLMode ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/Pkg/src/REPLMode/REPLMode.jl:550
     [5] #invokelatest#2
       @ ./essentials.jl:731 [inlined]
     [6] invokelatest
       @ ./essentials.jl:729 [inlined]
     [7] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
       @ REPL.LineEdit ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/REPL/src/LineEdit.jl:2509
     [8] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
       @ REPL ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/REPL/src/REPL.jl:1249
     [9] (::REPL.var"#49#54"{REPL.LineEditREPL, REPL.REPLBackendRef})()
       @ REPL ./task.jl:466
    
    caused by: The following package names could not be resolved:
     * CMPlots (not found in project, manifest or registry)
    
    Stacktrace:
      [2] ensure_resolved(manifest::Pkg.Types.Manifest, pkgs::Vector{Pkg.Types.PackageSpec}; registry::Bool)
        @ Pkg.Types ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/Pkg/src/Types.jl:963
      [3] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::Base.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}})
        @ Pkg.API ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/Pkg/src/API.jl:263
      [4] add(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Pairs{Symbol, Pkg.Types.PreserveLevel, Tuple{Symbol}, NamedTuple{(:preserve,), Tuple{Pkg.Types.PreserveLevel}}})
        @ Pkg.API ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/Pkg/src/API.jl:155
      [5] do_cmd!(command::Pkg.REPLMode.Command, repl::REPL.LineEditREPL)
        @ Pkg.REPLMode ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/Pkg/src/REPLMode/REPLMode.jl:408
      [6] do_cmd(repl::REPL.LineEditREPL, input::String; do_rethrow::Bool)
        @ Pkg.REPLMode ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/Pkg/src/REPLMode/REPLMode.jl:386
      [7] do_cmd
        @ ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/Pkg/src/REPLMode/REPLMode.jl:377 [inlined]
      [8] (::Pkg.REPLMode.var"#24#27"{REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::IOBuffer, ok::Bool)
        @ Pkg.REPLMode ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/Pkg/src/REPLMode/REPLMode.jl:550
      [9] #invokelatest#2
        @ ./essentials.jl:731 [inlined]
     [10] invokelatest
        @ ./essentials.jl:729 [inlined]
     [11] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
        @ REPL.LineEdit ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/REPL/src/LineEdit.jl:2509
     [12] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
        @ REPL ~/julia-1.8-DEV-a4f7f2d1e4/share/julia/stdlib/v1.8/REPL/src/REPL.jl:1249
     [13] (::REPL.var"#49#54"{REPL.LineEditREPL, REPL.REPLBackendRef})()
        @ REPL ./task.jl:466
@fredrikekre
Copy link
Member

JuliaLang/julia#43184

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

2 participants