Skip to content

Conversation

@bbasata
Copy link
Collaborator

@bbasata bbasata commented Mar 18, 2025

Previously: #10

This PR updates this repo for parity with zclconf/go-cty v1.5.1. The changes remain "Unreleased" with no new release tag for the moment. This prevents a flood of Dependabot PRs like hashicorp/terraform-plugin-testing#444 for all affected providers.

Verification:

$ git ls-remote upstream refs/tags/v1.5.1^{}
8320ad4fd63cdf584e31e46ec369373b557a496a	refs/tags/v1.5.1^{}

$ # Check for non-trivial diffs between this v1.5.1 and upstream v1.5.1
$ GIT_PAGER= git diff -U0 --ignore-matching-lines 'github.com/(hashicorp|zclconf)/go-cty' 8320ad4..HEAD -- . ':(exclude).github/CODEOWNERS'
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d95951c..f6bff53 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1 +1 @@
-# 1.5.1 (June 25, 2020)
+# 1.5.1 (Unreleased)
@@ -6 +6 @@
-# 1.5.0 (June 11, 2020)
+# 1.5.0 (March 17, 2025)
@@ -11 +11 @@
-# 1.4.2 (May 29, 2020)
+# 1.4.2
@@ -15 +16 @@
-# 1.4.1 (May 18, 2020)
+# 1.4.1 (March 5, 2025)
diff --git a/cty/function/stdlib/string.go b/cty/function/stdlib/string.go
index 01ebc47..60e0ab5 100644
--- a/cty/function/stdlib/string.go
+++ b/cty/function/stdlib/string.go
@@ -154 +153,0 @@ var SubstrFunc = function.New(&function.Spec{
-
diff --git a/go.mod b/go.mod
index 7f1e3db..882066f 100644
--- a/go.mod
+++ b/go.mod
@@ -11 +11 @@ require (
-	golang.org/x/text v0.3.2
+	golang.org/x/text v0.3.8
diff --git a/go.sum b/go.sum
index 296172d..0231048 100644
--- a/go.sum
+++ b/go.sum
@@ -20 +19,0 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h
-golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
@@ -22,2 +21,2 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
-golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
+golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
+golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=

$ go1.12 test ./...
ok  	github.com/hashicorp/go-cty/cty	1.205s
ok  	github.com/hashicorp/go-cty/cty/convert	1.276s
ok  	github.com/hashicorp/go-cty/cty/function	0.672s
ok  	github.com/hashicorp/go-cty/cty/function/stdlib	1.260s
ok  	github.com/hashicorp/go-cty/cty/gocty	1.400s
ok  	github.com/hashicorp/go-cty/cty/json	1.132s
ok  	github.com/hashicorp/go-cty/cty/msgpack	1.207s
ok  	github.com/hashicorp/go-cty/cty/set	0.742s

# Check for any un-replaced imports
$  ag zclconf -G '.go$'

apparentlymart and others added 7 commits March 18, 2025 09:37
The fix for set unification recently introduced a bug with unknown set
values which would cause a panic. This was triggered by calling
LengthInt on an unknown collection.

This commit fixes this by first verifying that the argument is known, so
that calling its length is safe. If the argument is not known, it could
be of any length, so we do not want to omit its element type from the
set to be unified.

Includes regression tests.
@bbasata bbasata requested a review from a team as a code owner March 18, 2025 13:56
austinvalle
austinvalle previously approved these changes Mar 18, 2025
@bbasata bbasata requested a review from a team March 18, 2025 14:22
@bbasata bbasata merged commit 8d5ce63 into master Mar 18, 2025
1 check passed
@bbasata bbasata deleted the forward-to-v1.5.1 branch March 18, 2025 15:10
@bbasata bbasata mentioned this pull request Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants