Skip to content
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: use Go standard errors #34255

Closed

Conversation

mmorel-35
Copy link

github.com/pkg/errors is deprecated and shall be replaced. As only errors.New method is actually used here this is a very easy replacement.

Target Release

1.5.x

Draft CHANGELOG entry

ENHANCEMENTS

  • use Go standard errors instead of github.com/pkg/errors

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
@crw
Copy link
Collaborator

crw commented Nov 16, 2023

Thanks for this submission, I've included it for triage.

@apparentlymart
Copy link
Contributor

Thanks @mmorel-35!

I've labeled this for the attention of the OSS backend maintainers, since that backend is maintained by a different group then much of the rest of this codebase.

It's unfortunate that apparently at least one of our dependencies also depends on this, and so the module will still end up compiled into Terraform CLI releases regardless. But at least hopefully one day it'll be gone, once the rest of the ecosystem moves away from this deprecated module.

@apparentlymart
Copy link
Contributor

Hi again @mmorel-35!

Recently I've been working on some general external dependency cleanup and consolidation, and so I ended up doing the same thing you did here as part of #34794. I must admit that I'd forgotten about this PR at the time I was working on that, but I made essentially the same change you proposed here, while also additionally removing HashiCorp's own now-redundant go-multierror module.

In the process of investigating that I also learned that it's the Consul SDK that still depends on this old module (although it might not be the only example in our dependency graph) and so the Consul team will need to migrate to the stdlib errors and we'll need to upgrade the SDK before it'll be gone from our go.mod files altogether.

Thanks for working on this!

@mmorel-35 mmorel-35 deleted the github.com/pkg/errors branch March 14, 2024 23:20
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants