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.16.2
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.16.3
Choose a head ref
  • 3 commits
  • 6 files changed
  • 1 contributor

Commits on Jan 21, 2025

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

Commits on May 16, 2025

  1. convert: More forthcoming about cause in MismatchMessage

    Due to some early experience with this function initially exposing too much
    implementation detail that tended to cause readers to get fixated on the
    wrong parts of the error message, convert.MismatchMessage switched to
    a mode where in some cases it withholds information about what type was
    given to a failed type conversion.
    
    However, this moved it to the opposite extreme of being _too_ cautious and
    not reporting some information that _is_ more helpful than confusing.
    
    After referring back to my earlier notes on what tended to cause confusion,
    this now makes a more thorough effort to classify various "unlikely to
    cause confusion" combinations of got and want type and in those cases it
    will now report what type was given alongside what value was required.
    
    This is a subjective boundary and so might get negotiated further in
    future, but based on the existing tests and some further manual testing
    this seems to make a relatively good compromise where it generates useful
    information in most cases where the direct type is the most likely problem,
    while still avoiding saying confusing things that expose implementation
    details like untyped nulls, empty collections with as-yet-unknown element
    types, etc.
    
    This work was sponsored by Spacelift as an indirect contribution to the
    OpenTofu project. Thanks!
    apparentlymart committed May 16, 2025
    Configuration menu
    Copy the full SHA
    89f0621 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a49320f View commit details
    Browse the repository at this point in the history
Loading