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

Remove three redundant error-related dependencies #34794

Merged
merged 2 commits into from
Mar 8, 2024

Commits on Mar 8, 2024

  1. dependencies: Remove all non-legacy uses of hashicorp/go-multierror

    This functionality is now provided by the "errors" package in the standard
    library, so the HashiCorp-specific library is obsolete.
    
    This also removed our one direct use of github.com/pkg/errors, which we
    were using in a way that was totally redundant with the stdlib package
    errors. However, it lives on as an indirect dependency through the Consul
    backend's dependency on the Consul SDK, which uses that library.
    apparentlymart committed Mar 8, 2024
    Configuration menu
    Copy the full SHA
    9ca1505 View commit details
    Browse the repository at this point in the history
  2. tfdiags: Support errors.Join and stdlib wrapped errors

    HashiCorp needed support for wrapping multiple errors into a single error
    and for wrapping one error inside another long before that was in the
    standard library, and so built its own libraries for those needs.
    
    However, the standard library now has its own answers for both and so the
    HashiCorp libraries are redundant. We've already eliminated all use of
    both elsewhere in Terraform (except for some legacy packages that predate
    tfdiags anyway), so we no longer need to support them in package tfdiags.
    apparentlymart committed Mar 8, 2024
    Configuration menu
    Copy the full SHA
    594b2ee View commit details
    Browse the repository at this point in the history