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

Missing package install prompt doesn't work when load is behind a macro #45082

Open
IanButterworth opened this issue Apr 25, 2022 · 5 comments
Open
Labels
stdlib:REPL Julia's REPL (Read Eval Print Loop)

Comments

@IanButterworth
Copy link
Sponsor Member

1.7.0

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

1.7.2

julia> @time using GLMakie
ERROR: ArgumentError: Package GLMakie not found in current path.
- Run `import Pkg; Pkg.add("GLMakie")` to install the GLMakie package.
Stacktrace:

Master

julia> @time using GLMakie
ERROR: ArgumentError: Package GLMakie not found in current path.
- Run `import Pkg; Pkg.add("GLMakie")` to install the GLMakie package.
Stacktrace:

I guess this is an unfortunate side effect of the strategy used in #43457

@IanButterworth IanButterworth added the kind:regression Regression in behavior compared to a previous version label Apr 25, 2022
@JeffBezanson JeffBezanson added the stdlib:REPL Julia's REPL (Read Eval Print Loop) label Apr 25, 2022
@IanButterworth
Copy link
Sponsor Member Author

IanButterworth commented May 12, 2022

I've hesitated to fix this because it occurred to me that @time-ing the load time of an uninstalled package that triggers a prompt that waits for user input, then downloads, installs and loads is a bit of an odd thing to support. Or is this worth fixing?

@vtjnash vtjnash removed the kind:regression Regression in behavior compared to a previous version label Aug 10, 2022
@vtjnash
Copy link
Sponsor Member

vtjnash commented Aug 10, 2022

The @time would occur after all of the interactive REPL steps

@IanButterworth
Copy link
Sponsor Member Author

Good point. I'll fix it

@aplavin
Copy link
Contributor

aplavin commented Mar 17, 2023

@IanButterworth any updates? The autoinstall prompt would be convenient for adhoc @time using ... and @time_imports using ....

@IanButterworth
Copy link
Sponsor Member Author

I've not worked on this. Please feel free to

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib:REPL Julia's REPL (Read Eval Print Loop)
Projects
None yet
Development

No branches or pull requests

4 participants