-
Notifications
You must be signed in to change notification settings - Fork 79
deps: fix dependency cycle with testify (#124) #140
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 testify (#124) #140
Conversation
In go.mod exclude the previous of testify to break the dependency cycle. Fixes stretchr#124 and stretchr/testify#1292 (once testify upgrades). go mod edit -exclude=github.com/stretchr/[email protected] go mod tidy
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.
Makes sense, thanks for the fix 👍
Thanks for the merge and the release. As I am now a co-maintainer of testify I'll quickly propose the fix for testify side. |
See stretchr/objx#140 go get github.com/stretchr/[email protected]
$ go mod edit -dropexclude=github.com/stretchr/[email protected] -exclude=github.com/stretchr/[email protected] $ go mod tidy See stretchr/objx#140
$ go mod edit -dropexclude=github.com/stretchr/[email protected] -exclude=github.com/stretchr/[email protected] $ go mod tidy See stretchr/objx#140
Another solution could have been to move the tests in a sub packages and add a go.mod file in it. This way the main go.mod won't use testify and then you would have no cycle dependency. Is there a problem with this idea? |
$ go mod edit -dropexclude=github.com/stretchr/[email protected] -exclude=github.com/stretchr/[email protected] $ go mod tidy See stretchr/objx#140
$ go mod edit -dropexclude=github.com/stretchr/[email protected] -exclude=github.com/stretchr/[email protected] $ go mod tidy See stretchr/objx#140
Summary
In go.mod exclude the previous of testify to break the dependency cycle. Fixes #124 and stretchr/testify#1292 (once testify upgrades).
Checklist
task test
task lint
(well, see gofmt 1.20 #139)