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: zclconf/go-cty
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.14.0
Choose a base ref
...
head repository: zclconf/go-cty
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.14.1
Choose a head ref
  • 4 commits
  • 5 files changed
  • 1 contributor

Commits on Aug 30, 2023

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

Commits on Oct 5, 2023

  1. cty: Explicit panic when using Value.Range with marked value

    As usual with marks, we must panic whenever an operation might cause marks
    to be silently lost. In such cases, it's always the calling application's
    responsibility to unmark the value first and then ensure that it applies
    the appropriate derived marks to whatever new value it's ultimately
    returning based on the decision.
    
    This was already a panic before, but now it's a panic with an explicit
    message pointing directly at the problem.
    apparentlymart committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    ab81272 View commit details
    Browse the repository at this point in the history

Commits on Oct 6, 2023

  1. cty: Silently ignore refinements of cty.DynamicVal

    For historical reasons we cannot permit any refinements on cty.DynamicVal,
    because existing callers expect that (marks notwithstanding) cty.DynamicVal
    is the only possible unknown value of an unknown type, and so adding
    refinements would invalidate that assumption.
    
    In the initial implementation of refinements it was treated as a caller
    programming error to try to refine cty.DynamicVal. However, that violates
    the convention that cty.DynamicVal is usable as a broad placeholder value
    that supports any operation that would be valid on at least one possible
    value.
    
    Instead, we'll now compromise by just silently ignoring any attempt to
    refine cty.DynamicVal. The refinement operation will run to completion
    without panicking but it will also completely ignore all of the refinement
    builder calls and eventually just return another plain cty.DynamicVal
    as the "refined" result.
    
    This is consistent with our typical expectation that refinements are
    propagated on a best-effort basis but can be silently discarded (or lose
    some detail) when passing through operations that don't or can't support
    them.
    
    This means that it should now be safe to call Refine on any value, but
    refining can still panic if the specific refinements selected don't make
    sense for whatever value is being refined.
    
    This also includes some direct tests of the Value.Refine API, since it
    was previously only tested indirectly through other operations that
    consume or manipulate refinements.
    apparentlymart committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    b868a8d View commit details
    Browse the repository at this point in the history
  2. Release v1.14.1

    apparentlymart committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    7152062 View commit details
    Browse the repository at this point in the history
Loading