fullstorydev / grpcurl

Like cURL, but for gRPC: Command-line tool for interacting with gRPC servers
MIT License
10.36k stars 497 forks source link

Bump github.com/jhump/protoreflect from 1.14.1 to 1.15.0 #372

Closed dependabot[bot] closed 1 year ago

dependabot[bot] commented 1 year ago

Bumps github.com/jhump/protoreflect from 1.14.1 to 1.15.0.

Release notes

Sourced from github.com/jhump/protoreflect's releases.

v1.15.0

This is a significant and admittedly long overdue release. This release finally provides a bridge for interoperability between packages and functionality in this repo and the new reflection packages and APIs added in the "v2 API" of the Protobuf runtime for Go (google.golang.org/protobuf), particularly the protoreflect, protodesc, protoregistry, and dynamicpb packages.

This repo began because the Protobuf runtime (at the time, the "v1 API" in github.com/golang/protobuf) had no support for Protobuf reflection and dynamic messages. The functionality slowly grew to include dynamic gRPC, interesting meta features like parsing Protobuf sources or printing Protobuf source from a descriptor, etc.

But the v2 API was released nearly three years ago. And it does provide some functionality that this repo provided, but now in the core runtime library. And yet this repo still refers to the now-deprecated v1 API.

Under the hood, this is a very big change, mainly due to the big changes (described below) in the github.com/jhump/protoreflect/desc and github.com/jhump/protoreflect/desc/protoparse packages.

This release is planned to be the final v1 release. Any other changes significant enough to warrant a new minor version will instead be added in an upcoming v2 version. A new v2 version will have zero references to the v1 API of the Protobuf runtime, and it will not duplicate any of the functionality that now exists in the v2 API.

The changes are all detailed below and include all of the changes described in the past two release candidates (v1.15.0-rc1 and v1.15.0-rc2).


NOTE: Zero defects were reported in the nearly six weeks since the first release candidate was created. It is entirely possible that very few users tried it, so there still could be some material bugs and compatibility issues lurking in this release. If you encounter any marked changes in behavior between the previous release (v1.14.1) and this one, please file an issue as soon as possible! However, if the issue is a performance degradation, it may not be addressed until a v2. So If your use case is very sensitive to performance, you may need to stay on v1.14.1. The under-the-hood changes in this repo for this release are expected to have some performance impact, though it will hopefully be minor or even negligible for most users.


"github.com/jhump/protoreflect/desc"

Changes/fixes:

  • This package, the core of this whole repo, with its descriptor interfaces and related functions, has been substantially overhauled. The descriptor values provided by this package are now backed by the descriptor implementations in the google.golang.org/protobuf/reflect/protoreflect package.
    • The primary advantage of this change is that it is now easy to convert a protoreflect.Descriptor to a desc.Descriptor (via the various Wrap* functions in this package). It is similarly easy to unwrap a desc.Descriptor value, to recover the underlying protoreflectDescriptor.
    • This allows this package to be easily used in conjunction with protoreflect and accompanying packages. You can take a protoreflect.Descriptor and then easily use it with the desc/builder and desc/protoprint packages in this repo. Similarly, you can create a desc.Descriptor using the desc/protoparse package and easily turn that into a protoreflect.Descriptor, for use with the google.golang.org/protobuf/... packages.

Additions:

  • This adds a new DescriptorWrapper interface, which is implemented by all descriptor implementations in this package. It contains an Unwrap() protoreflect.Descriptor function, to recover the underlying protoreflect.Descriptor.
  • Also, all descriptor implementations in this package also have additional methods that are more strongly typed. For example, *desc.FileDescriptor has a method UnwrapFile() protoreflect.FileDescriptor.
  • Finally, this package now has numerous Wrap* functions, which accept a protoreflect.Descriptor and wrap it, returning a desc.Descriptor. There is one function for each concrete type, for example for messages there is WrapMessage(d protoreflect.MessageDescriptor) (*MessageDescriptor, error)

"github.com/jhump/protoreflect/desc/builder"

Changes/fixes:

  • Previously, not all rules of the Protobuf language were enforced when building a new descriptor with this package. Since the desc.Descriptor values returned by this package are now backed by protoreflect.Descriptor values, more rules are enforced. This is because the implementation of descriptors in the protoreflect package does perform all of those validation checks. The new checks that are now enforced that previously were not:
    1. Files with a syntax of proto3 are not allowed to have required fields.
    2. Files with a syntax of proto3 are not allowed to have messages that define extension ranges.
    3. Files with a syntax of proto3 are not allowed to use groups.
    4. Files with a syntax of proto3 are not allowed to declare default values for fields.
    5. Extension fields must use tag numbers that are in an extension range defined on the extended message.
    6. Non-extension fields are not allowed to use tags that lie in a message's extension ranges or reserved ranges.
    7. Non-extension fields are not allowed to use names that the message has marked as reserved.
    8. Extension ranges and reserved ranges must not overlap.

"github.com/jhump/protoreflect/desc/protoparse"

Changes/fixes:

... (truncated)

Commits
  • bc601ae build(deps): bump golang.org/x/net (#551)
  • 7fcc3b0 build(deps): bump golang.org/x/text from 0.3.2 to 0.3.8 (#548)
  • 1d63728 protoprint: make sure output is stable, even when there is no source code inf...
  • 220303e another fuzz test fix, even newer version of protocompile (#546)
  • fea8ba4 newer protocompile with potential fix to fuzz test perf issue (#545)
  • d2a36df add doc comments for all new, recently added API elements (#544)
  • 384ff0e protocompile v0.2.0 (#543)
  • 0400f4d many validation rules previously unimplemented are now implemented (#542)
  • 746ed7b update README in light of latest change
  • bc899ec desc.Descriptor wraps protoreflect.Descriptor (#354)
  • See full diff in compare view


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
ghost commented 1 year ago
👇 Click on the image for a new way to code review #### [![Review these changes using an interactive CodeSee Map](https://s3.us-east-2.amazonaws.com/maps.codesee.io/images/github/fullstorydev/grpcurl/372/97846899/28c1513740257afd25f8f67e43088d9fbdaff9ad.svg)](https://app.codesee.io/r/reviews?pr=372&src=https%3A%2F%2Fgithub.com%2Ffullstorydev%2Fgrpcurl) #### Legend CodeSee Map legend
dragonsinth commented 1 year ago

@jhump it looks like the newest version of protoreflect is based on a bufbuild lib that needs Go 1.18?

jhump commented 1 year ago

@dragonsinth, correct. There is some usage of generics in there. So you'd need to drop 1.17 from CI and also set 1.18 in go.mod.

If you're not ready for that jump, you can always comment @dependabot ignore this.

dragonsinth commented 1 year ago

I suppose in some reasonable time frame, we'll want to shift the supported versions to be 1.18 - 1.20. Closing for now.

dependabot[bot] commented 1 year ago

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.