Browse Source

Update vendor/google.golang.org/protobuf to 1.34.2
1f36075f7778c814777f0001d36ba8f129268c07

robot-contrib 8 months ago
parent
commit
87cfc6b841

+ 0 - 95
contrib/go/_std_1.22/src/io/ioutil/ioutil.go

@@ -1,95 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package ioutil implements some I/O utility functions.
-//
-// Deprecated: As of Go 1.16, the same functionality is now provided
-// by package [io] or package [os], and those implementations
-// should be preferred in new code.
-// See the specific function documentation for details.
-package ioutil
-
-import (
-	"io"
-	"io/fs"
-	"os"
-	"sort"
-)
-
-// ReadAll reads from r until an error or EOF and returns the data it read.
-// A successful call returns err == nil, not err == EOF. Because ReadAll is
-// defined to read from src until EOF, it does not treat an EOF from Read
-// as an error to be reported.
-//
-// Deprecated: As of Go 1.16, this function simply calls [io.ReadAll].
-func ReadAll(r io.Reader) ([]byte, error) {
-	return io.ReadAll(r)
-}
-
-// ReadFile reads the file named by filename and returns the contents.
-// A successful call returns err == nil, not err == EOF. Because ReadFile
-// reads the whole file, it does not treat an EOF from Read as an error
-// to be reported.
-//
-// Deprecated: As of Go 1.16, this function simply calls [os.ReadFile].
-func ReadFile(filename string) ([]byte, error) {
-	return os.ReadFile(filename)
-}
-
-// WriteFile writes data to a file named by filename.
-// If the file does not exist, WriteFile creates it with permissions perm
-// (before umask); otherwise WriteFile truncates it before writing, without changing permissions.
-//
-// Deprecated: As of Go 1.16, this function simply calls [os.WriteFile].
-func WriteFile(filename string, data []byte, perm fs.FileMode) error {
-	return os.WriteFile(filename, data, perm)
-}
-
-// ReadDir reads the directory named by dirname and returns
-// a list of fs.FileInfo for the directory's contents,
-// sorted by filename. If an error occurs reading the directory,
-// ReadDir returns no directory entries along with the error.
-//
-// Deprecated: As of Go 1.16, [os.ReadDir] is a more efficient and correct choice:
-// it returns a list of [fs.DirEntry] instead of [fs.FileInfo],
-// and it returns partial results in the case of an error
-// midway through reading a directory.
-//
-// If you must continue obtaining a list of [fs.FileInfo], you still can:
-//
-//	entries, err := os.ReadDir(dirname)
-//	if err != nil { ... }
-//	infos := make([]fs.FileInfo, 0, len(entries))
-//	for _, entry := range entries {
-//		info, err := entry.Info()
-//		if err != nil { ... }
-//		infos = append(infos, info)
-//	}
-func ReadDir(dirname string) ([]fs.FileInfo, error) {
-	f, err := os.Open(dirname)
-	if err != nil {
-		return nil, err
-	}
-	list, err := f.Readdir(-1)
-	f.Close()
-	if err != nil {
-		return nil, err
-	}
-	sort.Slice(list, func(i, j int) bool { return list[i].Name() < list[j].Name() })
-	return list, nil
-}
-
-// NopCloser returns a ReadCloser with a no-op Close method wrapping
-// the provided Reader r.
-//
-// Deprecated: As of Go 1.16, this function simply calls [io.NopCloser].
-func NopCloser(r io.Reader) io.ReadCloser {
-	return io.NopCloser(r)
-}
-
-// Discard is an io.Writer on which all Write calls succeed
-// without doing anything.
-//
-// Deprecated: As of Go 1.16, this value is simply [io.Discard].
-var Discard io.Writer = io.Discard

+ 0 - 41
contrib/go/_std_1.22/src/io/ioutil/tempfile.go

@@ -1,41 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package ioutil
-
-import (
-	"os"
-)
-
-// TempFile creates a new temporary file in the directory dir,
-// opens the file for reading and writing, and returns the resulting *[os.File].
-// The filename is generated by taking pattern and adding a random
-// string to the end. If pattern includes a "*", the random string
-// replaces the last "*".
-// If dir is the empty string, TempFile uses the default directory
-// for temporary files (see [os.TempDir]).
-// Multiple programs calling TempFile simultaneously
-// will not choose the same file. The caller can use f.Name()
-// to find the pathname of the file. It is the caller's responsibility
-// to remove the file when no longer needed.
-//
-// Deprecated: As of Go 1.17, this function simply calls [os.CreateTemp].
-func TempFile(dir, pattern string) (f *os.File, err error) {
-	return os.CreateTemp(dir, pattern)
-}
-
-// TempDir creates a new temporary directory in the directory dir.
-// The directory name is generated by taking pattern and applying a
-// random string to the end. If pattern includes a "*", the random string
-// replaces the last "*". TempDir returns the name of the new directory.
-// If dir is the empty string, TempDir uses the
-// default directory for temporary files (see [os.TempDir]).
-// Multiple programs calling TempDir simultaneously
-// will not choose the same directory. It is the caller's responsibility
-// to remove the directory when no longer needed.
-//
-// Deprecated: As of Go 1.17, this function simply calls [os.MkdirTemp].
-func TempDir(dir, pattern string) (name string, err error) {
-	return os.MkdirTemp(dir, pattern)
-}

+ 0 - 8
contrib/go/_std_1.22/src/io/ioutil/ya.make

@@ -1,8 +0,0 @@
-GO_LIBRARY()
-IF (TRUE)
-    SRCS(
-        ioutil.go
-        tempfile.go
-    )
-ENDIF()
-END()

+ 18 - 14
vendor/google.golang.org/protobuf/cmd/protoc-gen-go/internal_gengo/main.go

@@ -17,6 +17,7 @@ import (
 	"unicode/utf8"
 
 	"google.golang.org/protobuf/compiler/protogen"
+	"google.golang.org/protobuf/internal/editionssupport"
 	"google.golang.org/protobuf/internal/encoding/tag"
 	"google.golang.org/protobuf/internal/filedesc"
 	"google.golang.org/protobuf/internal/genid"
@@ -29,7 +30,10 @@ import (
 )
 
 // SupportedFeatures reports the set of supported protobuf language features.
-var SupportedFeatures = uint64(pluginpb.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL)
+var SupportedFeatures = uint64(pluginpb.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL | pluginpb.CodeGeneratorResponse_FEATURE_SUPPORTS_EDITIONS)
+
+var SupportedEditionsMinimum = editionssupport.Minimum
+var SupportedEditionsMaximum = editionssupport.Maximum
 
 // GenerateVersionMarkers specifies whether to generate version markers.
 var GenerateVersionMarkers = true
@@ -227,7 +231,7 @@ func genImport(gen *protogen.Plugin, g *protogen.GeneratedFile, f *fileInfo, imp
 
 func genEnum(g *protogen.GeneratedFile, f *fileInfo, e *enumInfo) {
 	// Enum type declaration.
-	g.Annotate(e.GoIdent.GoName, e.Location)
+	g.AnnotateSymbol(e.GoIdent.GoName, protogen.Annotation{Location: e.Location})
 	leadingComments := appendDeprecationSuffix(e.Comments.Leading,
 		e.Desc.ParentFile(),
 		e.Desc.Options().(*descriptorpb.EnumOptions).GetDeprecated())
@@ -237,7 +241,7 @@ func genEnum(g *protogen.GeneratedFile, f *fileInfo, e *enumInfo) {
 	// Enum value constants.
 	g.P("const (")
 	for _, value := range e.Values {
-		g.Annotate(value.GoIdent.GoName, value.Location)
+		g.AnnotateSymbol(value.GoIdent.GoName, protogen.Annotation{Location: value.Location})
 		leadingComments := appendDeprecationSuffix(value.Comments.Leading,
 			value.Desc.ParentFile(),
 			value.Desc.Options().(*descriptorpb.EnumValueOptions).GetDeprecated())
@@ -289,11 +293,11 @@ func genEnum(g *protogen.GeneratedFile, f *fileInfo, e *enumInfo) {
 	genEnumReflectMethods(g, f, e)
 
 	// UnmarshalJSON method.
-	needsUnmarshalJSONMethod := e.genJSONMethod && e.Desc.Syntax() == protoreflect.Proto2
-	if fde, ok := e.Desc.(*filedesc.Enum); ok && fde.L1.EditionFeatures.GenerateLegacyUnmarshalJSON {
-		needsUnmarshalJSONMethod = true
+	needsUnmarshalJSONMethod := false
+	if fde, ok := e.Desc.(*filedesc.Enum); ok {
+		needsUnmarshalJSONMethod = fde.L1.EditionFeatures.GenerateLegacyUnmarshalJSON
 	}
-	if needsUnmarshalJSONMethod {
+	if e.genJSONMethod && needsUnmarshalJSONMethod {
 		g.P("// Deprecated: Do not use.")
 		g.P("func (x *", e.GoIdent, ") UnmarshalJSON(b []byte) error {")
 		g.P("num, err := ", protoimplPackage.Ident("X"), ".UnmarshalJSONEnum(x.Descriptor(), b)")
@@ -327,7 +331,7 @@ func genMessage(g *protogen.GeneratedFile, f *fileInfo, m *messageInfo) {
 	}
 
 	// Message type declaration.
-	g.Annotate(m.GoIdent.GoName, m.Location)
+	g.AnnotateSymbol(m.GoIdent.GoName, protogen.Annotation{Location: m.Location})
 	leadingComments := appendDeprecationSuffix(m.Comments.Leading,
 		m.Desc.ParentFile(),
 		m.Desc.Options().(*descriptorpb.MessageOptions).GetDeprecated())
@@ -388,7 +392,7 @@ func genMessageField(g *protogen.GeneratedFile, f *fileInfo, m *messageInfo, fie
 			tags = append(tags, gotrackTags...)
 		}
 
-		g.Annotate(m.GoIdent.GoName+"."+oneof.GoName, oneof.Location)
+		g.AnnotateSymbol(m.GoIdent.GoName+"."+oneof.GoName, protogen.Annotation{Location: oneof.Location})
 		leadingComments := oneof.Comments.Leading
 		if leadingComments != "" {
 			leadingComments += "\n"
@@ -427,7 +431,7 @@ func genMessageField(g *protogen.GeneratedFile, f *fileInfo, m *messageInfo, fie
 	if field.Desc.IsWeak() {
 		name = genid.WeakFieldPrefix_goname + name
 	}
-	g.Annotate(m.GoIdent.GoName+"."+name, field.Location)
+	g.AnnotateSymbol(m.GoIdent.GoName+"."+name, protogen.Annotation{Location: field.Location})
 	leadingComments := appendDeprecationSuffix(field.Comments.Leading,
 		field.Desc.ParentFile(),
 		field.Desc.Options().(*descriptorpb.FieldOptions).GetDeprecated())
@@ -555,7 +559,7 @@ func genMessageGetterMethods(g *protogen.GeneratedFile, f *fileInfo, m *messageI
 
 		// Getter for parent oneof.
 		if oneof := field.Oneof; oneof != nil && oneof.Fields[0] == field && !oneof.Desc.IsSynthetic() {
-			g.Annotate(m.GoIdent.GoName+".Get"+oneof.GoName, oneof.Location)
+			g.AnnotateSymbol(m.GoIdent.GoName+".Get"+oneof.GoName, protogen.Annotation{Location: oneof.Location})
 			g.P("func (m *", m.GoIdent.GoName, ") Get", oneof.GoName, "() ", oneofInterfaceName(oneof), " {")
 			g.P("if m != nil {")
 			g.P("return m.", oneof.GoName)
@@ -568,7 +572,7 @@ func genMessageGetterMethods(g *protogen.GeneratedFile, f *fileInfo, m *messageI
 		// Getter for message field.
 		goType, pointer := fieldGoType(g, f, field)
 		defaultValue := fieldDefaultValue(g, f, m, field)
-		g.Annotate(m.GoIdent.GoName+".Get"+field.GoName, field.Location)
+		g.AnnotateSymbol(m.GoIdent.GoName+".Get"+field.GoName, protogen.Annotation{Location: field.Location})
 		leadingComments := appendDeprecationSuffix("",
 			field.Desc.ParentFile(),
 			field.Desc.Options().(*descriptorpb.FieldOptions).GetDeprecated())
@@ -811,8 +815,8 @@ func genMessageOneofWrapperTypes(g *protogen.GeneratedFile, f *fileInfo, m *mess
 		g.P("}")
 		g.P()
 		for _, field := range oneof.Fields {
-			g.Annotate(field.GoIdent.GoName, field.Location)
-			g.Annotate(field.GoIdent.GoName+"."+field.GoName, field.Location)
+			g.AnnotateSymbol(field.GoIdent.GoName, protogen.Annotation{Location: field.Location})
+			g.AnnotateSymbol(field.GoIdent.GoName+"."+field.GoName, protogen.Annotation{Location: field.Location})
 			g.P("type ", field.GoIdent, " struct {")
 			goType, _ := fieldGoType(g, f, field)
 			tags := structTags{

+ 3 - 3
vendor/google.golang.org/protobuf/cmd/protoc-gen-go/internal_gengo/reflect.go

@@ -132,7 +132,7 @@ func genReflectFileDescriptor(gen *protogen.Plugin, g *protogen.GeneratedFile, f
 		panic("too many dependencies") // sanity check
 	}
 
-	g.P("var ", goTypesVarName(f), " = []interface{}{")
+	g.P("var ", goTypesVarName(f), " = []any{")
 	for _, s := range goTypes {
 		g.P(s)
 	}
@@ -170,7 +170,7 @@ func genReflectFileDescriptor(gen *protogen.Plugin, g *protogen.GeneratedFile, f
 				idx := f.allMessagesByPtr[message]
 				typesVar := messageTypesVarName(f)
 
-				g.P(typesVar, "[", idx, "].Exporter = func(v interface{}, i int) interface{} {")
+				g.P(typesVar, "[", idx, "].Exporter = func(v any, i int) any {")
 				g.P("switch v := v.(*", message.GoIdent, "); i {")
 				for i := 0; i < sf.count; i++ {
 					if name := sf.unexported[i]; name != "" {
@@ -191,7 +191,7 @@ func genReflectFileDescriptor(gen *protogen.Plugin, g *protogen.GeneratedFile, f
 				typesVar := messageTypesVarName(f)
 
 				// Associate the wrapper types by directly passing them to the MessageInfo.
-				g.P(typesVar, "[", idx, "].OneofWrappers = []interface{} {")
+				g.P(typesVar, "[", idx, "].OneofWrappers = []any {")
 				for _, oneof := range message.Oneofs {
 					if !oneof.Desc.IsSynthetic() {
 						for _, field := range oneof.Fields {

+ 20 - 20
vendor/google.golang.org/protobuf/cmd/protoc-gen-go/internal_gengo/well_known_types.go

@@ -213,11 +213,11 @@ func genPackageKnownComment(f *fileInfo) protogen.Comments {
  The standard Go "encoding/json" package has functionality to serialize
  arbitrary types to a large degree. The Value.AsInterface, Struct.AsMap, and
  ListValue.AsSlice methods can convert the protobuf message representation into
- a form represented by interface{}, map[string]interface{}, and []interface{}.
+ a form represented by any, map[string]any, and []any.
  This form can be used with other packages that operate on such data structures
  and also directly with the standard json package.
 
- In order to convert the interface{}, map[string]interface{}, and []interface{}
+ In order to convert the any, map[string]any, and []any
  forms back as Value, Struct, and ListValue messages, use the NewStruct,
  NewList, and NewValue constructor functions.
 
@@ -252,28 +252,28 @@ func genPackageKnownComment(f *fileInfo) protogen.Comments {
 
  To construct a Value message representing the above JSON object:
 
-	m, err := structpb.NewValue(map[string]interface{}{
+	m, err := structpb.NewValue(map[string]any{
 		"firstName": "John",
 		"lastName":  "Smith",
 		"isAlive":   true,
 		"age":       27,
-		"address": map[string]interface{}{
+		"address": map[string]any{
 			"streetAddress": "21 2nd Street",
 			"city":          "New York",
 			"state":         "NY",
 			"postalCode":    "10021-3100",
 		},
-		"phoneNumbers": []interface{}{
-			map[string]interface{}{
+		"phoneNumbers": []any{
+			map[string]any{
 				"type":   "home",
 				"number": "212 555-1234",
 			},
-			map[string]interface{}{
+			map[string]any{
 				"type":   "office",
 				"number": "646 555-4567",
 			},
 		},
-		"children": []interface{}{},
+		"children": []any{},
 		"spouse":   nil,
 	})
 	if err != nil {
@@ -634,7 +634,7 @@ func genMessageKnownFunctions(g *protogen.GeneratedFile, f *fileInfo, m *message
 		g.P("// NewStruct constructs a Struct from a general-purpose Go map.")
 		g.P("// The map keys must be valid UTF-8.")
 		g.P("// The map values are converted using NewValue.")
-		g.P("func NewStruct(v map[string]interface{}) (*Struct, error) {")
+		g.P("func NewStruct(v map[string]any) (*Struct, error) {")
 		g.P("	x := &Struct{Fields: make(map[string]*Value, len(v))}")
 		g.P("	for k, v := range v {")
 		g.P("		if !", utf8Package.Ident("ValidString"), "(k) {")
@@ -652,9 +652,9 @@ func genMessageKnownFunctions(g *protogen.GeneratedFile, f *fileInfo, m *message
 
 		g.P("// AsMap converts x to a general-purpose Go map.")
 		g.P("// The map values are converted by calling Value.AsInterface.")
-		g.P("func (x *Struct) AsMap() map[string]interface{} {")
+		g.P("func (x *Struct) AsMap() map[string]any {")
 		g.P("	f := x.GetFields()")
-		g.P("	vs := make(map[string]interface{}, len(f))")
+		g.P("	vs := make(map[string]any, len(f))")
 		g.P("	for k, v := range f {")
 		g.P("		vs[k] = v.AsInterface()")
 		g.P("	}")
@@ -675,7 +675,7 @@ func genMessageKnownFunctions(g *protogen.GeneratedFile, f *fileInfo, m *message
 	case genid.ListValue_message_fullname:
 		g.P("// NewList constructs a ListValue from a general-purpose Go slice.")
 		g.P("// The slice elements are converted using NewValue.")
-		g.P("func NewList(v []interface{}) (*ListValue, error) {")
+		g.P("func NewList(v []any) (*ListValue, error) {")
 		g.P("	x := &ListValue{Values: make([]*Value, len(v))}")
 		g.P("	for i, v := range v {")
 		g.P("		var err error")
@@ -690,9 +690,9 @@ func genMessageKnownFunctions(g *protogen.GeneratedFile, f *fileInfo, m *message
 
 		g.P("// AsSlice converts x to a general-purpose Go slice.")
 		g.P("// The slice elements are converted by calling Value.AsInterface.")
-		g.P("func (x *ListValue) AsSlice() []interface{} {")
+		g.P("func (x *ListValue) AsSlice() []any {")
 		g.P("	vals := x.GetValues()")
-		g.P("	vs := make([]interface{}, len(vals))")
+		g.P("	vs := make([]any, len(vals))")
 		g.P("	for i, v := range vals {")
 		g.P("		vs[i] = v.AsInterface()")
 		g.P("	}")
@@ -723,13 +723,13 @@ func genMessageKnownFunctions(g *protogen.GeneratedFile, f *fileInfo, m *message
 		g.P("//	║ float32, float64       │ stored as NumberValue                      ║")
 		g.P("//	║ string                 │ stored as StringValue; must be valid UTF-8 ║")
 		g.P("//	║ []byte                 │ stored as StringValue; base64-encoded      ║")
-		g.P("//	║ map[string]interface{} │ stored as StructValue                      ║")
-		g.P("//	║ []interface{}          │ stored as ListValue                        ║")
+		g.P("//	║ map[string]any         │ stored as StructValue                      ║")
+		g.P("//	║ []any                  │ stored as ListValue                        ║")
 		g.P("//	╚════════════════════════╧════════════════════════════════════════════╝")
 		g.P("//")
 		g.P("// When converting an int64 or uint64 to a NumberValue, numeric precision loss")
 		g.P("// is possible since they are stored as a float64.")
-		g.P("func NewValue(v interface{}) (*Value, error) {")
+		g.P("func NewValue(v any) (*Value, error) {")
 		g.P("	switch v := v.(type) {")
 		g.P("	case nil:")
 		g.P("		return NewNullValue(), nil")
@@ -759,13 +759,13 @@ func genMessageKnownFunctions(g *protogen.GeneratedFile, f *fileInfo, m *message
 		g.P("	case []byte:")
 		g.P("		s := ", base64Package.Ident("StdEncoding"), ".EncodeToString(v)")
 		g.P("		return NewStringValue(s), nil")
-		g.P("	case map[string]interface{}:")
+		g.P("	case map[string]any:")
 		g.P("		v2, err := NewStruct(v)")
 		g.P("		if err != nil {")
 		g.P("			return nil, err")
 		g.P("		}")
 		g.P("		return NewStructValue(v2), nil")
-		g.P("	case []interface{}:")
+		g.P("	case []any:")
 		g.P("		v2, err := NewList(v)")
 		g.P("		if err != nil {")
 		g.P("			return nil, err")
@@ -820,7 +820,7 @@ func genMessageKnownFunctions(g *protogen.GeneratedFile, f *fileInfo, m *message
 		g.P("//")
 		g.P("// Floating-point values (i.e., \"NaN\", \"Infinity\", and \"-Infinity\") are")
 		g.P("// converted as strings to remain compatible with MarshalJSON.")
-		g.P("func (x *Value) AsInterface() interface{} {")
+		g.P("func (x *Value) AsInterface() any {")
 		g.P("	switch v := x.GetKind().(type) {")
 		g.P("	case *Value_NumberValue:")
 		g.P("		if v != nil {")

+ 11 - 4
vendor/google.golang.org/protobuf/compiler/protogen/protogen.go

@@ -19,7 +19,7 @@ import (
 	"go/printer"
 	"go/token"
 	"go/types"
-	"io/ioutil"
+	"io"
 	"os"
 	"path"
 	"path/filepath"
@@ -60,7 +60,7 @@ func run(opts Options, f func(*Plugin) error) error {
 	if len(os.Args) > 1 {
 		return fmt.Errorf("unknown argument %q (this program should be run by protoc, not directly)", os.Args[1])
 	}
-	in, err := ioutil.ReadAll(os.Stdin)
+	in, err := io.ReadAll(os.Stdin)
 	if err != nil {
 		return err
 	}
@@ -108,6 +108,9 @@ type Plugin struct {
 	// google.protobuf.CodeGeneratorResponse.supported_features for details.
 	SupportedFeatures uint64
 
+	SupportedEditionsMinimum descriptorpb.Edition
+	SupportedEditionsMaximum descriptorpb.Edition
+
 	fileReg        *protoregistry.Files
 	enumsByName    map[protoreflect.FullName]*Enum
 	messagesByName map[protoreflect.FullName]*Message
@@ -140,7 +143,7 @@ type Options struct {
 	//   opts := &protogen.Options{
 	//     ParamFunc: flags.Set,
 	//   }
-	//   protogen.Run(opts, func(p *protogen.Plugin) error {
+	//   opts.Run(func(p *protogen.Plugin) error {
 	//     if *value { ... }
 	//   })
 	ParamFunc func(name, value string) error
@@ -396,6 +399,10 @@ func (gen *Plugin) Response() *pluginpb.CodeGeneratorResponse {
 	if gen.SupportedFeatures > 0 {
 		resp.SupportedFeatures = proto.Uint64(gen.SupportedFeatures)
 	}
+	if gen.SupportedEditionsMinimum != descriptorpb.Edition_EDITION_UNKNOWN && gen.SupportedEditionsMaximum != descriptorpb.Edition_EDITION_UNKNOWN {
+		resp.MinimumEdition = proto.Int32(int32(gen.SupportedEditionsMinimum))
+		resp.MaximumEdition = proto.Int32(int32(gen.SupportedEditionsMaximum))
+	}
 	return resp
 }
 
@@ -948,7 +955,7 @@ func (gen *Plugin) NewGeneratedFile(filename string, goImportPath GoImportPath)
 // P prints a line to the generated output. It converts each parameter to a
 // string following the same rules as [fmt.Print]. It never inserts spaces
 // between parameters.
-func (g *GeneratedFile) P(v ...interface{}) {
+func (g *GeneratedFile) P(v ...any) {
 	for _, x := range v {
 		switch x := x.(type) {
 		case GoIdent:

+ 2 - 2
vendor/google.golang.org/protobuf/encoding/prototext/decode.go

@@ -84,7 +84,7 @@ type decoder struct {
 }
 
 // newError returns an error object with position info.
-func (d decoder) newError(pos int, f string, x ...interface{}) error {
+func (d decoder) newError(pos int, f string, x ...any) error {
 	line, column := d.Position(pos)
 	head := fmt.Sprintf("(line %d:%d): ", line, column)
 	return errors.New(head+f, x...)
@@ -96,7 +96,7 @@ func (d decoder) unexpectedTokenError(tok text.Token) error {
 }
 
 // syntaxError returns a syntax error for given position.
-func (d decoder) syntaxError(pos int, f string, x ...interface{}) error {
+func (d decoder) syntaxError(pos int, f string, x ...any) error {
 	line, column := d.Position(pos)
 	head := fmt.Sprintf("syntax error (line %d:%d): ", line, column)
 	return errors.New(head+f, x...)

+ 12 - 8
vendor/google.golang.org/protobuf/encoding/prototext/encode.go

@@ -27,15 +27,17 @@ const defaultIndent = "  "
 
 // Format formats the message as a multiline string.
 // This function is only intended for human consumption and ignores errors.
-// Do not depend on the output being stable. It may change over time across
-// different versions of the program.
+// Do not depend on the output being stable. Its output will change across
+// different builds of your program, even when using the same version of the
+// protobuf module.
 func Format(m proto.Message) string {
 	return MarshalOptions{Multiline: true}.Format(m)
 }
 
 // Marshal writes the given [proto.Message] in textproto format using default
-// options. Do not depend on the output being stable. It may change over time
-// across different versions of the program.
+// options. Do not depend on the output being stable. Its output will change
+// across different builds of your program, even when using the same version of
+// the protobuf module.
 func Marshal(m proto.Message) ([]byte, error) {
 	return MarshalOptions{}.Marshal(m)
 }
@@ -84,8 +86,9 @@ type MarshalOptions struct {
 
 // Format formats the message as a string.
 // This method is only intended for human consumption and ignores errors.
-// Do not depend on the output being stable. It may change over time across
-// different versions of the program.
+// Do not depend on the output being stable. Its output will change across
+// different builds of your program, even when using the same version of the
+// protobuf module.
 func (o MarshalOptions) Format(m proto.Message) string {
 	if m == nil || !m.ProtoReflect().IsValid() {
 		return "<nil>" // invalid syntax, but okay since this is for debugging
@@ -98,8 +101,9 @@ func (o MarshalOptions) Format(m proto.Message) string {
 }
 
 // Marshal writes the given [proto.Message] in textproto format using options in
-// MarshalOptions object. Do not depend on the output being stable. It may
-// change over time across different versions of the program.
+// MarshalOptions object. Do not depend on the output being stable. Its output
+// will change across different builds of your program, even when using the
+// same version of the protobuf module.
 func (o MarshalOptions) Marshal(m proto.Message) ([]byte, error) {
 	return o.marshal(nil, m)
 }

+ 1 - 0
vendor/google.golang.org/protobuf/internal/descfmt/stringer.go

@@ -252,6 +252,7 @@ func formatDescOpt(t protoreflect.Descriptor, isRoot, allowMulti bool, record fu
 				{rv.MethodByName("Values"), "Values"},
 				{rv.MethodByName("ReservedNames"), "ReservedNames"},
 				{rv.MethodByName("ReservedRanges"), "ReservedRanges"},
+				{rv.MethodByName("IsClosed"), "IsClosed"},
 			}...)
 
 		case protoreflect.EnumValueDescriptor:

Some files were not shown because too many files changed in this diff