terraform/internal/modsdir
Martin Atkins 5d87e32eb9 moduleaddrs: Split module source address parsing from package addrs
Our package addrs ends up getting imported from just about ever other
package in Terraform, because it contains the types we use to talk about
various different kinds of objects. Therefore we typically try to keep its
transitive dependency graph relatively small, because anything it depends
on becomes an indirect dependency of nearly everything else.

A while back we moved the module source address models into package addrs,
which also brought with them the code for parsing strings to produce those
addresses. Unfortunately, remote module source addresses are defined using
the external dependency go-getter, which is pretty heavy itself and also
brings with it numerous other external dependencies such as the AWS SDK,
the Google Cloud Platform SDK, etc.

Since only relatively few packages actually need to _parse_ source
addresses -- with most either not caring about them at all or only
consuming addresses that were already parsed by someone else -- we'll
move the parser functions into their own package, while keeping the
resulting address types in package addrs.

This does still retain the package addrs dependency on external module
github.com/hashicorp/terraform-registry-address, which is not ideal but
that one at least has a relatively shallow dependency subgraph, so there's
not so much urgency to tidy that one.
2024-03-14 09:58:30 -07:00
..
doc.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
manifest.go moduleaddrs: Split module source address parsing from package addrs 2024-03-14 09:58:30 -07:00
paths.go Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00