mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-05-17 01:03:30 -04:00
I previously skipped this because I was considering trying to change our HCL fork to return hcl.StaticCall from the "Functions" method instead of (ab)using hcl.Traversal, but since I didn't actually follow through on that I'm instead now making this work with the same caveat previously accepted for schema-based body decoding: we return incomplete hcl.StaticCall objects that only specify the name and source range, omitting the arguments. This is enough for the reference analysis needed to populate the evaluation scope, and now makes it possible to call functions from the definitions of input variables in a module call because those are decoded in "just attributes" mode instead of using a hcldec schema. The FIXME comment added here matches the one in the other FunctionCalls implementations elsewhere in this file, to remind us to update all of them once the upstream HCL API changes. Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
15 KiB
15 KiB