Create tools package to isolate dependencies#1840
Merged
helsaawy merged 1 commit intomicrosoft:mainfrom Jul 18, 2023
Merged
Conversation
tools/tools.go
Outdated
Comment on lines
+3
to
+14
| // 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.
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?
katiewasnothere
approved these changes
Jul 14, 2023
katiewasnothere
left a comment
There was a problem hiding this comment.
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 <hamzaelsaawy@microsoft.com>
helsaawy
added a commit
to helsaawy/go-winio
that referenced
this pull request
Jul 21, 2023
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 <hamzaelsaawy@microsoft.com>
helsaawy
added a commit
to helsaawy/go-winio
that referenced
this pull request
Jul 21, 2023
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 <hamzaelsaawy@microsoft.com>
This was referenced Jul 21, 2023
helsaawy
added a commit
to microsoft/go-winio
that referenced
this pull request
Jul 21, 2023
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 <hamzaelsaawy@microsoft.com>
This was referenced Aug 2, 2023
kiashok
pushed a commit
to kiashok/hcsshim
that referenced
this pull request
Aug 16, 2023
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> (cherry picked from commit 95c6047) Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
kiashok
pushed a commit
to kiashok/hcsshim
that referenced
this pull request
Oct 12, 2023
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> (cherry picked from commit 95c6047) Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
kiashok
pushed a commit
that referenced
this pull request
Oct 13, 2023
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> (cherry picked from commit 95c6047) Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.