Reputation: 3657
I am really new to Julia and confused about using an old version of the SISL Vec package.
I am trying to setup ngsim_env and their instructions require you to use an older v0.1.0 of Vec. But, when I followed the instructions to install the Vec package and then checkout the v0.1.0 tag it didn't work.
Here's what I did
$ julia ../build.jl
for some package which includes this block
packages = keys(Pkg.installed())
if !in("Vec", packages)
Pkg.clone("https://github.com/tawheeler/Vec.jl.git")
end
Note: This git URL actually goes to the SISL Vec page.
cd ~/.julia/packages/Vec
git fetch tags
git checkout v0.1.0
I did a bunch of other installations with many other packages. At some point I noticed that there is a package ~/.julia/dev/Vec
and ~/.julia/packages/Vec
. The one in dev has the correct v0.1.0 code and the one in packages has the newer wrong code. When I tried to use other packages that needed the older Vec they were throwing errors and the paths were to files in the packages directory.
I tried Pkg.rm("Vec")
. This did something to the project manifest. After nothing worked, every package would throw errors like KeyError: key "Vec" not found
and Pkg.add("Vec")
nor original Vec installation helped. I even tried removing both the Vec directories from ~/.julia
but that didn't help.
I guess a big question is why does Julia put some packages into packages/
and others into dev/
and how to control which one's get used if the same package appears in both places like Vec is.
Would greatly appreciate any assistance, totally confused.
Upvotes: 1
Views: 2877
Reputation: 572
The dev command fetches a full clone of the package to ~/.julia/dev/
via the docs. The only things I have in my dev
directory there are the ones I am developing on my own.
I think that triggered when you did a check out manually with git checkout. Accordingly:
to stop tracking a path and use the registered version again, use free
Try deleting the packages, and whipping mentions of Vec.jl
from your manifest:
(v1.0) pkg> rm Vec
(v1.0) pkg> add https://github.com/tawheeler/[email protected]
In general, try using Pkg
when possible, cause it does a lot of house keeping magic in the back
(Also, the repl interface with pkg
makes everything easier, so hit ]
from a blank julia>
to get there. And a quick Pkg.status()
or ] st
will show you what youre tracking and whats in dev and what version you have pinned, etc.)
Upvotes: 2