-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docs and some API usabilities (#534)
* docs * fix from review * fixes
- Loading branch information
1 parent
2846e2a
commit 47019b7
Showing
7 changed files
with
411 additions
and
73 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
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 |
---|---|---|
|
@@ -193,6 +193,9 @@ Since we haven't created our own project yet, we are in the default project, loc | |
|
||
To return to the `julia>` prompt, either press backspace when the input line is empty or press Ctrl+C. | ||
Help is available by calling `pkg> help`. | ||
If you are in an environment that does not have access to a REPL you can still use the REPL mode commands using | ||
the string macro `pkg` available after `using Pkg`. The command `pkg"cmd"` would be equivalent to executing `cmd` | ||
in the REPL mode. | ||
|
||
The documentation here describes using Pkg from the REPL mode. Documentation of using | ||
the Pkg API (by calling `Pkg.` functions) is in progress of being written. | ||
|
@@ -831,3 +834,30 @@ Simply clone their project using e.g. `git clone`, `cd` to the project directory | |
|
||
If the project contains a manifest, this will install the packages in the same state that is given by that manifest. | ||
Otherwise, it will resolve the latest versions of the dependencies compatible with the project. | ||
|
||
## References | ||
|
||
This section describes the "API mode" of interacting with Pkg.jl which is recommended for non-interactive usage, | ||
in i.e. scripts. In the REPL mode packages (with associated version, UUID, URL etc) are parsed from strings, | ||
for example, `"Package#master"`,`"[email protected]"`, `"www.mypkg.com/MyPkg#my/feature"`. | ||
It is possible to use strings as arguments for simple commands in the API mode (like `Pkg.add(["PackageA", "PackageB"])`, | ||
more complicated commands, that e.g. specify URLs or version range, uses a more structured format over strings. | ||
This is done by creating an instance of a [`PackageSpec`](@ref) which are passed in to functions. | ||
|
||
```@docs | ||
PackageSpec | ||
PackageMode | ||
UpgradeLevel | ||
Pkg.add | ||
Pkg.develop | ||
Pkg.activate | ||
Pkg.rm | ||
Pkg.update | ||
Pkg.test | ||
Pkg.build | ||
Pkg.pin | ||
Pkg.free | ||
Pkg.instantiate | ||
Pkg.resolve | ||
Pkg.setprotocol! | ||
``` |
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
Oops, something went wrong.