hcl
hcl copied to clipboard
Error formatting can result in "<nil>" in output
The conversion of a Diagnostic to an error string assumes a meaningful subject: https://github.com/hashicorp/hcl/blob/90676d47a0ce038f02596e2aa5894bf0c57fad56/diagnostic.go#L77
In practice I'm seeing errors such as <nil>: Configuration file not found; The configuration file foo.hcl does not exist.
which are a bit ugly. Should the inclusion of Subject
be conditional, or would that cause issues by breaking the current X:Y structure?