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

Don't tell people to use Pkg to install Pkg #53197

Merged
merged 2 commits into from
Feb 6, 2024

Conversation

oxinabox
Copy link
Contributor

@oxinabox oxinabox commented Feb 6, 2024

Occasionally one ends up in a situation where Pkg is not available
This results in the rather nonsensical error message:

julia> using Pkg
ERROR: ArgumentError: Package Pkg not found in current path.
- Run `import Pkg; Pkg.add("Pkg")` to install the Pkg package.

How dare the REPL mock me like that?

We could display a number of useful and/or humours messages here, like checking if @stdlib is JULIA_LOAD_PATH
or commentary about being up shit creek without a paddle, etc.
right now for initial PR I just said nothing.

(One way to replicate this error message is to set the environment variable JULIA_LOAD_PATH="some nonsense value" before starting julia. Another is to be building julia from source and have Pkg be in a broken state where it can't precompile. I am sure there is another where you prune stdlibs for your use-case)

base/loading.jl Outdated Show resolved Hide resolved
@IanButterworth IanButterworth merged commit 353884c into JuliaLang:master Feb 6, 2024
8 checks passed
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.

None yet

2 participants