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
Generated YAML programs have four-space files, despite two-space templates #361
Comments
I think this is related to YAML roundtripping which is an existing issue in pulumi/pulumi. @iwahbe might have more context. |
This is definitely part of YAML rountripping. In this case I think we should just standardize on a number of spaces and enforce it. Regardless of if its 2 or 4, we should always output the same YAML. |
Likely not relevant for the implementation, but what we choose (and I have no pref at all) should probably align with the spacing we use in all of our docs and examples as well. For me at least, it was copy-pasting two-space example code into these four-space-ified templates that led me to post this issue. |
FWIW - I believe we have decided on a two space standard, and should apply that everywhere. Agree with @cnunciato on aligning with examples codegen. |
@AaronFriel let's take it on the YAML GA epic. |
@cnunciato I think this can be closed thanks to pulumi/pulumi#11456. |
This is also now imposed by that same change, if a template contains 4 space indentation, that'll be overridden on save to 2. |
What happened?
When I run
pulumi new aws-yaml
, for example, I get a program file with four-space formatting, despite that the template is defined with two-space indentation:Source template:
Resulting program:
Steps to reproduce
Run
pulumi new aws-yaml
and examine the contents ofPulumi.yaml
.Expected Behavior
Pulumi.yaml uses two-space indentation, or at least indentation matching that of its source template file(s).
Actual Behavior
It uses four-space indentation.
Output of
pulumi about
No response
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).
The text was updated successfully, but these errors were encountered: