cosign: proposal: remove pkg/errors dependency
Description
The pkg/errors package has been deprecated. I think remove this dependency will more maintainability.
Actually, use fmt.Errorf with %w verb.
Also, I would like to point out that they are mixed in current cosign’s souce code.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 15 (15 by maintainers)
I think we can say this is done! Thanks @zchee for taking this on, and for teaching me about Go analyzers in the process. 👍
@imjasonh OK, finished initial implements
pkgerrorsvet tool. https://github.com/zchee/go-analyzer/tree/main/pkgerrorsFYI, also chasing down some usages in dependencies:
I’ve sent https://github.com/sigstore/sigstore/pull/444/ to drop it from sigstore/sigstore
@imjasonh Yeah, I focus to sigstore/cosign at first. But if you want, I’ll also cleanup to sigstore/xxx (actually, sigstore orgs) repositories.
And yes, remove all pkg/errors dependency would be hard, I think ok to
+indirect.I added a quick WIP depcheck_test to help ensure we don’t depend on this and uhh…we have a lot of transitive deps on it:
The sigstore/cosign ones should be easy enough to drop, and there are also some in sigstore/sigstore and sigstore/rekor, but the rest will probably take a lot more work. At least getting them out of our own tree(s) will be nice.
@imjasonh @dlorenc will do cleanup.