-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add dependencies with v2 or bigger major versions #16100
Conversation
3cfd6b6
to
1cdbace
Compare
@@ -22,7 +22,7 @@ package instance | |||
import ( | |||
"fmt" | |||
|
|||
"github.com/coreos/go-systemd/sdjournal" | |||
"github.com/coreos/go-systemd/v22/sdjournal" |
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.
Is go-systemd
changing the import path on any release? It seems rather inconvenient.
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.
It is going to be inconvenient for us every time we update a major release with go modules. At least they are adopting the modules approach, not like a few of our dependencies. :)
1cdbace
to
3215e84
Compare
3215e84
to
91445e8
Compare
@@ -15,7 +15,7 @@ import ( | |||
"strconv" | |||
"time" | |||
|
|||
"github.com/cespare/xxhash" | |||
xxhash "github.com/cespare/xxhash/v2" |
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.
is the "rename" of v2
to xxhash
required? Is it added by automation? If a package only imports vX
I think one can ommit the renaming part.
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. For some reason goimports
kept removing the line until I added the alias. But now I am able to remove it. So I assume it was some kind of PEBKAC. So I removed thos now.
No new errors has been introduced, merging. |
## What does this PR do? The PR adds the major version to the import paths of modules which have major versions bigger than one. The following modules are impacted: - `github.com/coreos/go-systemd` is updated to use `v22` - `github.com/cespare/xxhash` is updated to use `v2` ## Why is it important? We have a few dependencies with a major version bigger than v1. These modules include the major version in the import path. In order to include the correct dependencies, one needs to add the major version of the module to `go.mod`. Keep in mind that every time we update a dependency to a newer major version, we need to follow-up in the import paths in our source.
## What does this PR do? The PR adds the major version to the import paths of modules which have major versions bigger than one. The following modules are impacted: - `github.com/coreos/go-systemd` is updated to use `v22` - `github.com/cespare/xxhash` is updated to use `v2` ## Why is it important? We have a few dependencies with a major version bigger than v1. These modules include the major version in the import path. In order to include the correct dependencies, one needs to add the major version of the module to `go.mod`. Keep in mind that every time we update a dependency to a newer major version, we need to follow-up in the import paths in our source.
## What does this PR do? The PR adds the major version to the import paths of modules which have major versions bigger than one. The following modules are impacted: - `github.com/coreos/go-systemd` is updated to use `v22` - `github.com/cespare/xxhash` is updated to use `v2` ## Why is it important? We have a few dependencies with a major version bigger than v1. These modules include the major version in the import path. In order to include the correct dependencies, one needs to add the major version of the module to `go.mod`. Keep in mind that every time we update a dependency to a newer major version, we need to follow-up in the import paths in our source.
## What does this PR do? The PR adds the major version to the import paths of modules which have major versions bigger than one. The following modules are impacted: - `github.com/coreos/go-systemd` is updated to use `v22` - `github.com/cespare/xxhash` is updated to use `v2` ## Why is it important? We have a few dependencies with a major version bigger than v1. These modules include the major version in the import path. In order to include the correct dependencies, one needs to add the major version of the module to `go.mod`. Keep in mind that every time we update a dependency to a newer major version, we need to follow-up in the import paths in our source.
## What does this PR do? The PR adds the major version to the import paths of modules which have major versions bigger than one. The following modules are impacted: - `github.com/coreos/go-systemd` is updated to use `v22` - `github.com/cespare/xxhash` is updated to use `v2` ## Why is it important? We have a few dependencies with a major version bigger than v1. These modules include the major version in the import path. In order to include the correct dependencies, one needs to add the major version of the module to `go.mod`. Keep in mind that every time we update a dependency to a newer major version, we need to follow-up in the import paths in our source.
## What does this PR do? The PR adds the major version to the import paths of modules which have major versions bigger than one. The following modules are impacted: - `github.com/coreos/go-systemd` is updated to use `v22` - `github.com/cespare/xxhash` is updated to use `v2` ## Why is it important? We have a few dependencies with a major version bigger than v1. These modules include the major version in the import path. In order to include the correct dependencies, one needs to add the major version of the module to `go.mod`. Keep in mind that every time we update a dependency to a newer major version, we need to follow-up in the import paths in our source.
What does this PR do?
The PR adds the major version to the import paths of modules which have major versions bigger than one.
The following modules are impacted:
github.com/coreos/go-systemd
is updated to usev22
github.com/cespare/xxhash
is updated to usev2
Why is it important?
We have a few dependencies with a major version bigger than v1. These modules include the major version in the import path. In order to include the correct dependencies, one needs to add the major version of the module to
go.mod
.Keep in mind that every time we update a dependency to a newer major version, we need to follow-up in the import paths in our source.
Checklist
- [ ] I have commented my code, particularly in hard-to-understand areas- [ ] I have made corresponding changes to the documentation- [ ] I have made the corresponding change to the default configuration files- [ ] I have added tests that prove my fix is effective or that my feature worksRelated issues