Skip to content

Commit

Permalink
[move package manager] document git dependencies
Browse files Browse the repository at this point in the history
Enhance the package manager documentation with a description of how to use the git dependency feature.

Closes: diem#9842
  • Loading branch information
sblackshear authored and bors-libra committed Nov 22, 2021
1 parent 56ab033 commit c1416df
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions language/documentation/book/src/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ authors* = [<string>] # e.g., ["Joe Smith ([email protected])", "J
[dependencies] # (Optional section) Paths to dependencies and instantiations or renamings of named addresses from each dependency
# One or more lines declaring dependencies in the following format
<string> = { local = <string>, addr_subst* = { (<string> = (<string> | "<hex_address>"))+ } }
<string> = { local = <string>, addr_subst* = { (<string> = (<string> | "<hex_address>"))+ } } # local dependencies
<string> = { git = <URL ending in .git>, subdir=<path to dir containing Move.toml inside git repo>, rev=<git commit hash>, addr_subst* = { (<string> = (<string> | "<hex_address>"))+ } } # git dependencies
[dev-addresses] # (Optional section) Same as [addresses] section, but only included in "dev" and "test" modes
# One or more lines declaring dev named addresses in the following format
Expand All @@ -71,7 +72,7 @@ authors* = [<string>] # e.g., ["Joe Smith ([email protected])", "J
<string> = { local = <string>, addr_subst* = { (<string> = (<string> | <address>))+ } }
```

An example of the most minimal package manifest:
An example of a minimal package manifest with one local dependency and one git dependency:

```
[package]
Expand All @@ -94,7 +95,10 @@ AddressToBeFilledIn = "_"
SpecifiedAddress = "0xB0B"
[dependencies]
MoveStdlib = { local = "<some_path>/move-stdlib", addr_subst = { "Std" = "0x1" } }
# Local dependency
LocalDep = { local = "projects/move-awesomeness", addr_subst = { "Std" = "0x1" } }
# Git dependency
MoveStdlib = { git = "https://github.com/diem/diem.git", subdir="language/move-stdlib", rev = "56ab033cc403b489e891424a629e76f643d4fb6b" }
[dev-addresses] # For use when developing this module
AddressToBeFilledIn = "0x101010101"
Expand Down

0 comments on commit c1416df

Please sign in to comment.