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

fix(hcl2cdk): Heredocs expression parsing #2758

Merged
merged 1 commit into from
Apr 3, 2023
Merged

Conversation

mutahhir
Copy link
Contributor

@mutahhir mutahhir commented Apr 3, 2023

Related issue

Fixes #2753

Description

For string based expressions, we were wrapping them in quotes, and not checking if the expression was a here document. This PR fixes that oversight. Additionally, HCL expects a newline at the end of the HEREDOC trailing marker, so the code also force-adds a new line if it doesn't exist.

Checklist

  • I have updated the PR title to match CDKTF's style guide
  • I have run the linter on my code locally
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation if applicable
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works if applicable
  • New and existing unit tests pass locally with my changes

Copy link
Member

@ansgarm ansgarm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 💯

@mutahhir mutahhir merged commit ed4012a into main Apr 3, 2023
180 of 183 checks passed
@mutahhir mutahhir deleted the fix/heredocs-expressions branch April 3, 2023 08:52
@mutahhir mutahhir mentioned this pull request Apr 18, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 4, 2023

I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Convert: Heredoc seems to break expression parsing
4 participants