Skip to content

confusing error when Pkg is not imported but REPL mode has been used #55914

@simeonschaub

Description

@simeonschaub

Although Pkg is loaded, it's not accessible from Main here, so the hint a global variable of this name also exists in Pkg. seems confusing here:

(@v1.12) pkg> instantiate

julia> Pkg
ERROR: UndefVarError: `Pkg` not defined in `Main`
Suggestion: check for spelling errors or missing imports.
Hint: a global variable of this name also exists in Pkg.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions