Files
opentf/internal/lang/eval/doc.go
Martin Atkins 72a32f726d lang/eval: Beginnings of a different way to handle config eval
In "package tofu" today we try to do everything using a generic acyclic
graph model and generic graph walk, which _works_ but tends to make every
other part of the problem very hard to follow because we rely a lot on
sidecar shared mutable data structures to propagate results between the
isolated operations.

This is the beginning of an experimental new way to do it where the "graph"
is implied by a model that more closely represents how the language itself
works, with explicit modelling of the relationships between different
types of objects and letting results flow directly from one object to
another without any big shared mutable state.

There's still a lot to do before this is actually complete enough to
evaluate whether it's a viable new design, but I'm considering this a good
starting checkpoint since there's enough here to run a simple test of
propagating data all the way from input variables to output values via
intermediate local values.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-10-27 10:15:41 -07:00

18 lines
828 B
Go

// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
// Package eval aims to encapsulate the details of evaluating the objects
// in an overall configuration, including all of the expressions written inside
// their declarations, in a way that can be reused across various different
// phases of execution.
//
// The scope of this package intentionally excludes concepts like prior state,
// plans, etc, focusing only on dealing with the relationships between objects
// in a configuration. This package is therefore intended to be used as an
// implementation detail of higher-level operations like planning, with the
// caller using the provided hooks to incorporate the results of side-effects
// managed elsewhere.
package eval