Martin Atkins

Results 1242 comments of Martin Atkins

`gohcl` is generally designed to be used with structs that are written specifically for HCL, rather than structs written for other purposes and then annotated with `hcl` tags. A relatively...

Hi @nickpoulos, The JSON variant of HCL relies on application-defined schema to resolve ambiguity inherent in the simpler JSON syntax (as compared to the HCL native syntax) so there is...

Hi @flurie, As we currently stand, there really is no such thing as "generic HCL". HCL is defined as a set of building blocks that languages can be defined in...

Hi @bluebrown, The `encoding/json` package offers the `Decoder` API because it's able to do streaming decoding where you can tokenize a JSON input in small chunks, without necessarily loading the...

Since an `hcl.Body` is a logical thing rather than a physical thing -- this is the key for the syntax-agnostic decoding and how features like the dynamic block extension work...

I think what you are looking at there is the same problem I was exploring with the separate [hclpack](https://godoc.org/github.com/hashicorp/hcl2/hclpack) experimental package. I don't think that design is quite "right" yet,...

Indeed @mitchellh the current workflow for `hclpack` is kinda inverted from what you tried: instead of converting an existing `hcl.Body` to `hclpack.Body`, you would do the initial _parse_ with `hclpack`...

There are some existing ways to generate HCL native syntax programmatically today: * The lowest-level interface is [the `hclwrite` sub-package](https://pkg.go.dev/github.com/hashicorp/hcl/v2/hclwrite), which provides an API for constructing a new HCL AST...

Hi @julienduchesne! Thanks for working on this, and sorry for the slow response. I do have some reservations about this because it seems like it will make it harder to...

Hi @hairyhenderson, We've not yet strongly considered a media type for HCL because thus far we've not used it in contexts where MIME types are relevant. I went hunting for...