Skip to content

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

Open
@krynju

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions