2
votes

I'm developping a package that is also registered. So I have a version in my dev folder ("C:/Users//.julia/dev"), and I have also the most recent registered version installed as if I didn't develop it. So my question is, how can I be sure to use the dev version when I need to ? It appears that if I don't remove the registered version, it only uses this version instead of the dev one, even so I add my dev path to the load path of Julia.

1

1 Answers

9
votes

You should use Pkg.develop and Pkg.free to move to and from development version of the package (or dev and free commands in pkg manager mode). Then you can use Pkg.status to see which version is currently active. Here is an example:

julia> Pkg.status("DataFrames")
    Status `C:\Users\bogum\.julia\environments\v1.2\Project.toml`
  [a93c6f00] DataFrames v0.19.4

julia> Pkg.develop("DataFrames")
[ Info: Path `C:\Users\bogum\.julia\dev\DataFrames` exists and looks like the correct package, using existing path
 Resolving package versions...
  Updating `C:\Users\bogum\.julia\environments\v1.2\Project.toml`
  [a93c6f00] ↑ DataFrames v0.19.4 ⇒ v0.19.4+ [`C:\Users\bogum\.julia\dev\DataFrames`]
  Updating `C:\Users\bogum\.julia\environments\v1.2\Manifest.toml`
  [a93c6f00] ↑ DataFrames v0.19.4 ⇒ v0.19.4+ [`C:\Users\bogum\.julia\dev\DataFrames`]
  [9a8bc11e] + DataStreams v0.4.2

julia> Pkg.status("DataFrames")
    Status `C:\Users\bogum\.julia\environments\v1.2\Project.toml`
  [a93c6f00] DataFrames v0.19.4+ [`C:\Users\bogum\.julia\dev\DataFrames`]

julia> Pkg.free("DataFrames")
 Resolving package versions...
  Updating `C:\Users\bogum\.julia\environments\v1.2\Project.toml`
  [a93c6f00] ↓ DataFrames v0.19.4+ [`C:\Users\bogum\.julia\dev\DataFrames`] ⇒ v0.19.4
  Updating `C:\Users\bogum\.julia\environments\v1.2\Manifest.toml`
  [a93c6f00] ↓ DataFrames v0.19.4+ [`C:\Users\bogum\.julia\dev\DataFrames`] ⇒ v0.19.4
  [9a8bc11e] - DataStreams v0.4.2

julia> Pkg.status("DataFrames")
    Status `C:\Users\bogum\.julia\environments\v1.2\Project.toml`
  [a93c6f00] DataFrames v0.19.4

As you can see in status result you have an information which version of the package is used.

See also: