Name: Pkg.jl
Owner: The Julia Language
Owner: The Julia Language
Description: null
Created: 2017-02-17 21:51:01.0
Updated: 2018-05-24 13:54:09.0
Pushed: 2018-05-24 15:16:49.0
Homepage: null
Size: 3441
Language: Julia
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Next-generation package manager for Julia. Still quite alpha.
First, Pkg.clone
the Pkg3
repo itself to install it:
clone("https://github.com/JuliaLang/Pkg3.jl.git")
Now load Pkg3
in Julia 0.6 to add packages and load them.
Packages will be installed to joinpath(homedir(), ".julia", "packages")
, so they won't influnce the packages that you already have installed.
th/to/julia.6/julia
a> using Pkg3
This gives you a pkg>
REPL mode, activated (for now) by the ]
key. Currently, this supports three operations: add
, rm
and up
:
add JSON
: Resolving package versions
: Cloning [682c06a0-de6a-54ab-a142-c8b1cf79cde6] JSON
: Installing JSON v0.13.0 [9003b4622ec7e553]
: Updating project file /Users/stefan/projects/julia/Project.toml
: [+] JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
: Updating manifest file /Users/stefan/projects/julia/Manifest.toml
: [34da2185] + Compat v0.31.0
: [682c06a0] + JSON v0.13.0
add Compat @0.28
: Resolving package versions
: Installing Compat v0.28.0 [0427af7e2c8610c8]
: Updating project file /Users/stefan/projects/julia/Project.toml
: [+] Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
: Updating manifest file /Users/stefan/projects/julia/Manifest.toml
: [34da2185] ? Compat v0.31.0 ? v0.28.0
rm Compat
: Updating project file /Users/stefan/projects/julia/Project.toml
: [-] Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
: [-] JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
: Updating manifest file /Users/stefan/projects/julia/Manifest.toml
: [34da2185] - Compat v0.28.0
: [682c06a0] - JSON v0.13.0
add JSON @0.10
: Resolving package versions
: Installing JSON v0.10.0 [77699b5cc09b169c]
: Updating project file /Users/stefan/projects/julia/Project.toml
: [+] JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
: Updating manifest file /Users/stefan/projects/julia/Manifest.toml
: [34da2185] + Compat v0.31.0
: [682c06a0] + JSON v0.10.0
up
: Resolving package versions
: Updating project file /Users/stefan/projects/julia/Project.toml
: [no changes]
: Updating manifest file /Users/stefan/projects/julia/Manifest.toml
: [682c06a0] ? JSON v0.10.0 ? v0.13.0
Package operations create a Project.toml
file that record what dependencies your project (or named global environment) has ? i.e. what you've explicitly added. It also creates a Manifest.toml
file that records the exact versions of each of those dependenices and their transitive dependencies ? and the graph between them. You can load top-level dependencies via the usual using JSON
or import JSON
constructs in the REPL or in Julia scripts.