terraform/internal/getproviders
Alisdair McDiarmid fe9a9fadfb internal: Suppress duplicate version constraints
A set of version constraints can contain duplicates. This can happen if
multiple identical constraints are specified throughout a configuration.

When rendering the set, it is confusing to display redundant
constraints. This commit changes the string renderer to only show the
first instance of a given constraint, and adds unit tests for this
function to cover this change.

This also fixes a bug with the locks file generation: previously, a
configuration with redundant constraints would result in this error on
second init:

Error: Invalid provider version constraints

  on .terraform.lock.hcl line 6:
  (source code not available)

The recorded version constraints for provider
registry.terraform.io/hashicorp/random must be written in normalized form:
"3.0.0".
2020-10-22 12:08:00 -04:00
..
testdata internal/getproviders: Allow basedir for local search to be symlink 2020-08-18 14:28:50 -07:00
doc.go internal/getproviders: Query a provider registry 2020-01-10 09:41:27 -08:00
errors.go command: Make provider installation interruptible 2020-09-29 10:00:35 -07:00
filesystem_mirror_source.go command: Make provider installation interruptible 2020-09-29 10:00:35 -07:00
filesystem_mirror_source_test.go command: Make provider installation interruptible 2020-09-29 10:00:35 -07:00
filesystem_search.go getproviders: Don't log if EvalSymlinks changes nothing 2020-10-21 07:49:11 -07:00
filesystem_search_test.go internal/getproviders: Allow basedir for local search to be symlink 2020-08-18 14:28:50 -07:00
hash.go command/init: Read, respect, and update provider dependency locks 2020-10-09 09:26:23 -07:00
hash_test.go getproviders: Add a real type Hash for package hashes 2020-09-24 14:01:54 -07:00
http_mirror_source.go use a single log writer 2020-10-19 14:29:54 -04:00
http_mirror_source_test.go command: Make provider installation interruptible 2020-09-29 10:00:35 -07:00
memoize_source.go command: Make provider installation interruptible 2020-09-29 10:00:35 -07:00
memoize_source_test.go command: Make provider installation interruptible 2020-09-29 10:00:35 -07:00
mock_source.go command: Make provider installation interruptible 2020-09-29 10:00:35 -07:00
multi_source.go command: Make provider installation interruptible 2020-09-29 10:00:35 -07:00
multi_source_test.go command: Make provider installation interruptible 2020-09-29 10:00:35 -07:00
package_authentication.go getproviders: Prepare for having multiple valid hashes per package 2020-09-24 14:01:54 -07:00
package_authentication_test.go getproviders: Prepare for having multiple valid hashes per package 2020-09-24 14:01:54 -07:00
public_keys.go internal: Verify provider signatures on install 2020-04-17 13:57:19 -04:00
registry_client.go use a single log writer 2020-10-19 14:29:54 -04:00
registry_client_test.go command: Make provider installation interruptible 2020-09-29 10:00:35 -07:00
registry_source.go command/init: Remove support for legacy provider addresses 2020-09-30 08:54:57 -07:00
registry_source_test.go command: Make provider installation interruptible 2020-09-29 10:00:35 -07:00
source.go command: Make provider installation interruptible 2020-09-29 10:00:35 -07:00
types.go internal: Suppress duplicate version constraints 2020-10-22 12:08:00 -04:00
types_test.go internal: Suppress duplicate version constraints 2020-10-22 12:08:00 -04:00