opentofu/internal/initwd
Alisdair McDiarmid 8df065a2fe initwd: Switch from earlyconfig to configs
This is a mostly mechanical refactor with a handful of changes which
are necessary due to the semantic difference between earlyconfig and
configs.

When parsing root and descendant modules in the module installer, we now
check the core version requirements inline. If the Terraform version is
incompatible, we drop any other module loader diagnostics. This ensures
that future language additions don't clutter the output and confuse the
user.

We also add two new checks during the module load process:

* Don't try to load a module with a `nil` source address. This is a
  necessary change due to the move away from earlyconfig.

* Don't try to load a module with a blank name (i.e. `module ""`).
  Because our module loading manifest uses the stringified module path
  as its map key, this causes a collision with the root module, and a
  later panic. This is the bug which triggered this refactor in the
  first place.
2023-03-06 09:14:28 -05:00
..
testdata initwd: Switch from earlyconfig to configs 2023-03-06 09:14:28 -05:00
doc.go command: "terraform init" can partially initialize for 0.12upgrade 2019-01-14 11:33:21 -08:00
from_module_test.go initwd: Switch from earlyconfig to configs 2023-03-06 09:14:28 -05:00
from_module.go initwd: Switch from earlyconfig to configs 2023-03-06 09:14:28 -05:00
module_install_hooks.go Move module install functionality over to internal/initwd 2019-01-14 11:33:21 -08:00
module_install_test.go initwd: Switch from earlyconfig to configs 2023-03-06 09:14:28 -05:00
module_install.go initwd: Switch from earlyconfig to configs 2023-03-06 09:14:28 -05:00
testing.go initwd: Switch from earlyconfig to configs 2023-03-06 09:14:28 -05:00