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

Prompt to add an uninstalled package on using only occurs if Pkg is loaded #52091

Closed
ararslan opened this issue Nov 8, 2023 · 1 comment
Closed
Labels
regression Regression in behavior compared to a previous version

Comments

@ararslan
Copy link
Member

ararslan commented Nov 8, 2023

Current master:

julia> using BenchmarkTools
ERROR: ArgumentError: Package BenchmarkTools not found in current path.
- Run `import Pkg; Pkg.add("BenchmarkTools")` to install the BenchmarkTools package.
Stacktrace:
 [1] macro expansion
   @ Base ./loading.jl:1781 [inlined]
 [2] macro expansion
   @ Base ./lock.jl:267 [inlined]
 [3] __require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1762
 [4] #invoke_in_world#3
   @ Base ./essentials.jl:963 [inlined]
 [5] invoke_in_world
   @ Base ./essentials.jl:960 [inlined]
 [6] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1755

1.10.0-rc1:

julia> using BenchmarkTools
 │ Package BenchmarkTools not found, but a package named BenchmarkTools is available from a registry.
 │ Install package?
 │   (@v1.10) pkg> add BenchmarkTools
 └ (y/n/o) [y]:

This is an unfortunate regression in user experience. What's worse is that it depends on whether Pkg is loaded, which may not be obvious. For example, if you accidentally hit ] then backspace out of it, all of a sudden you're prompted to install packages on using again since Pkg was loaded when entering its REPL mode.

@ararslan ararslan added the regression Regression in behavior compared to a previous version label Nov 8, 2023
@vchuravy
Copy link
Member

vchuravy commented Nov 8, 2023

Duplicate of #52090

@vchuravy vchuravy marked this as a duplicate of #52090 Nov 8, 2023
@vchuravy vchuravy closed this as not planned Won't fix, can't repro, duplicate, stale Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Regression in behavior compared to a previous version
Projects
None yet
Development

No branches or pull requests

2 participants