terraform/internal/depsfile
Martin Atkins 5f2eab6944 providerreqs: Provider requirement/version types in their own package
As we previously found with "package addrs", any package that contains
types used as identifiers or addresses tends to get imported from all over,
which means that if we mix real logic with those types in the same package
then a lot more packages end up depending indirectly on our external
dependencies.

In this case, the getproviders package depends on various things we need
only during provider installation, such as the library we use for GPG
signature verification. Lots of different packages in Terraform need to
talk about provider requirements, but only the CLI layer actually needs to
do provider installation, and so this commit splits the types we use to
talk about requirements into a new package "providerreqs", which
package getproviders then depends on.

To keep the size of this diff relatively small to start I've left
forwarding aliases in package getproviders, which means that not all of
the callers needed to be updated all at once. This commit does update
all of the packages that the remote state backends depend on though,
because that then allows us to reduce the set of indirect dependencies
for each of those backends.

The nested module go.mod files show that this has disconnected the indirect
dependencies on github.com/ProtonMail/go-crypto and on
github.com/cloudflare/circl , both of which Terraform CLI uses only for
provider installation.
2024-03-11 12:52:24 -07:00
..
testdata/locks-files depsfile: Flatten the "hashes" locks to a single set of strings 2020-09-24 14:01:54 -07:00
doc.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
locks.go providerreqs: Provider requirement/version types in their own package 2024-03-11 12:52:24 -07:00
locks_file.go providerreqs: Provider requirement/version types in their own package 2024-03-11 12:52:24 -07:00
locks_file_test.go providerreqs: Provider requirement/version types in their own package 2024-03-11 12:52:24 -07:00
locks_test.go providerreqs: Provider requirement/version types in their own package 2024-03-11 12:52:24 -07:00
paths.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
testing.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00