-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create tools package to isolate dependencies #1840
Conversation
tools/tools.go
Outdated
// This package contains imports to various tools used (eg, via //go:generate) within this repo, | ||
// allowing them to be versioned and ensuring their dependncies match what the shim use (specifically | ||
// for auto-generated protobuf code). | ||
// Having tools vendored allows `go run <cmd/import/path>` to work without needing to specify a version | ||
// or download code. | ||
// | ||
// Using a dedicate package prevents callers who import github.com/Microsoft/hcsshim from including these | ||
// in their dependencies. | ||
// | ||
// Based on golang [guidance]. | ||
// | ||
// [guidance]: https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think maybe we should break this out into a README and include more information about when to add new dependencies in here and how. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small request, but otherwise lgtm
630842f
to
cd352b2
Compare
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 <[email protected]>
Use `./tools` to prevent callers of `go-winio` from needing to add tools to their dependencies. Similar to microsoft/hcsshim#1840 Signed-off-by: Hamza El-Saawy <[email protected]>
Use `./tools` to prevent callers of `go-winio` from needing to add tools to their dependencies. Similar to microsoft/hcsshim#1840 Signed-off-by: Hamza El-Saawy <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Use `./tools` to prevent callers of `go-winio` from needing to add tools to their dependencies. Similar to microsoft/hcsshim#1840 Signed-off-by: Hamza El-Saawy <[email protected]>
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 <[email protected]> (cherry picked from commit 95c6047) Signed-off-by: Kirtana Ashok <[email protected]>
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 <[email protected]> (cherry picked from commit 95c6047) Signed-off-by: Kirtana Ashok <[email protected]>
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 <[email protected]> (cherry picked from commit 95c6047) Signed-off-by: Kirtana Ashok <[email protected]>
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.