pulumi / pulumi-lsp

A LSP server for Pulumi YAML
Apache License 2.0
22 stars 0 forks source link

Cannot support embedded jinjia expressions #101

Open GaryLiuTelus opened 2 months ago

GaryLiuTelus commented 2 months ago

What happened?

If there are any embedded jinjia expression, it give error of "found character that cannot start any token"

Example

pause: {% if TYPE == "a" -%} true {%elif TYPE = "b" -%} false {%- endif %}

Output of pulumi about

pulumi version output "v3.131.0", while pulumi about return nothing.

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

justinvp commented 2 months ago

Thanks for the issue, @GaryLiuTelus!

I'm curious, how are you using jinja expressions today with your Pulumi YAML. Are you compiling it with the compiler option? Or something else?

GaryLiuTelus commented 2 months ago

Hi Justin, thanks for your attention. We have an existing CI/CD process to handle all these Pulumi YAML files . We just submit the changes to the git repo and it will automatically trigger the deployment process. No compiling is involved.

When I edit the YAML file in VS Code with Pulumi YAML extension, it shows errors where there is a Jinjia expression, as shown below:

Image