forked from JuliaLang/Pkg.jl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Suggest using
compat
to choose versions of packages (JuliaLang#3704)
- Loading branch information
1 parent
5610445
commit f7f222f
Showing
2 changed files
with
24 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,15 +40,15 @@ It is possible to add multiple packages in one command as `pkg> add A B C`. | |
The status output contains the packages you have added yourself, in this case, `JSON`: | ||
|
||
```julia-repl | ||
(@v1.8) pkg> st | ||
(@v1.11) pkg> st | ||
Status `~/.julia/environments/v1.8/Project.toml` | ||
[682c06a0] JSON v0.21.3 | ||
``` | ||
|
||
The manifest status shows all the packages in the environment, including recursive dependencies: | ||
|
||
```julia-repl | ||
(@v1.8) pkg> st -m | ||
(@v1.11) pkg> st -m | ||
Status `~/environments/v1.9/Manifest.toml` | ||
[682c06a0] JSON v0.21.3 | ||
[69de0a69] Parsers v2.4.0 | ||
|
@@ -60,6 +60,27 @@ Status `~/environments/v1.9/Manifest.toml` | |
|
||
Since standard libraries (e.g. ` Dates`) are shipped with Julia, they do not have a version. | ||
|
||
To specify that you want a particular version (or set of versions) of a package, use the `compat` command. For example, | ||
to require any patch release of the v0.21 series of JSON after v0.21.4, call `compat JSON 0.21.4`: | ||
|
||
```julia-repl | ||
(@1.11) pkg> compat JSON 0.21.4 | ||
Compat entry set: | ||
JSON = "0.21.4" | ||
Resolve checking for compliance with the new compat rules... | ||
Error empty intersection between [email protected] and project compatibility 0.21.4 - 0.21 | ||
Suggestion Call `update` to attempt to meet the compatibility requirements. | ||
(@1.11) pkg> update | ||
Updating registry at `~/.julia/registries/General.toml` | ||
Updating `~/.julia/environments/1.11/Project.toml` | ||
[682c06a0] ↑ JSON v0.21.3 ⇒ v0.21.4 | ||
Updating `~/.julia/environments/1.11/Manifest.toml` | ||
[682c06a0] ↑ JSON v0.21.3 ⇒ v0.21.4 | ||
``` | ||
|
||
See the section on [Compatibility](@ref) for more on using the compat system. | ||
|
||
After a package is added to the project, it can be loaded in Julia: | ||
|
||
```julia-repl | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters