-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: avoid in-place modifications of AST nodes in the partial evaluation #1943
Conversation
|
Signed-off-by: i4k <[email protected]>
Preview of ubuntu-focal/go1.21 tests in 348133d🔍 View Details on Terramate Cloud generate/genhcl
hcl/ast
hcl/eval
mapexpr
stdlib
|
Preview of macos-ventura/go1.21 tests in 348133d🔍 View Details on Terramate Cloud generate/genhcl
hcl/ast
hcl/eval
mapexpr
stdlib
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice. This branch works perfectly fine on the customer repo and take 6 seconds to run generate there!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
It could be nice have a test in the future that invokes partialEval
(or something further up the call tree) in parallel to potentially catch any remaining race conditions.
The base branch was changed.
What this PR does / why we need it:
The in-place AST modifications were a nice optimization when generation was serial but with the introduction of #1937 it's racy.
Which issue(s) this PR fixes:
none
Special notes for your reviewer:
Does this PR introduce a user-facing change?