Skip to content

Bump github.com/zclconf/go-cty from 1.8.1 to 1.18.1#62

Merged
whymarrh merged 1 commit into
mainfrom
dependabot/go_modules/github.com/zclconf/go-cty-1.18.1
Apr 25, 2026
Merged

Bump github.com/zclconf/go-cty from 1.8.1 to 1.18.1#62
whymarrh merged 1 commit into
mainfrom
dependabot/go_modules/github.com/zclconf/go-cty-1.18.1

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot Bot commented on behalf of github Apr 25, 2026

Bumps github.com/zclconf/go-cty from 1.8.1 to 1.18.1.

Release notes

Sourced from github.com/zclconf/go-cty's releases.

v1.17.0

cty now requires Go 1.23 or later.

  • cty.Value.Elements offers a modern iter.Seq2-based equivalent of cty.Value.ElementIterator.

  • cty.DeepValues offers a modern iter.Seq2-based equivalent of cty.Walk.

  • cty.Value.WrangleMarksDeep allows inspecting and modifying individual marks throughout a possibly-nested data structure.

    Having now got some experience using marks more extensively in some callers, it's become clear that it's often necessary for different subsystems to be able to collaborate using independent marks without upsetting each other's assumptions. Today that tends to be achieved using hand-written transforms either with cty.Transform or cty.Value.UnmarkDeepWithPaths/cty.Value.MarkWithPaths, both of which can be pretty expensive even in the common case where there are no marks present at all.

    This new function allows inspecting and transforming marks with far less overhead, by creating new values only for parts of a structure that actually need to change and by reusing (rather than recreating) the "payloads" of the values being modified when we know that only the marks have changed.

  • cty.ValueMarksOfType and cty.ValueMarksOfTypeDeep make it easier to use type-based rather than value-based mark schemes, where different values of a common type are used to track a specific kind of relationship with multiple external values.

  • cty.Value.HasMarkDeep provides a "deep" version of the existing cty.Value.HasMark, searching throughout a possibly-nested structure for any values that have the given mark.

  • cty.Value.UnmarkDeep and cty.Value.UnmarkDeepWithPaths are now implemented in terms of cty.Value.WrangleMarksDeep, so they benefit from its reduced overhead. In particular they avoid reconstructing a data structure that contains no marked values at all.

  • cty.Value.MarkWithPaths now has a fast path when it's given a zero-length PathValueMarks, in which case it just returns the value it was given with no modifications.

v1.16.0

  • convert: When converting between two different capsule types, will now try to use the "conversion from" implementation from the target type if the source type doesn't have a suitable "conversion to" implementation. (#194)
  • convert: When converting to a map whose element type is an object type with optional attributes, will no longer construct a broken result when a final map is empty. (#198)

v1.13.2

  • cty: IndexStep.Apply will no longer panic if given a marked collection to traverse through. (#160).

v1.13.1

No release notes provided.

v1.13.0

No release notes provided.

v1.12.2

  • cty: IndexStep.Apply will no longer panic if given a marked collection to traverse through. (#160).

v1.11.1

  • convert: Fix for error when converting empty sets and lists with nested optional attributes by explicitly removing optional attribute information from collections.

v1.9.1

No release notes provided.

Changelog

Sourced from github.com/zclconf/go-cty's changelog.

1.18.1 (April 16, 2026)

  • stdlib: ContainsFunc now allows its second argument to be null, to test whether the given collection contains any null elements.
  • stdlib: MergeFunc no longer panics if all of its arguments are null values of the same object type with at least one attribute.

1.18.0 (February 23, 2026)

cty now requires Go 1.25 or later.

  • cty.Value.Equals now has a special case where if a null value is compared with a non-null value then only top-level marks from the non-null value will transfer to the boolean result.

    This is a limited introduction of the idea that only the parts of a nested data structure that were actually relevant to the comparison should transfer to the result. The more general form of that idea might follow in a later release, but that would require some more severe refactoring of this method's implementation that would be far riskier and so this is a pragmatic compromise to support just the relatively-common case of comparing with null in callers like HCL where an equality test is the canonical way to test a value for "null-ness".

  • cty.IndexStep.Apply now works for traversing through a set.

    Although cty.Value.Index does not allow looking up a set element due to set elements not having indices, we often use cty.Path to describe a specific location in a nested structure and have a convention of handling traversal through a set as a cty.IndexStep whose "key" is the set element's value.

    To make that work a little better with code that uses cty.Path.Apply on such paths, cty.IndexStep now has a special case where if the given value is a set then it checks whether the index step's key is a member of the set and returns that value if so. If unknown values mean that it's not decidable whether there is a matching element then the result is an unknown value of the set's element type, so that traversal can continue and presumably eventually return an unknown value of the appropriate leaf type.

1.17.0 (September 5, 2025)

cty now requires Go 1.23 or later.

  • cty.Value.Elements offers a modern iter.Seq2-based equivalent of cty.Value.ElementIterator.

  • cty.DeepValues offers a modern iter.Seq2-based equivalent of cty.Walk.

  • cty.Value.WrangleMarksDeep allows inspecting and modifying individual marks throughout a possibly-nested data structure.

    Having now got some experience using marks more extensively in some callers, it's become clear that it's often necessary for different subsystems to be able to collaborate using independent marks without upsetting each other's assumptions. Today that tends to be achieved using hand-written transforms either with cty.Transform or cty.Value.UnmarkDeepWithPaths/cty.Value.MarkWithPaths, both of which can be pretty expensive even in the common case where there are no marks present at all.

    This new function allows inspecting and transforming marks with far less overhead, by creating new values only for parts of a structure that actually need to change and by reusing (rather than recreating) the "payloads" of the values being modified when we know that only the marks have changed.

  • cty.ValueMarksOfType and cty.ValueMarksOfTypeDeep make it easier to use type-based rather than value-based mark schemes, where different values of a common type are used to track a specific kind of relationship with multiple external values.

  • cty.Value.HasMarkDeep provides a "deep" version of the existing cty.Value.HasMark, searching throughout a possibly-nested structure for any values that have the given mark.

  • cty.Value.UnmarkDeep and cty.Value.UnmarkDeepWithPaths are now implemented in terms of cty.Value.WrangleMarksDeep, so they benefit from its reduced overhead. In particular they avoid reconstructing a data structure that contains no marked values at all.

  • cty.Value.MarkWithPaths now has a fast path when it's given a zero-length PathValueMarks, in which case it just returns the value it was given with no modifications.

1.16.4 (August 20, 2025)

  • cty.UnknownAsNull now accepts marked values and preserves the given marks in its result. Previously it had no direct support for marks and so would either panic or return incorrect results when given marked values.

1.16.3 (May 16, 2025)

  • convert: Now generates more specific error messages in various cases of type conversion failure, giving additional information about the type that was given as compared to the type that was wanted by the caller.

1.16.2 (January 21, 2025)

  • json: ImpliedType now returns an error if a JSON object contains two properties of the same name. As a compatibility concession it allows duplicates whose values have the same implied type, since it was unintentionally possible to combine ImpliedType and Unmarshal successfully in that case before, but this is not an endorsement of using duplicate property names since that makes the input ambiguous in any case. (#199)
  • function/stdlib: ElementFunc no longer crashes when asked for a negative index into a tuple. This fixes a miss in the negative index support added back in v1.15.0. (#200)

1.16.1 (January 13, 2025)

... (truncated)

Commits
  • dcb5db6 v1.18.1
  • 77d87c2 stdlib: no MergeFunc crash with null values of object type
  • 6854da9 stdlib: ContainsFunc allows testing for presence of null value
  • ddb73de Begin development of v1.18.1
  • e0c742b v1.18.0 release
  • 21d455d Update LICENSE to reflect the current situation
  • a6629d6 cty: IndexStep.Apply now works for traversing through a set
  • d586d11 cty: Value.Equals only keeps shallow marks when comparing to null
  • 2cc7315 go.mod: Require Go 1.25 or later
  • da4c600 CHANGELOG: Prepare for v1.17.0 release
  • Additional commits viewable in compare view

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file go Pull requests that update go code labels Apr 25, 2026
@dependabot dependabot Bot force-pushed the dependabot/go_modules/github.com/zclconf/go-cty-1.18.1 branch 2 times, most recently from 64f9705 to c744637 Compare April 25, 2026 02:07
Bumps [github.com/zclconf/go-cty](https://github.com/zclconf/go-cty) from 1.8.1 to 1.18.1.
- [Release notes](https://github.com/zclconf/go-cty/releases)
- [Changelog](https://github.com/zclconf/go-cty/blob/main/CHANGELOG.md)
- [Commits](zclconf/go-cty@v1.8.1...v1.18.1)

---
updated-dependencies:
- dependency-name: github.com/zclconf/go-cty
  dependency-version: 1.18.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot force-pushed the dependabot/go_modules/github.com/zclconf/go-cty-1.18.1 branch from c744637 to fbe922d Compare April 25, 2026 02:14
@whymarrh whymarrh merged commit 323bd64 into main Apr 25, 2026
4 checks passed
@whymarrh whymarrh deleted the dependabot/go_modules/github.com/zclconf/go-cty-1.18.1 branch April 25, 2026 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file go Pull requests that update go code

Development

Successfully merging this pull request may close these issues.

1 participant