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

Importing an undefined var by running using Package: abc warns instead of erroring in 1.11 #56757

Open
krynju opened this issue Dec 5, 2024 · 1 comment
Labels

Comments

@krynju
Copy link
Contributor

krynju commented Dec 5, 2024

This used to be an important static check whether the thing we import actually exists. It used to fail the precompile, but now it only warns, so if you don't happen to inspect it you will not know about this.

julia> VERSION
v"1.10.7"

julia> using Base: aaa
ERROR: UndefVarError: `aaa` not defined

julia> import Base: asdsa
WARNING: could not import Base.asdsa into Main
julia> VERSION
v"1.11.1"

julia> using Base: aaa
WARNING: could not import Base.aaa into Main

julia> import Base: asdsa
WARNING: could not import Base.asdsa into Main

@KristofferC bisected it to 89e391bfd0615ba56e92457 which was added to fix #54954

According to Keno the previous behavior (meaning the error pre 1.11) was a bug, so if we want this validation it needs to be added in some way

This strict mechanism issue can be a solution to this in the future #54903

@nsajko nsajko added the modules label Dec 5, 2024
@adienes
Copy link
Contributor

adienes commented Dec 5, 2024

I definitely would like to see this error in both cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants