Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: hashicorp/hcl
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.12.0
Choose a base ref
...
head repository: hashicorp/hcl
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.13.0
Choose a head ref
  • 13 commits
  • 161 files changed
  • 5 contributors

Commits on Apr 1, 2022

  1. use Go 1.18 native fuzzing

    kmoe committed Apr 1, 2022
    Configuration menu
    Copy the full SHA
    4fd729c View commit details
    Browse the repository at this point in the history
  2. use Go 1.18 in CI

    kmoe authored Apr 1, 2022
    Configuration menu
    Copy the full SHA
    3e304a4 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2022

  1. Configuration menu
    Copy the full SHA
    5cff078 View commit details
    Browse the repository at this point in the history

Commits on May 17, 2022

  1. deps: update crypto dependency for macOS support

    Not sure if this is M1 specific or just newer versions of macOS altogether,
    but hclfmt cannot be installed with the transitive dependency on
    `golang.org/x/sys@v0.0.0-20190502175342-a43fa875dd82`
    caused by the dependency on `golang.org/x/crypto`.
    
    Update the crypto library so that a newer version of sys gets pulled in,
    which compiles fine.
    shoenig committed May 17, 2022
    Configuration menu
    Copy the full SHA
    8927e75 View commit details
    Browse the repository at this point in the history

Commits on May 20, 2022

  1. Merge pull request #522 from hashicorp/update-deps-for-macos

    deps: update crypto dependency for macOS support
    shoenig authored May 20, 2022
    Configuration menu
    Copy the full SHA
    d0c4fa8 View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2022

  1. hclwrite: fix data race modifying the internal "nilToken" variable

    This global variable is supposed to be treated as immutable.
    TomerHeber authored Jun 14, 2022
    Configuration menu
    Copy the full SHA
    63d288b View commit details
    Browse the repository at this point in the history
  2. Update CHANGELOG.md

    apparentlymart authored Jun 14, 2022
    Configuration menu
    Copy the full SHA
    efb710f View commit details
    Browse the repository at this point in the history
  3. go.mod: Specify that we use the Go 1.17 language in this module

    The main motivation here is that we were apparently using bit shifting
    with signed shift amounts even though modern Go toolchains seem to raise
    that as an error if the go.mod file selects a language version less than
    Go 1.13.
    
    Go 1.17 is therefore newer than we strictly need to solve that particular
    problem, but gets us caught up with a relatively release of the language.
    This alone doesn't break compatibility for anyone using older versions of
    Go with HCL, since the Go toolchain will still attempt to compile modules
    targeting later versions and will only mention the newer language version
    if compilation would already have failed for some other reason.
    apparentlymart committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    c3b6715 View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2022

  1. go fmt

    kmoe committed Jun 21, 2022
    Configuration menu
    Copy the full SHA
    c020cb9 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #508 from hashicorp/go118fuzz

    Port fuzz testing to Go 1.18 native fuzzing
    kmoe authored Jun 21, 2022
    Configuration menu
    Copy the full SHA
    986b881 View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2022

  1. hcl: Allow individual diagnostics to carry extra information

    The primary goal of the diagnostics design in HCL is to return
    high-quality diagnostics messages primarily for human consumption, and so
    their regular structure is only machine-processable in a general sense
    where we treat all diagnostics as subject to the same processing.
    
    A few times now we've ended up wanting to carry some additional optional
    contextual information along with the diagnostic, for example so that a
    more advanced diagnostics renderer might optionally annotate a diagnostic
    with extra notes to help the reader debug.
    
    We got pretty far with our previous extension of hcl.Diagnostic to include
    the Expression and EvalContext fields, which allow an advanced diagnostic
    renderer to offer hints about what values contributed to the expression
    that failed, but some context is even more specific than that, or is
    defined by the application itself and therefore not appropriate to model
    directly here in HCL.
    
    As a pragmatic compromise then, here we introduce one more field Extra
    to hcl.Diagnostic, which comes with a documented convention of placing
    into it situation-specific values that implement particular interfaces,
    and therefore a diagnostics renderer or other consumer can potentially
    "sniff" this field for particular interfaces it knows about and treat them
    in a special way if present.
    
    Since there is only one field here that might end up being asked to
    capture multiple extra values as the call stack unwinds, there is also a
    simple predefined protocol for "unwrapping" extra values in order to find
    nested implementations within.
    
    
    For callers that are prepared to require Go 1.18, the helper function
    hcl.DiagnosticExtra provides a type-assertion-like mechanism for sniffing
    for a particular interface type while automatically respecting the nesting
    protocol. For the moment that function lives behind a build constraint
    so that callers which are not yet ready to use Go 1.18 can continue to
    use other parts of HCL, and can implement a non-generic equivalent of
    this function within their own codebase if absolutely necessary.
    
    As an initial example to demonstrate the idea I've also implemented some
    extra information for error diagnostics returned from FunctionCallExpr,
    which gives the name of the function being called and, if the diagnostic
    is describing an error returned by the function itself, a direct reference
    to the raw error value returned from the function call. I anticipate a
    diagnostic renderer sniffing for hclsyntax.FunctionCallDiagExtra to see
    if a particular diagnostic is related to a function call, and if so to
    include additional context about the signature of that function in the
    diagnostic messages (by correlating with the function in the EvalContext
    functions table). For example:
        While calling: join(separator, list)
    
    An example application-specific "extra value" could be for Terraform to
    annotate diagnostics that relate to situations where an unknown value is
    invalid, or where a "sensitive" value (a Terraform-specific value mark) is
    invalid, so that the diagnostic renderer can avoid distracting users with
    "red herring" commentary about unknown or sensitive values unless they
    seem likely to be relevant to the error being printed.
    apparentlymart committed Jun 22, 2022
    Configuration menu
    Copy the full SHA
    88ecd13 View commit details
    Browse the repository at this point in the history
  2. Update CHANGELOG.md

    apparentlymart authored Jun 22, 2022
    Configuration menu
    Copy the full SHA
    ee5af8c View commit details
    Browse the repository at this point in the history
  3. Release v2.13.0

    apparentlymart committed Jun 22, 2022
    Configuration menu
    Copy the full SHA
    bc4516e View commit details
    Browse the repository at this point in the history
Loading