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

deprecation warning for Pkg.add() #693

Closed
leclere opened this issue Aug 23, 2018 · 4 comments
Closed

deprecation warning for Pkg.add() #693

leclere opened this issue Aug 23, 2018 · 4 comments

Comments

@leclere
Copy link

leclere commented Aug 23, 2018

When running Pkg.add("SomePackage") in julia 0.7 we get the following warning

WARNING: Base.Pkg is deprecated, run using Pkg instead

which is not the most helpful : I tried
using Pkg add("SomePackage")
which gave exactly the same warning, and it took a while to find that we need to
use ] to get to the Pkg REPL.

I suggest extending the warning to help the transition for casual julia user.

@KristofferC
Copy link
Sponsor Member

You need using Pkg and then Pkg.add("SomePackage").

@leclere
Copy link
Author

leclere commented Aug 23, 2018

@KristofferC it works if you do this but print the same warning.
I do not know what is the correct way to install package anymore. It seems to be :
using Pkg
]
add SomePackage

@KristofferC
Copy link
Sponsor Member

You need to do using Pkg first before using any other Pkg command.

The correct way is either

] add SomePackage

or

using Pkg
Pkg.add("SomePackage")

@00vareladavid
Copy link
Contributor

I believe JuliaLang/julia#28555 fixes this

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

4 participants