This repository was archived by the owner on Dec 2, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 518
fix(deps): update module github.com/jhump/protoreflect to v1.12.0 #568
Open
renovate
wants to merge
1
commit into
master
Choose a base branch
from
renovate/github.com-jhump-protoreflect-1.x
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4492ede to
41d99a9
Compare
41d99a9 to
e820202
Compare
e820202 to
fca8dbf
Compare
fca8dbf to
0263ad0
Compare
0263ad0 to
f1ec43c
Compare
f1ec43c to
9e3f39c
Compare
9e3f39c to
aeda562
Compare
aeda562 to
5452814
Compare
5452814 to
f1b03f5
Compare
Generated by renovateBot
f1b03f5 to
169e13d
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v1.8.2->v1.12.0Release Notes
jhump/protoreflect
v1.12.0Compare Source
This change includes a new feature related to source code information for compiled-in proto descriptors. It also includes some other bug fixes.
"github.com/jhump/protoreflect/desc"
Changes/fixes:
FindSymbolmethod ofFileDescriptorwould panic if given an empty string as the symbol name. This has been fixed. This case now returns a nil descriptor, indicating no element with the given name could be found.Load*functions will return descriptors that include comment information (and the underlyingFileDescriptorProtowill contain source code info) if theprotoc-gen-gosrcinfoplugin was used to generate additional Go code for these proto files."github.com/jhump/protoreflect/desc/protoprint"
Changes/fixes:
"github.com/jhump/protoreflect/desc/sourceinfo"
This is a brand new package which allows for registering source code information for a proto source file. It also includes some API for using/querying the source code info. This is useful to retain comments for compiled and linked-in descriptors. It is not expected that users would explicitly register source code info; instead use the
protoc-gen-gosrcinfoplugin, in addition toprotoc-gen-go, when compiling your proto sources."github.com/jhump/protoreflect/desc/sourceinfo/cmd/protoc-gen-gosrcinfo"
This is a brand new command which is a
protocplugin for augmenting compiled and linked-in descriptors with source code information. When used, thedescpackage can include source code info (and thus comments) when loading linked-in descriptors. Thedesc/sourceinfopackage can be used to query for the source code info and can be useful for integrating this data with other things, such as gRPC server reflection.v1.11.0Compare Source
"github.com/jhump/protoreflect/desc/protoprint"
Changes/fixes:
protoprintis able to handle, they would fail to be included in the printed output. Options were supported on all other types, just not on methods. This has been remedied: methods now have the same support for options comments as other elements.Printertype includes three new fields, to control formatting of complex options:ShortOptionsExpansionThresholdCountandShortOptionsExpansionThresholdLengthcontrol when "short options" will be expanded to multiple lines, based on the number of options and the length of the options when rendered;MessageLiteralExpansionThresholdLengthcontrols when message literals in option values will be expanded to multi-line form, based on if the length of the rendered string is too long."github.com/jhump/protoreflect/grpcreflect"
Changes/fixes:
LoadServiceDescriptorsfunction now accepts an interface, not just the concrete type*grpc.Server. Since*grpc.Serverimplements the interface, this change should be mostly backwards compatible. However, if there are usages that rely on the precise signature, such as assigning to a function variable whose signature requires*grpc.Server, this is a minor breaking change. Such usage is not expected.v1.10.3Compare Source
This release contains several fixes to the
desc/protoparsepackage and one fix to thegrpcreflectpackage."github.com/jhump/protoreflect/desc/protoparse"
Changes/fixes:
protocaccepts identifierst,f,True, andFalseas synonyms fortrueandfalse. Use of these alternate spellings would be rejected by this package. This is now fixed so that this package accepts the same values asprotoc.trueorfalse, this package would reject the option, misunderstanding thetrueorfalseidentifier to be a boolean literal instead of an enum value name. This has been fixed.protoc. This lead to some variances -- some source files thatprotocwould accept but that this package would not (because it was unable to resolve a reference), and some source files that this package would accept but thatprotocwould reject (because this package was using different lexical scoping rules during resolution). This has been fixed and this package now resolves extension names the same way asprotoc.google.protobuf.Any,protocsupports a special syntax that makes it possible to use a simple text format for the contained message, instead of having to include a byte string representation of a marshaled/encoded value. This package did not previously implement that syntax, so would reject proto sources that used it. This has been remedied, and the special syntax is now supported by this package.repeatedextension for a message that used message-set wire format. However, onlyoptionalextensions are allowed for such messages. This has been fixed, and proto sources that try to define such arepeatedextension will be rejected.json_nameoption, however this package was accepting proto sources that did so. This has been fixed, and proto sources that define an extension with thejson_nameoption will be rejected."github.com/jhump/protoreflect/grpcreflect"
Changes/fixes:
file_containing_symbolrequest. Also, the reflection service does not actually specify any ordering requirements for responses that choose to include more than one file. But this package mistakenly assumed an ordering (based on an older implementation of the reflection service in the official Java runtime), which could cause such cases (responses with multiple or even superfluous files) to return the incorrect file descriptor. This has been fixed. Now all responses tofile_containing_symbol,file_containing_extensionandfile_by_filenamerequests correctly support multiple files (even superfluous ones) in any order.v1.10.2Compare Source
This release contains several fixes to the
desc/protoparseanddynamicpackages."github.com/jhump/protoreflect/desc/protoparse"
Changes/fixes:
oneofin it, then option values in proto sources should not be allowed to set more than one of the fields. Previously, this package would accept such sources, and only the last field (in source location order) would end up being set in the option value. Now the package will report an error.protoc.protocaccepts such sources and, like other floating point literals that cannot be perfectly represented, picks the nearest/best option. In the case of overflow, that value is infinity. This package now behaves likeprotocand substitutes an infinite value for numeric literals that would otherwise overflow a 64-bit floating point value.NULcharacter in a source file (code point zero,0x00) could be misinterpreted as end-of-file. This character is not allowed in proto sources, but would not only be accepted in some cases but also result in incomplete compilation. Similarly, this package accepted such characters inside of comments, but that is also not allowed. This has been remedied and source files with such characters will be rejected.[and]). However,protocdoes not require the colon in this context. This package has been updated to match the behavior ofprotoc.google/protobuf/descriptor.proto) without supplying its own copy of source and then included a source file that defined a symbol with the same fully-qualified name as an element in that import, a panic would occur. This has been fixed and the conflict is reported as an error as expected.protocfor block elements (i.e. those with elements defined inside of brances{ }, including messages, groups, oneofs, extend blocks, enums, services, and methods). This package used the comment immediately following the closing brace (}) as the element's trailing comment. However,protocuses the comment immediately following the opening brace ({) as the trailing comment. The behavior in this package has been changed to match that ofprotoc."github.com/jhump/protoreflect/desc/protoprint"
Changes/fixes:
{ }, including messages, groups, oneofs, extend blocks, enums, services, and methods) should be rendered after the closing brace. However, this is not how trailing comments are parsed byprotoc: they are the comment immediately following the opening brace instead. So this package has been updated to render the trailing comment for these elements after the opening brace."github.com/jhump/protoreflect/dynamic"
Changes/fixes:
google.protobuf.Value, this package would incorrectly process values that were JSON arrays. This should be allowed and result in the field'slist_valuefield being set with the contents of the array. Instead, the field would be set to a single value equal to the last value in the JSON array. This has been fixed.v1.10.1Compare Source
This release contains some fixes to the
protoparsepackage."github.com/jhump/protoreflect/desc/protoparse"
Changes/fixes:
protocwith regards to the field name used to refer to a group value. These issues have been corrected and behavior is not consistent withprotoc.v1.10.0Compare Source
This release contains some improvements to the
protoparsepackage and new functionality in theprotoprintpackage."github.com/jhump/protoreflect/desc/protoparse"
Changes/fixes:
protoccompiler would reject proto source, but theprotoparsepackage would accept it:protocresolved relative names to fully-qualified names, for the request and response types in a method signature, differed slightly fromprotoparse. Theprotoparsepackage might accept a source program, butprotocmight reject it due resolving a type name to something other than a type (such as a service or method name). This package now matches the behavior ofprotocand will reject the same kinds of source.protoparsewould accept a program with a range like1to max, for example, whereasprotocrequires a space between the1and the keywordto. This was due to a small difference in how tokens are lexed. The lexer in this package has been updated to now match the behavior ofprotocand will now issue an error if there is no space between a numeric literal and subsequent identifier/keyword.protoccompiler accepts'\v'(vertical tab) and'\f'(form feed) characters as whitespace, butprotoparsewould not. This is now fixed.protoparsepackage could panic (with type assertion failures or with index-out-of-range failures) if the input contained a unicode code point in a particular range (well outside the range of allowed characters in a proto source file, other than inside string literals). This has been fixed."github.com/jhump/protoreflect/desc/protoprint"
Additions:
CustomSortFunctionfield has been added to thePrintertype. This can be used to define a custom order in which elements are printed to a file. This also includes a new interface type,protoprint.Element, which custom sort functions can use to inspect the elements for deciding how to order them.v1.9.0Compare Source
This release contains numerous improvements to the
protoparsepackage, to more closely matchprotocin terms of proto source files that are acceptable. It also contains some fixes in other packages."github.com/jhump/protoreflect/desc/builder"
Changes/fixes:
"github.com/jhump/protoreflect/desc/protoparse"
Additions:
protoparsepackage now issues warnings when it detects that a source file has unused imports. This mirrors the warnings thatprotocissues in the same cases. This feature requires the use of aWarningReporterwith a parse operation. The concrete type of value provided to the warning reporter will be aprotoparse.ErrorUnusedImport.Changes/fixes:
protoccompiler was more strict thanprotoparsewhen it comes to resolving relative (vs. full qualified) names. This led to conditions whereprotoparsewould accept a proto source file thatprotocwould reject. The issue is when the first component of an identifier could match multiple lexical scopes. In such a caseprotoconly matches the most enclosing scope. Butprotoparsewould fallback to other enclosing scopes if the most enclosing scope could not be used to resolve a symbol. (Hard to describe succinctly, so see the example in this bug report.) This issue is now fixed andprotoparseresolves names in the same manner asprotoc.protoccompiler uses "C++ enum scoping rules" for protobuf enums. This means that enum values are declared in the namespace of the enclosing enum (as siblings of the enum itself). Butprotoparseincorrectly treated the enum as the parent scope/namespace. This led to source files thatprotoparsewould accept but thatprotocwould reject. This issue is now fixed.oneofstatements could incorrectly result in error messages about failing to resolve the custom option name, even if the source file and the option reference were valid. This has been fixed."github.com/jhump/protoreflect/dynamic/msgregistry"
Additions:
ErrUnexpectedType, was introduced. When a call toFindMessageTypeByUrlorFindEnumTypeByUrlfails because of a type mismatch (expecting a message, got an enum, or vice versa), this can now be determined programmatically by type-asserting the error to the new error type. This provides a proper/robust way to detect this kind of error (previously, callers would have to examine the error text, which is quite brittle).Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.