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.
Here we introduce a new evaluation phase for the stacks runtime called
"inspect", which aims to provide a read-only view of a configuration and
an associated state snapshot.
The main idea of this is to use it as a more convenient vehicle for unit
testing despite it not really being viable to decompose the main
evaluation logic into smaller parts: the language features are all directly
interdependent on one another, but we can at least minimize our
interactions with the Terraform modules runtime when we're testing
anything other than actually planning and applying components.
However, this also gives an opportunity to expose evaluation of arbitrary
expressions in a similar manner as "terraform console", which is for now
just another debugging aid but will probably someday appear as a
Stacks-flavored version of the "terraform console" command.