Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

Commit

Permalink
README.md: Update Vendored Dependencies section (#1667)
Browse files Browse the repository at this point in the history
* README.md: Update Vendored Dependencies section

* README.md: remove redundant information from Vendored Dependencies section
  • Loading branch information
janos authored and zelig committed Aug 14, 2019
1 parent 7ee35e3 commit 76d2eba
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,14 @@ $ git clone git@github.com:nirname/swarm.git $GOPATH/src/github.com/ethersphere/

### Vendored Dependencies

All dependencies are tracked in the `vendor` directory. We use `go mod` to manage depenedencies, except for `go mod vendor` command. Vendoring is done by Makefile rule `make vendor` which uses `go mod vendor` and additionally copies cgo dependencies into `vendor` directory from go modules cache.
Vendoring is done by Makefile rule `make vendor` which uses `go mod vendor` and additionally copies cgo dependencies into `vendor` directory from go modules cache.

If you want to add a new dependency, run `GO111MODULE=on go get <import-path>`, vendor it `make vednor`, then commit the result.
If you want to add a new dependency, run `GO111MODULE=on go get <import-path>`, vendor it `make vendor`, then commit the result.

If you want to update all dependencies to their latest upstream version, run `GO111MODULE=on go get -u all` and vendor them with `make vendor`.

By default, `go` tool will use dependencies defined in `go.mod` file from modules cache. In order to import code from `vendor` directory, an additional flag `-mod=vendor` must be provided when calling `go run`, `go test`, `go build` and `go install`. If `vendor` directory is in sync with `go.mod` file by updating it with `make vendor`, there should be no difference to use the flag or not. All Swarm build tools are using code only from the `vendor` directory and it is encouraged to do the same in the development process, as well.


### Testing

Expand Down

0 comments on commit 76d2eba

Please sign in to comment.