a851566c56
Most of the time we're converting from HCL diagnostics to tfdiags as we expose diagnostics directly from HCL, but occasionally we need to to the reverse. For example, our configs package uses hcl.Diagnostics by convention because it's primarily working with HCL, but sometimes it interacts with functions elsewhere (like in the "addrs" package) that return tfdiags.Diagnostics, where they need to be adapted to return in an HCL shape. This should be used with some care because, similar to Diagnostics.ForRPC, it forces immediate flattening of all of the diagnostics to a single type and so can potentially lose internal tracking information that appears in other tfdiags.Diagnostic information, such as the additional metadata tracked in the ConsolidateWarnings result to allow later appending to existing groups. |
||
---|---|---|
.. | ||
config_traversals.go | ||
consolidate_warnings.go | ||
consolidate_warnings_test.go | ||
contextual.go | ||
contextual_test.go | ||
diagnostic.go | ||
diagnostic_base.go | ||
diagnostics.go | ||
diagnostics_test.go | ||
doc.go | ||
error.go | ||
hcl.go | ||
hcl_test.go | ||
rpc_friendly.go | ||
rpc_friendly_test.go | ||
severity_string.go | ||
simple_warning.go | ||
source_range.go | ||
sourceless.go |