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

Create an error type for unknown function diags #657

Merged
merged 1 commit into from
Feb 14, 2024

Commits on Feb 14, 2024

  1. Create an error type for unknown function diags

    Now that we have namespaced functions, and implementations like
    Terraform can add functions based on configuration, the reason for an
    unknown function call name becomes a little less clear. Because
    functions are populated outside of the hcl package scope, there isn't
    enough context to provide a useful diagnostic to the user.
    
    We can create a new Diagnostic.Extra value for
    FunctionCallUnknownDiagExtra to indicate specifically when a diagnostic
    is created due to an unknown function name. This will carry back the
    namespace and function name for the caller to inspect, which will allow
    refinement of the diagnostic based on information only known to the
    caller.
    jbardin committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    159a39d View commit details
    Browse the repository at this point in the history