-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
Using a dedicated package for tools.go prevents callers who import hcshim from adding the tools to their package's dependencies, while still allowing us to track and vendor them.t p Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Tools | ||
|
||
This package contains imports to various tools used (eg, via `//go:generate`) within the hcsshim repo, | ||
allowing them to be versioned and ensuring their dependencies match what the shim use | ||
(specifically for auto-generated protobuf code). | ||
|
||
Calls to `go run <cmd/import/path>` (or `//go:generate go run <cmd/import/path>`) for go executables | ||
included here will use the version specified in `go.mod` and build the executable from vendored code. | ||
|
||
Using a dedicate package prevents callers who import `github.com/Microsoft/hcsshim` from including these | ||
tools in their dependencies. | ||
|
||
Based on golang [guidance]. | ||
|
||
## Adding Dependencies | ||
|
||
To add a new dependency, add a `_ "cmd/import/path"` to `tools.go`, and then tidy and vendor the repo. | ||
|
||
In general executables used in auto-generating code (eg, `protobuild`, `protoc-gen-go-*`, and co.), or testing | ||
(eg, `gotestsum`, `benchstat`) should be included here. | ||
|
||
[guidance]: https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.