hashicorp / hcl2

Former temporary home for experimental new version of HCL
https://github.com/hashicorp/hcl
Mozilla Public License 2.0
373 stars 66 forks source link

hclwriter/parser: fix parsing blocks with labels #22

Closed fatih closed 4 years ago

fatih commented 6 years ago

There was no test case for parsing a block with a label. If you run the test without the fix you'll see that it panics because LabelTokensFlat is empty.

fatih commented 6 years ago

Btw I'm not sure what LabelTokensFlat means. I think better is to just assign the seq to LabelTokensFlat. Let me know if you prefer a different solution.

apparentlymart commented 6 years ago

Hi @fatih!

Sorry I didn't see this sooner. I am currently knee-deep in integrating this codebase into Terraform so I can't look at this immediately but I will look more closely in a little while once the Terraform work has settled.

hashibot commented 4 years ago

Hello! :robot:

Thank you for working on this change proposal.

Further development of HCL 2 will now be done in the main HCL repository. For reasons of compatibility with existing Go callers still using GOPATH mode, the master branch still tracks HCL 1 at this time, but we'll be continuing development of HCL 2 in a branch. For more information, please see the Version Selection wiki page.

Unfortunately, we can't robustly perform an automatic migration of pull requests into the new repository, and so my human friends have asked me to close out all of the existing PRs to reflect that sadly they cannot be merged in their current state. :confounded:

If you have the time and motivation, we'd love to continue discussion of this and the other existing proposed changes in the hashicorp/hcl repository in a new PR targeting the hcl2 branch. We're sorry that we weren't able to merge this prior to the transfer, and now cannot automatically migrate your PR to the new repository.

The hashicorp/hcl2 repository will soon be archived to reflect the fact that no new development is planned here. The repository will remain in place for the time being so that existing callers can continue to use it while they plan a migration to the new import paths and to a stable release of HCL 2.