-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
deps: fix dependency cycle with objx (again) #1567
base: master
Are you sure you want to change the base?
Conversation
$ go mod edit -dropexclude=github.com/stretchr/[email protected] -exclude=github.com/stretchr/[email protected] $ go mod tidy See stretchr/objx#140
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.
Can you put a comment after line 10 to explain how to check this is correctly set for the next time dependabot updates objx?
It is not yet clear to me if we will have to continuously upgrade the It is quite unfortunate that objx has been upgraded to |
What is the purpose of this change? If it is to minimise the size of the module graph; then the exclude should always be set to the version of testify which the version of objx we use imports. |
The purpose of this line is to cut the circular graph of dependencies of objx and testify, and tell testify -> objx v0.5.2 -> testify v1.8.2 -> objx v0.5.0 -> testify v1.8.0 -> objx v0.4.0 -> testify v1.7.1 -> objx v0.1.0 |
How about? require (
github.com/davecgh/go-spew v1.1.1
github.com/pmezard/go-difflib v1.0.0
github.com/stretchr/objx v0.5.2 // to avoid a cycle the verision of testify used by objx should be excluded
gopkg.in/yaml.v3 v3.0.1
) |
@brackendawson I don't understand what you suggest. |
I am suggesting to add the above comment to line 10 of the go.mod file. This change was missed because the person that merged the dependabot PR didn't know there was an additional requirement. The next person to review a dependabot PR may not be you or I. If there is a comment on the line then the reviewer is likely to notice? |
Summary
Update
go.mod
to break dependency cycle withgithub.jparrowsec.cn/stretchr/objx
v0.5.2
which depends on testifyv1.9.0
.Changes
Motivation
Dependency pollution in downstream projects
Related issues