-
Notifications
You must be signed in to change notification settings - Fork 60
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
Structure lists given at the uppermost level break pyhcl #11
Comments
Originally the golang hcl parser was inconsistent on how it converted structures like that. Feel free to fix the issue and submit a pull request. |
Shouldn't this issue be closed? This one is resolved. |
Not quite. I can confirm that for the original test case only, pyhcl now provides expected results:
Things begin to fall apart when the objects have multiple keys. I have provided two new test cases below. For the sake of comparison, each case will be accompanied with output from hashicorp's reference HCL parser. (Golang output was generated by Case 1: Inadvertent merging of object lists
The value of the Reference parser gives:
The value of the Case 2: Inadvertent loss of object keys
Reference parser gives:
|
Ah, indeed. Thanks. I did search for new issues before posting my previous update but I missed that PR. I opted to update this bug because these (new) symptoms still only affect structure/object lists at the uppermost level, which I felt was consistent with the title of the original bug report. |
Hashicorp's HCL parser for Go will accept input like the the following:
pyhcl 0.2.1 barfs when given the same input:
I noticed the unit test for this case is currently commented out.
The text was updated successfully, but these errors were encountered: