From d4d62e6f1b76c94be0e302aa79c5572fe3722c57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Mon, 20 Oct 2025 17:55:51 +0100 Subject: [PATCH] update all dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For v0.15.0-alpha.3. Likely the last time we update dependencies before we tag v0.15.0. Note that x/tools/cmd/stringer changed behavior slightly, so the output files are a bit different. Also note that this causes false positives in staticcheck; I left a comment upstream and disabled the rule for now. Signed-off-by: Daniel Martí Change-Id: I4c1a20b6a48814cd5926f2fd2df410d075fd7084 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1222596 Unity-Result: CUE porcuepine Reviewed-by: Roger Peppe TryBot-Result: CUEcueckoo --- cue/token/relpos_string.go | 5 +++-- cue/token/token_string.go | 5 +++-- encoding/jsonschema/version_string.go | 5 +++-- go.mod | 14 ++++++------ go.sum | 28 ++++++++++++------------ internal/core/adt/arctype_string.go | 5 +++-- internal/core/adt/defidtype_string.go | 5 +++-- internal/core/adt/errorcode_string.go | 5 +++-- internal/core/adt/op_string.go | 5 +++-- internal/core/adt/runmode_string.go | 8 +++---- internal/core/adt/vertexstatus_string.go | 5 +++-- internal/filetypes/tagtype_string.go | 5 +++-- internal/httplog/eventkind_string.go | 5 +++-- staticcheck.conf | 19 ++++++++++++---- tools/flow/state_string.go | 5 +++-- 15 files changed, 73 insertions(+), 51 deletions(-) diff --git a/cue/token/relpos_string.go b/cue/token/relpos_string.go index 0129d7bb6..c6bb71e37 100644 --- a/cue/token/relpos_string.go +++ b/cue/token/relpos_string.go @@ -21,8 +21,9 @@ const _RelPos_name = "invalidelidednospaceblanknewlinesection" var _RelPos_index = [...]uint8{0, 7, 13, 20, 25, 32, 39} func (i RelPos) String() string { - if i < 0 || i >= RelPos(len(_RelPos_index)-1) { + idx := int(i) - 0 + if i < 0 || idx >= len(_RelPos_index)-1 { return "RelPos(" + strconv.FormatInt(int64(i), 10) + ")" } - return _RelPos_name[_RelPos_index[i]:_RelPos_index[i+1]] + return _RelPos_name[_RelPos_index[idx]:_RelPos_index[idx+1]] } diff --git a/cue/token/token_string.go b/cue/token/token_string.go index 8017f14a8..54ec30ea2 100644 --- a/cue/token/token_string.go +++ b/cue/token/token_string.go @@ -76,8 +76,9 @@ const _Token_name = "ILLEGALEOFCOMMENTATTRIBUTEliteralBegIDENTINTFLOATSTRINGINTE var _Token_index = [...]uint8{0, 7, 10, 17, 26, 36, 41, 44, 49, 55, 68, 71, 81, 92, 93, 94, 95, 96, 97, 100, 103, 106, 109, 110, 111, 113, 115, 116, 118, 119, 120, 121, 123, 125, 127, 129, 131, 133, 134, 135, 136, 137, 138, 141, 142, 143, 144, 145, 146, 147, 148, 159, 169, 171, 174, 176, 179, 183, 187, 192, 196, 206} func (i Token) String() string { - if i < 0 || i >= Token(len(_Token_index)-1) { + idx := int(i) - 0 + if i < 0 || idx >= len(_Token_index)-1 { return "Token(" + strconv.FormatInt(int64(i), 10) + ")" } - return _Token_name[_Token_index[i]:_Token_index[i+1]] + return _Token_name[_Token_index[idx]:_Token_index[idx+1]] } diff --git a/encoding/jsonschema/version_string.go b/encoding/jsonschema/version_string.go index b5b43266f..b9439d1e6 100644 --- a/encoding/jsonschema/version_string.go +++ b/encoding/jsonschema/version_string.go @@ -25,8 +25,9 @@ const _Version_name = "unknownhttp://json-schema.org/draft-04/schema#http://json var _Version_index = [...]uint16{0, 7, 46, 85, 124, 168, 212, 219, 230, 244, 258} func (i Version) String() string { - if i < 0 || i >= Version(len(_Version_index)-1) { + idx := int(i) - 0 + if i < 0 || idx >= len(_Version_index)-1 { return "Version(" + strconv.FormatInt(int64(i), 10) + ")" } - return _Version_name[_Version_index[i]:_Version_index[i+1]] + return _Version_name[_Version_index[idx]:_Version_index[idx+1]] } diff --git a/go.mod b/go.mod index f6d5b1f2e..171cee181 100644 --- a/go.mod +++ b/go.mod @@ -13,19 +13,19 @@ require ( github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/image-spec v1.1.1 github.com/pelletier/go-toml/v2 v2.2.4 - github.com/protocolbuffers/txtpbfmt v0.0.0-20251002044816-ff5ff96e8aaf + github.com/protocolbuffers/txtpbfmt v0.0.0-20251016062345-16587c79cd91 github.com/rogpeppe/go-internal v1.14.1 github.com/spf13/cobra v1.10.1 github.com/spf13/pflag v1.0.10 github.com/tetratelabs/wazero v1.9.0 github.com/yuin/goldmark v1.7.13 go.yaml.in/yaml/v3 v3.0.4 - golang.org/x/mod v0.28.0 - golang.org/x/net v0.44.0 - golang.org/x/oauth2 v0.31.0 + golang.org/x/mod v0.29.0 + golang.org/x/net v0.46.0 + golang.org/x/oauth2 v0.32.0 golang.org/x/sync v0.17.0 - golang.org/x/text v0.29.0 - golang.org/x/tools v0.37.0 + golang.org/x/text v0.30.0 + golang.org/x/tools v0.38.0 ) require ( @@ -33,7 +33,7 @@ require ( github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect - golang.org/x/sys v0.36.0 // indirect + golang.org/x/sys v0.37.0 // indirect google.golang.org/protobuf v1.33.0 // indirect gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect ) diff --git a/go.sum b/go.sum index ca9a3c0b1..dc5d1a57a 100644 --- a/go.sum +++ b/go.sum @@ -33,8 +33,8 @@ github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgr github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/protocolbuffers/txtpbfmt v0.0.0-20251002044816-ff5ff96e8aaf h1:lmsLwgRWDPaoxhssHOuIenD/oe80VJMzP7nYEGZBpsU= -github.com/protocolbuffers/txtpbfmt v0.0.0-20251002044816-ff5ff96e8aaf/go.mod h1:JSbkp0BviKovYYt9XunS95M3mLPibE9bGg+Y95DsEEY= +github.com/protocolbuffers/txtpbfmt v0.0.0-20251016062345-16587c79cd91 h1:s1LvMaU6mVwoFtbxv/rCZKE7/fwDmDY684FfUe4c1Io= +github.com/protocolbuffers/txtpbfmt v0.0.0-20251016062345-16587c79cd91/go.mod h1:JSbkp0BviKovYYt9XunS95M3mLPibE9bGg+Y95DsEEY= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= @@ -50,20 +50,20 @@ github.com/yuin/goldmark v1.7.13 h1:GPddIs617DnBLFFVJFgpo1aBfe/4xcvMc3SB5t/D0pA= github.com/yuin/goldmark v1.7.13/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= -golang.org/x/mod v0.28.0 h1:gQBtGhjxykdjY9YhZpSlZIsbnaE2+PgjfLWUQTnoZ1U= -golang.org/x/mod v0.28.0/go.mod h1:yfB/L0NOf/kmEbXjzCPOx1iK1fRutOydrCMsqRhEBxI= -golang.org/x/net v0.44.0 h1:evd8IRDyfNBMBTTY5XRF1vaZlD+EmWx6x8PkhR04H/I= -golang.org/x/net v0.44.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY= -golang.org/x/oauth2 v0.31.0 h1:8Fq0yVZLh4j4YA47vHKFTa9Ew5XIrCP8LC6UeNZnLxo= -golang.org/x/oauth2 v0.31.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= +golang.org/x/mod v0.29.0 h1:HV8lRxZC4l2cr3Zq1LvtOsi/ThTgWnUk/y64QSs8GwA= +golang.org/x/mod v0.29.0/go.mod h1:NyhrlYXJ2H4eJiRy/WDBO6HMqZQ6q9nk4JzS3NuCK+w= +golang.org/x/net v0.46.0 h1:giFlY12I07fugqwPuWJi68oOnpfqFnJIJzaIIm2JVV4= +golang.org/x/net v0.46.0/go.mod h1:Q9BGdFy1y4nkUwiLvT5qtyhAnEHgnQ/zd8PfU6nc210= +golang.org/x/oauth2 v0.32.0 h1:jsCblLleRMDrxMN29H3z/k1KliIvpLgCkE6R8FXXNgY= +golang.org/x/oauth2 v0.32.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug= golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= -golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k= -golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= -golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk= -golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4= -golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE= -golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w= +golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ= +golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.30.0 h1:yznKA/E9zq54KzlzBEAWn1NXSQ8DIp/NYMy88xJjl4k= +golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM= +golang.org/x/tools v0.38.0 h1:Hx2Xv8hISq8Lm16jvBZ2VQf+RLmbd7wVUsALibYI/IQ= +golang.org/x/tools v0.38.0/go.mod h1:yEsQ/d/YK8cjh0L6rZlY8tgtlKiBNTL14pGDJPJpYQs= google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/internal/core/adt/arctype_string.go b/internal/core/adt/arctype_string.go index 7be0bad23..50786dab8 100644 --- a/internal/core/adt/arctype_string.go +++ b/internal/core/adt/arctype_string.go @@ -20,8 +20,9 @@ const _ArcType_name = "MemberRequiredOptionalPendingNotPresent" var _ArcType_index = [...]uint8{0, 6, 14, 22, 29, 39} func (i ArcType) String() string { - if i >= ArcType(len(_ArcType_index)-1) { + idx := int(i) - 0 + if i < 0 || idx >= len(_ArcType_index)-1 { return "ArcType(" + strconv.FormatInt(int64(i), 10) + ")" } - return _ArcType_name[_ArcType_index[i]:_ArcType_index[i+1]] + return _ArcType_name[_ArcType_index[idx]:_ArcType_index[idx+1]] } diff --git a/internal/core/adt/defidtype_string.go b/internal/core/adt/defidtype_string.go index 6be0dd696..a00577fa8 100644 --- a/internal/core/adt/defidtype_string.go +++ b/internal/core/adt/defidtype_string.go @@ -19,8 +19,9 @@ const _defIDType_name = "*EDS" var _defIDType_index = [...]uint8{0, 1, 2, 3, 4} func (i defIDType) String() string { - if i < 0 || i >= defIDType(len(_defIDType_index)-1) { + idx := int(i) - 0 + if i < 0 || idx >= len(_defIDType_index)-1 { return "defIDType(" + strconv.FormatInt(int64(i), 10) + ")" } - return _defIDType_name[_defIDType_index[i]:_defIDType_index[i+1]] + return _defIDType_name[_defIDType_index[idx]:_defIDType_index[idx+1]] } diff --git a/internal/core/adt/errorcode_string.go b/internal/core/adt/errorcode_string.go index fd6573a9a..29030e64a 100644 --- a/internal/core/adt/errorcode_string.go +++ b/internal/core/adt/errorcode_string.go @@ -21,8 +21,9 @@ const _ErrorCode_name = "evaluseruserstructural cycleincompletecycle" var _ErrorCode_index = [...]uint8{0, 4, 8, 12, 28, 38, 43} func (i ErrorCode) String() string { - if i < 0 || i >= ErrorCode(len(_ErrorCode_index)-1) { + idx := int(i) - 0 + if i < 0 || idx >= len(_ErrorCode_index)-1 { return "ErrorCode(" + strconv.FormatInt(int64(i), 10) + ")" } - return _ErrorCode_name[_ErrorCode_index[i]:_ErrorCode_index[i+1]] + return _ErrorCode_name[_ErrorCode_index[idx]:_ErrorCode_index[idx+1]] } diff --git a/internal/core/adt/op_string.go b/internal/core/adt/op_string.go index 1fedcaed8..d00a6a022 100644 --- a/internal/core/adt/op_string.go +++ b/internal/core/adt/op_string.go @@ -42,8 +42,9 @@ const _Op_name = "NoOp&|.[][:]()&&||==!!=<<=>>==~!~+-*/quoremdivmod\\()" var _Op_index = [...]uint8{0, 4, 5, 6, 7, 9, 12, 14, 16, 18, 20, 21, 23, 24, 26, 27, 29, 31, 33, 34, 35, 36, 37, 40, 43, 46, 49, 52} func (i Op) String() string { - if i < 0 || i >= Op(len(_Op_index)-1) { + idx := int(i) - 0 + if i < 0 || idx >= len(_Op_index)-1 { return "Op(" + strconv.FormatInt(int64(i), 10) + ")" } - return _Op_name[_Op_index[i]:_Op_index[i+1]] + return _Op_name[_Op_index[idx]:_Op_index[idx+1]] } diff --git a/internal/core/adt/runmode_string.go b/internal/core/adt/runmode_string.go index 1cb34d6ab..a35a46224 100644 --- a/internal/core/adt/runmode_string.go +++ b/internal/core/adt/runmode_string.go @@ -19,9 +19,9 @@ const _runMode_name = "ignoreattemptOnlyyieldfinalize" var _runMode_index = [...]uint8{0, 6, 17, 22, 30} func (i runMode) String() string { - i -= 1 - if i >= runMode(len(_runMode_index)-1) { - return "runMode(" + strconv.FormatInt(int64(i+1), 10) + ")" + idx := int(i) - 1 + if i < 1 || idx >= len(_runMode_index)-1 { + return "runMode(" + strconv.FormatInt(int64(i), 10) + ")" } - return _runMode_name[_runMode_index[i]:_runMode_index[i+1]] + return _runMode_name[_runMode_index[idx]:_runMode_index[idx+1]] } diff --git a/internal/core/adt/vertexstatus_string.go b/internal/core/adt/vertexstatus_string.go index c65139081..4c7893ad0 100644 --- a/internal/core/adt/vertexstatus_string.go +++ b/internal/core/adt/vertexstatus_string.go @@ -20,8 +20,9 @@ const _vertexStatus_name = "unprocessedevaluatingpartialconjunctsfinalized" var _vertexStatus_index = [...]uint8{0, 11, 21, 28, 37, 46} func (i vertexStatus) String() string { - if i < 0 || i >= vertexStatus(len(_vertexStatus_index)-1) { + idx := int(i) - 0 + if i < 0 || idx >= len(_vertexStatus_index)-1 { return "vertexStatus(" + strconv.FormatInt(int64(i), 10) + ")" } - return _vertexStatus_name[_vertexStatus_index[i]:_vertexStatus_index[i+1]] + return _vertexStatus_name[_vertexStatus_index[idx]:_vertexStatus_index[idx+1]] } diff --git a/internal/filetypes/tagtype_string.go b/internal/filetypes/tagtype_string.go index 270d3516d..18a0a1d9a 100644 --- a/internal/filetypes/tagtype_string.go +++ b/internal/filetypes/tagtype_string.go @@ -19,8 +19,9 @@ const _TagType_name = "TagUnknownTagTopLevelTagSubsidiaryBoolTagSubsidiaryString var _TagType_index = [...]uint8{0, 10, 21, 38, 57} func (i TagType) String() string { - if i < 0 || i >= TagType(len(_TagType_index)-1) { + idx := int(i) - 0 + if i < 0 || idx >= len(_TagType_index)-1 { return "TagType(" + strconv.FormatInt(int64(i), 10) + ")" } - return _TagType_name[_TagType_index[i]:_TagType_index[i+1]] + return _TagType_name[_TagType_index[idx]:_TagType_index[idx+1]] } diff --git a/internal/httplog/eventkind_string.go b/internal/httplog/eventkind_string.go index bb30edfb6..a906a5642 100644 --- a/internal/httplog/eventkind_string.go +++ b/internal/httplog/eventkind_string.go @@ -18,8 +18,9 @@ const _EventKind_name = "NoEventhttp client->http client<-" var _EventKind_index = [...]uint8{0, 7, 20, 33} func (i EventKind) String() string { - if i < 0 || i >= EventKind(len(_EventKind_index)-1) { + idx := int(i) - 0 + if i < 0 || idx >= len(_EventKind_index)-1 { return "EventKind(" + strconv.FormatInt(int64(i), 10) + ")" } - return _EventKind_name[_EventKind_index[i]:_EventKind_index[i+1]] + return _EventKind_name[_EventKind_index[idx]:_EventKind_index[idx+1]] } diff --git a/staticcheck.conf b/staticcheck.conf index 5cba7afe3..3a7e7b52d 100644 --- a/staticcheck.conf +++ b/staticcheck.conf @@ -1,8 +1,19 @@ # Run the default check list, minus some that don't pass just yet. -# TODO: fix most of the issues below and re-enable their checks. checks = [ "inherit", - "-SA1019", # use of deprecated APIs - "-SA4000", # identical expressions in && or || logic - "-U1000", # unused code + # use of deprecated APIs. + # TODO: slowly get rid of all of these. + "-SA1019", + + # identical expressions in && or || logic + # TODO: likely a bug in our code. + "-SA4000", + + # "no value of type uint is less than 0" incompatibility with x/tools/cmd/stringer. + # TODO: remove in the future; see https://github.com/golang/go/issues/41436#issuecomment-3426425527 + "-SA4003", + + # unused code. + # TODO: slowly get rid of all of these. + "-U1000", ] diff --git a/tools/flow/state_string.go b/tools/flow/state_string.go index 56feb98c2..3f85735cb 100644 --- a/tools/flow/state_string.go +++ b/tools/flow/state_string.go @@ -19,8 +19,9 @@ const _State_name = "WaitingReadyRunningTerminated" var _State_index = [...]uint8{0, 7, 12, 19, 29} func (i State) String() string { - if i < 0 || i >= State(len(_State_index)-1) { + idx := int(i) - 0 + if i < 0 || idx >= len(_State_index)-1 { return "State(" + strconv.FormatInt(int64(i), 10) + ")" } - return _State_name[_State_index[i]:_State_index[i+1]] + return _State_name[_State_index[idx]:_State_index[idx+1]] } -- 2.51.2