Skip to content
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

Add function inspections #676

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

cam72cam
Copy link

With the focus on functions in recent hcl releases, I thought it time to introduce the ability to inspect which functions are required to evaluate expressions. This mirrors the Variable traversal present throughout the codebase.

This allows for better error messages and optimizations to be built around supplying custom functions by consumers of HCL.

These changes are backwards compatible and is not a breaking change. I explicitly introduced hcl.ExpressionWithFunctions to allow consumers to opt-into supporting function inspection. I would recommend that this be moved into hcl.Expression if a major version with API changes is ever considered.

@cam72cam
Copy link
Author

Hi @apparentlymart, would you be able to take a look at this? It looks like you have done most of the reviews on function related features.

@yolo-minseongseo
Copy link

sry. I made a mistake. IDK how to dismiss my approval🤣

@cam72cam
Copy link
Author

@jbardin @liamcervante, could I get some eyes on this?

@jbardin
Copy link
Member

jbardin commented May 13, 2024

Thanks for the contribution @cam72cam! I should be able to take a look at this soon.

@jbardin jbardin self-assigned this May 13, 2024
@cam72cam
Copy link
Author

@jbardin any updates on having time to review this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants