If the providers are not in the lockfile fetching the schema fails.
This leads to follow up diagnostics that send an unclear message.
Now we validate the lockfile and if something is missing we skip further validation that relies on
the provider schema being present.
We allow experiments only in alpha builds, and so we propagate the flag
for whether that's allowed in from "package main". We previously had that
plumbed in only as far as the rpcapi startup.
This plumbs the flag all the way into package stackeval so that we can
in turn propagate it to Terraform's module config loader, which is
ultimately the one responsible for ensuring that language experiments can
be enabled only when the flag is set.
Therefore it will now be possible to opt in to language experiments in
modules that are used in stack components.
Each declared provider configuration is now started up and configured
during planning. We don't actually do anything with them yet other than
shut them down again once the plan is complete, but we'll improve on that
in subsequent commits.
This is the public entry point for the overall validation of an entire
stack configuration. So far it supports validation only of input variables,
embedded stack calls, and output values. We'll grow this to support other
language constructs in later commits.
This is a relatively large commit due to introducing various supporting
infrastructure to help make evaluation possible at all. Subsequent commits
will hopefully be more focused due to being able to depend on the
foundations introduced here.
This stubs out the basic structure of stackeval's equivalent of a graph
walk, which is really just a recursive tree walk starting async tasks that
might depend on each other via the abstractions in package "promising".
This initial work is sufficient to validate the inputs to an embedded
stack call when referring to input variables in the calling stack, showing
that the expression evaluation model seems to be working and the use of
promises to deal with dependency ordering seems viable.