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

REPL: Don't look for missing packages in code that isn't going to be run #41887

Conversation

IanButterworth
Copy link
Sponsor Member

Fix #41879

@timholy seem reasonable?

julia> ex = :(using ImageCore)
:(using ImageCore)

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

@vtjnash
Copy link
Sponsor Member

vtjnash commented Aug 14, 2021

Is it unreasonable/bad though to think this might be passed to eval?

Copy link
Sponsor Member

@timholy timholy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As suggested by @vtjnash, perhaps eval(:(using ImageCore)) might be a missing case. Overall, though, I'd say it's OK if it misses some suggestions. I think over-suggesting is the more serious flaw.

@IanButterworth IanButterworth merged commit 19629d7 into JuliaLang:master Aug 14, 2021
@StefanKarpinski
Copy link
Sponsor Member

This seems like a good compromise to me. Using eval to load packages seems advanced/rare enough that not having the auto install behavior is ok.

@IanButterworth IanButterworth deleted the ib/repl_pkg_install_ignore_quote branch August 14, 2021 18:32
KristofferC pushed a commit that referenced this pull request Aug 25, 2021
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

Successfully merging this pull request may close these issues.

REPL offers to install packages even when just creating expressions
5 participants