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.13.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.14.1
Choose a head ref
  • 10 commits
  • 6 files changed
  • 2 contributors

Commits on Jun 22, 2022

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

Commits on Aug 23, 2022

  1. typeexpr: Optional object attributes with defaults

    This commit extends the type expression package to add two new features:
    
    - In constraint mode, the `optional(...)` modifier can be used on object
      attributes to allow them to be omitted from input values to a type
      conversion process. Any such missing attributes will be replaced with
      a `null` value of the appropriate type upon conversion.
    - In the new defaults mode, the `optional(...)` modifier takes a second
      argument, which accepts a default value of an appropriate type. These
      defaults are returned alongside the type constraint, and may be
      applied prior to type conversion through the new `Defaults.Apply()`
      method.
    
    This change is upstreamed from Terraform, where optional object
    attributes have been available for some time. The defaults functionality
    is new and due to be released with Terraform 1.3.
    alisdair committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    47464b2 View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2022

  1. Merge pull request #549 from hashicorp/typeexpr-optional-defaults

    typeexpr: Optional object attributes with defaults
    alisdair authored Sep 1, 2022
    Configuration menu
    Copy the full SHA
    75d5692 View commit details
    Browse the repository at this point in the history
  2. Update CHANGELOG.md

    alisdair authored Sep 1, 2022
    Configuration menu
    Copy the full SHA
    8f2d3d7 View commit details
    Browse the repository at this point in the history
  3. Release v2.14.0

    alisdair authored Sep 1, 2022
    Configuration menu
    Copy the full SHA
    c4381b5 View commit details
    Browse the repository at this point in the history
  4. Update CHANGELOG.md

    alisdair authored Sep 1, 2022
    Configuration menu
    Copy the full SHA
    74d03f3 View commit details
    Browse the repository at this point in the history
  5. Update CHANGELOG.md

    alisdair authored Sep 1, 2022
    Configuration menu
    Copy the full SHA
    85e45c5 View commit details
    Browse the repository at this point in the history

Commits on Sep 22, 2022

  1. ext/typeexpr: Convert defaults for optional attrs

    When parsing optional object attribute defaults, we previously verified
    that the default value was convertible to the attribute type. However,
    we did not keep this converted value.
    
    This commit uses the converted default value, rather than delaying
    conversion until later. In turn this prevents crashes when transforming
    collections which contain objects with optional attributes, caused by
    incompatible object types at the time of defaults application.
    alisdair committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    b857322 View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2022

  1. Merge pull request #555 from hashicorp/pre-convert-optional-defaults

    ext/typeexpr: Convert defaults for optional attrs
    alisdair authored Sep 23, 2022
    Configuration menu
    Copy the full SHA
    68124d5 View commit details
    Browse the repository at this point in the history
  2. Update CHANGELOG.md

    alisdair authored Sep 23, 2022
    Configuration menu
    Copy the full SHA
    197ef76 View commit details
    Browse the repository at this point in the history
Loading