-
-
Notifications
You must be signed in to change notification settings - Fork 81
Comparing changes
Open a pull request
base repository: zclconf/go-cty
base: v1.16.4
head repository: zclconf/go-cty
compare: v1.17.0
- 7 commits
- 39 files changed
- 1 contributor
Commits on Aug 20, 2025
-
cty: Modern iter.Seq2 equivalents of Value.ElementIterator and Walk
cty now requires Go 1.23, because package iter is not available in earlier versions of Go.
Configuration menu - View commit details
-
Copy full SHA for d95a68c - Browse repository at this point
Copy the full SHA d95a68cView commit details
Commits on Aug 30, 2025
-
cty+ctymarks: Deep mark wrangling helper
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.
Configuration menu - View commit details
-
Copy full SHA for 31572cf - Browse repository at this point
Copy the full SHA 31572cfView commit details
Commits on Aug 31, 2025
-
cty: Various new mark-inspecting helpers
I've seen variants of each of these hand-written many times in callers, so it's well past time to bring them upstream to better support the common marks-related usage patterns that have emerged downstream.
Configuration menu - View commit details
-
Copy full SHA for d4bb9d4 - Browse repository at this point
Copy the full SHA d4bb9d4View commit details -
Bulk replace interface{} -> any
Go 1.18 introduced "any" as a shorthand for the empty interface type, and we'd already started using it in a few places so for consistency let's switch all existing uses of empty interface to "any" now.
Configuration menu - View commit details
-
Copy full SHA for f833b10 - Browse repository at this point
Copy the full SHA f833b10View commit details -
cty: Use DeepValues instead of Walk for deep marks inspections
An earlier commit added cty.DeepValues as an iter.Seq2-based alternative to Walk, and that's much easier to use for deep inspections because it doesn't require weird trickery to get the Walk to stop at the right time and smuggle result values out. However, in the process of doing this I discovered that cty.DeepValues itself was falling into that very trap of failing to terminate Walk correctly, and so this also includes a fixed version of that which will stop yielding new values once commanded to do so.
Configuration menu - View commit details
-
Copy full SHA for 4453ac2 - Browse repository at this point
Copy the full SHA 4453ac2View commit details
Commits on Sep 5, 2025
-
cty: Use WrangleMarksDeep for UnmarkDeep and UnmarkDeepWithPaths
These functions were previously using the "Transformer" mechanism, which is very general but as a result ends up always conservatively rebuilding the entire data structure it's given. The recently-added WrangleMarksDeep relies on the fact that it can only possibly change marks (not the actual values) to avoid building a new value at all in the common case where there are no marks, to rebuild only the parts of the structure that have mark changes when changes are being made, and to reuse the internal "payload" values from the source values while just wrapping them in a new outer cty.Value. Testing with a benchmark in another codebase that makes heavy use of both UnmarkDeep and UnmarkDeepWithPaths shows this being a material performance improvement. This also includes a bonus fast path for MarkWithPaths where it will skip doing anything at all if the given slice of ParkValueMarks is empty.
Configuration menu - View commit details
-
Copy full SHA for b13ddd4 - Browse repository at this point
Copy the full SHA b13ddd4View commit details -
Configuration menu - View commit details
-
Copy full SHA for da4c600 - Browse repository at this point
Copy the full SHA da4c600View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v1.16.4...v1.17.0