Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Pkg.clone obsolete?

I have attempted to install several packages listed at JuliaObserver which are not in the Julia registry but instead are to be downloaded from github. The instructions at JuliaObserver look like this but depending on the particular repository:

Pkg.clone("https://github.com/JuliaDataReaders/DataReaders.jl.git")

These attempts all fail with "UndefVarError: clone not defined".

like image 927
Oscar Avatar asked Apr 09 '20 06:04

Oscar


1 Answers

Yes, Pkg.clone is part of the old API. The new API is documented here https://julialang.github.io/Pkg.jl/v1/api.html In particular, you get a similar behaviour by

using Pkg
pkg"add <URL or package name>" # If you want to install the package
pkg"dev <URL or package name>" # If you want to develop the package

If the package is registered, you can provide the package name above. If not, you need to provide the full URL to the repo

like image 62
Fredrik Bagge Avatar answered Nov 14 '22 08:11

Fredrik Bagge