Skip to content

deps: bump objx to v0.5.3 and remove dependency cycle issue#1823

Open
ccoVeille wants to merge 1 commit intostretchr:masterfrom
ccoveille-forks:bump-objx
Open

deps: bump objx to v0.5.3 and remove dependency cycle issue#1823
ccoVeille wants to merge 1 commit intostretchr:masterfrom
ccoveille-forks:bump-objx

Conversation

@ccoVeille
Copy link
Collaborator

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

It resolves an old issue of cyclic dependencies that had been to address multiple times.

Related issues

Closes #1807

Related to

@dolmen
Copy link
Collaborator

dolmen commented Feb 23, 2026

@ccoVeille Please rebase.

Copilot AI review requested due to automatic review settings February 23, 2026 19:06
@ccoVeille
Copy link
Collaborator Author

Please rebase.

@dolmen it's done

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that objx declares Go 1.20 in its go.mod, while this go.mod uses 1.17, will this cause any problems now or in the future?

For example, if someone in objx replaces interface{} with any (a Go 1.18 feature) and cuts a new release, we might encounter problems.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

stretchr/objx@762bf42

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants