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

import InteractiveUtils in startup.jl breaks default behavior #40192

Open
goretkin opened this issue Mar 25, 2021 · 3 comments
Open

import InteractiveUtils in startup.jl breaks default behavior #40192

goretkin opened this issue Mar 25, 2021 · 3 comments

Comments

@goretkin
Copy link
Contributor

The isdefined check here returns true if there is an import InteractiveUtils in startup.jl

if !isdefined(Main, :InteractiveUtils)

The behavior of isdefined is expected, but the behavior of load_InteractiveUtils is not. Is the check even needed?

@KristofferC
Copy link
Sponsor Member

So to be clear, the point is that e.g the unqualified @code_warntype will stop working in the REPL because the using statement will not be run?

@goretkin
Copy link
Contributor Author

e.g the unqualified @code_warntype will stop working in the REPL because the using statement will not be run

Yes, exactly. same with e.g. @edit, @which, etc. Thank you for clarifying.

@goretkin
Copy link
Contributor Author

Is it necessary to check isdefined(Main, :InteractiveUtils)? At a glance, it seems like that code could run unconditionally.

If there does need to be a check, it should be a different check.

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