deps: bump objx to v0.5.3 and remove dependency cycle issue#1823
deps: bump objx to v0.5.3 and remove dependency cycle issue#1823ccoVeille wants to merge 1 commit intostretchr:masterfrom
Conversation
|
@ccoVeille Please rebase. |
@dolmen it's done |
There was a problem hiding this comment.
Pull request overview
This PR resolves the long-standing cyclic dependency issue between testify and objx by bumping objx to v0.5.3, which no longer uses testify for its tests. This eliminates the need for the previous workaround of excluding specific testify versions in go.mod.
Changes:
- Bumped github.com/stretchr/objx from v0.5.2 to v0.5.3
- Removed the exclude directive for github.com/stretchr/testify v1.8.4
- Cleaned up go.sum by removing unused module references and updating checksums
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| go.mod | Updated objx to v0.5.3, removed exclude directive and workaround comments |
| go.sum | Updated checksums for objx v0.5.3 and removed unused module references |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| require ( | ||
| github.com/stretchr/objx v0.5.2 // To avoid a cycle the version of testify used by objx should be excluded below | ||
| github.com/stretchr/objx v0.5.3 |
There was a problem hiding this comment.
There was a problem hiding this comment.
You are right. But the issue you raise is not new objx v0.5.2 was the version that bumped the objx minimal version.
https://github.com/stretchr/objx/releases/tag/v0.5.2
The commit is there
objx is only used for this struct
type Map map[string]interface{}
And you are right, if objx.Map was updated to be a may[string]any the testify support of Go 1.17 would be broken for this.
But that said the objx.Map is used for a niche thing. And Go 1.17 could be abandoned. But for now, I would say it's OK.
Changes
Bump the objx dependency, clean up the go.mod
Motivation
The latest version objx no longer uses testify as a test suite.
Thanks to @emilien-puget work with stretchr/objx#159
testifyassertions with custom testing helpers objx#159It resolves an old issue of cyclic dependencies that had been to address multiple times.
Related issues
Closes #1807
Related to