Skip to content

chore: replace unnecessary go-multierror dependency#3243

Merged
dnwe merged 7 commits intoIBM:mainfrom
bestbug456:update-errors-wrapper
Aug 25, 2025
Merged

chore: replace unnecessary go-multierror dependency#3243
dnwe merged 7 commits intoIBM:mainfrom
bestbug456:update-errors-wrapper

Conversation

@bestbug456
Copy link
Copy Markdown
Contributor

Hello,

This proposal of changes remove the hashicorp dependencies, after scratching my head for a while I was not able to seen a good reason for keeping this dependencies and I hope that this commit was able to achieve it without losing any functionalities, at least from test execution everything looks like as before. The reason why I'm proposing this change is for two reason:

  • I don't think is worth as dependence for the little contribution that is doing now days (hoping to not have misunderstood it)
  • I personally find confusing when a project with MIT license use a third party library with GPL library, especially if the perimeter is very little like this one

Thanks for your time in reading this pull request!

@dnwe dnwe changed the title remove hashicorp reference chore: replace unnecessary go-multierror dependency Aug 11, 2025
Copy link
Copy Markdown
Collaborator

@puellanivis puellanivis left a comment

Choose a reason for hiding this comment

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

Code looks fine, only some godoc lint.

No need to wait for a reapproval from me if this is the only change taken after this.

errors.go Outdated
Comment on lines +92 to +93
// Deprecated: MultiErrorFormat specifies the formatter applied to format multierrors.
// Please use errors.Join() instead
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Godoc should still start with the exported symbol name. The deprecation should follow the first paragraph as a separate paragraph.

Suggested change
// Deprecated: MultiErrorFormat specifies the formatter applied to format multierrors.
// Please use errors.Join() instead
// MultiErrorFormat specifies the formatter applied to format multierrors.
//
// Deprecated: Please use [errors.Join] instead.

It could potentially also still include the information about how it’s copying hashicorp’s multierror despite us no longer including the import. Since its style still(?) copies their format.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've updated the deprecation notice, running go fmt errors.go it does not produce any code changes.

@dnwe dnwe added the chore label Aug 18, 2025
@dnwe dnwe merged commit 088f8c5 into IBM:main Aug 25, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants