-
Notifications
You must be signed in to change notification settings - Fork 18
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
Switch to go modules #3
Conversation
@cyphar @kolyshkin PTAL (follow-up is in #4) |
So, why go 1.12 and not, say, 1.14 (the oldest currently supported release), or 1.13 (the most fresh unsupported release)? |
Trying to keep the go.mod to reflect the actual minimum required version of Go (although I don't think go modules so far enforce the minimum version specified) |
This patch replaces the vendor.conf with a go.mod, and re-vendors the pkg/errors files from upstream. This commit is mostly to preserve history of the local changes that were made to the pkg/errors package (which appear to have been made for debugging purposes). Setting the minimum go version in go.mod to v1.7 for this commit, which matches the lowest version that's testet against in CI. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
raising the minimum go version in go.mod 1.12, to fetch the dependency module. Updated travis to test against 1.12 (minimum version) and 1.15 (current stable). Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
// Debug sets whether or not debugging is enabled. If enabled, then formatting | ||
// an error wrapped by pkg/error with "%v" will return a full stack trace. This | ||
// allows you to dynamically decide whether to output stack traces (without | ||
// having to use "%+v" indiscriminately). | ||
func Debug(value bool) { | ||
debugEnabled.Set(value) | ||
} |
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.
Not sure if you noticed this, but this is actually a patched version of pkg/error
. Though we don't really need this anymore, so no worries.
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.
Yes, I noticed; I did the first commit separately for that;
This commit is mostly to preserve history of the local changes that were made to the pkg/errors package (which appear to have been made for debugging purposes). (...)
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.
Sorry, my fault for not reading 🙇.
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.
No worries! It was a good catch 👍
Closing in favour of #7. |
Splitting into two commits for a clearer history;
add go.mod and vendor upstream pkg/errors v0.8.0
This patch replaces the vendor.conf with a go.mod, and re-vendors the pkg/errors files from upstream. This commit is mostly to preserve history of the local changes that were made to the pkg/errors package (which appear to have been made for debugging purposes). Setting the minimum go version in go.mod to v1.7 for this commit, which matches the lowest version that's testet against in CI.
go.mod: update pkg/errors v0.9.1 and remove local vendor
raising the minimum go version in go.mod 1.12, to fetch the dependency module. Updated travis to test against 1.12 (minimum version) and 1.15 (current stable).
I'll also open a follow-up to remove the dependency on pkg/errors, however that requires Go 1.13 or up, so perhaps you'd want to keep that separate (and tag a separate version for that change)