This repository has been archived by the owner on Oct 3, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ext/dynblock: Allow interrogation of _all_ references in blocks
Our API previously had a function only for retrieving the variables used in the for_each and labels arguments used during an Expand call, and expected callers to then interrogate the resulting expanded block to find the other variables required to fully decode the content. That approach is insufficient for any application that needs to know the full set of required variables before any evaluation begins, such as when a dependency graph will be constructed to allow a topological traversal through blocks while evaluating. Now we have WalkVariables, which finds both the variables used to expand _and_ the variables within any blocks. This also renames WalkForEachVariables to WalkExpandVariables since that name is more accurate with the addition of the "label" argument into the expand-time dependency set. There is also a hcldec-based helper wrapper for each of those, allowing single-shot analysis of blocks for applications that use hcldec. This is a breaking change to the dynblock package API, because the old WalkForEachVariables and ForEachVariablesHCLDec functions are no longer present.
- Loading branch information
1 parent
956e03e
commit f9f92da
Showing
3 changed files
with
131 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters