Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Bump github.com/bufbuild/protocompile from 0.1.0 to 0.6.0 #41

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Aug 7, 2023

Bumps github.com/bufbuild/protocompile from 0.1.0 to 0.6.0.

Release notes

Sourced from github.com/bufbuild/protocompile's releases.

v0.6.0

This release contains several breaking changes. Such changes were deemed acceptable since this module has not yet reached v1.0 and the impact on existing user code is likely to be very low.

Fixes:

  1. If a protocompile.Resolver returns search results that include descriptor protos, the compilation step that interprets options could inexplicably fail. This was because the logic was relying on an AST for some metadata about the option declarations in the source. This has been fixed: if a descriptor proto is provided that contains uninterpreted options, they can now be successfully interpreted.

Changes:

  1. Numerous elements have been renamed so that references to "oneof" elements now use the spelling "Oneof" instead of "OneOf" (second "O" now lower-case). This is for consistency with how this is spelled in the core protobuf runtime, in the "google.golang.org/protobuf" module).
    • This is a breaking change. Fixes to user code that may have been broken by this change should be straight-forward and mechanical.
  2. The grammar used to generate the parser has been improved. In particular, all conflicts in the yacc configuration have been eliminated. This does not fix any known bug, but it does provide higher confidence that no latent bugs exist since the generated parser could previously have chosen the wrong action in the face of a conflict.
  3. The function sourceinfo.GenerateSourceInfo now accepts a sourceinfo.OptionIndex instead of an options.Index. It also now accepts variadic options. The function sourceinfo.GenerateSourceInfoWithExtraComments has been removed; its functionality can now be accomplished by passing an option to sourceinfo.GenerateSourceInfo.
    • This is a breaking change. It is expected that these functions, despite being exported, were only used internally by the compiler implementation.
  4. The type options.Index has been removed. Code should instead use the new sourceinfo.OptionIndex type.
    • This is a breaking change. It is expected that this type, despite being exported, was only used internally by the compiler implementation.

Additions:

  1. A new protocompile.SourceInfoMode value has been added: SourceInfoExtraOptionLocations. This can be combined with other values (via bitwise OR) to have the compiler include additional source code info for locations inside message literals in custom option values.
  2. A new sourceinfo.OptionIndex type has been added, along with related types in the same package: OptionSourceInfo, OptionChildrenSourceInfo, ArrayLiteralSourceInfo, and MessageLiteralSourceInfo. These provide a model of source info paths in the interior of an option declaration.
  3. A new sourceinfo.GenerateOption type has been added, allowing the behavior of sourceinfo.GenerateSourceInfo to be customized via variadic options. Options are available for retaining extra comments (sourceinfo.WithExtraComments) and for producing extra locations for option declarations with message literal values (sourceinfo.WithExtraOptionLocations).

v0.5.1

This is an urgent bug-fix release, to remedy a potential deadlock error in the previous release (v0.5.0).

The only change in this release is a fix to this deadlock issue. With v0.5.0, if a compile operation was using an override version of google/protobuf/descriptor.proto, it was possible for the call to compiler.Compile to halt, only returning if the context was cancelled or times out. This is now fixed.

v0.5.0

DO NOT USE!

This release introduced a potential deadlock in calls to the Compile method of a protocompile.Compiler. Use v0.5.1 instead, which fixes the deadlock issue.


This release addresses an issue introduced in v0.3.0 wherein the results of compilation could sometimes have custom options represented as unrecognized fields, instead of as known extension fields.

While fixing that issue, several other changes were made opportunistically to improve code maintainability. This resulted in some changes that are technically not backwards compatible. However, these incompatible changes are highly unlikely to pose source compatibility issues for users. Methods were removed from an interface that were highly unlikely to be called outside of this repo.

Fixes:

  1. It was previously possible for descriptors to be returned with unrecognized fields if an override version of google/protobuf/descriptor.proto were in use. This has been fixed so that all custom options interpreted by the compiler should be represented as known extension fields.

Changes:

  1. The linker.Result interface has had several methods removed:
    • ResolveEnumType(protoreflect.FullName) protoreflect.EnumDescriptor
    • ResolveMessageType(protoreflect.FullName) protoreflect.MessageDescriptor
    • ResolveOptionsType(protoreflect.FullName) protoreflect.MessageDescriptor (just recently introduced in v0.3.0)
    • ResolveExtension(protoreflect.FullName) protoreflect.ExtensionTypeDescriptor
  2. The linker.ResolverFromFile function has been updated so that the returned resolver properly implements visibility rules of the Protobuf language. It can resolve any element that is visible to the given file, including elements visible via transitive public imports.

Additions:

  1. The various entry-point functions in the options sub-package now accept optional variadic InterpreterOption params. A single such option is now provided, WithOverrideDescriptorProto, which allows the caller to provide an override version of google/protobuf/descriptor.proto to use for interpreting options.

... (truncated)

Commits
  • 4b4eff5 Allow default json_name on extensions (#164)
  • 472c6fb Bump golang.org/x/tools from 0.10.0 to 0.11.0 in /internal/tools (#161)
  • 6a86e60 Bump google.golang.org/protobuf from 1.30.0 to 1.31.0 (#157)
  • 730f77b Bump github.com/golangci/golangci-lint from 1.52.2 to 1.53.3 in /internal/too...
  • af60335 Bump golang.org/x/sync from 0.2.0 to 0.3.0 (#156)
  • 3399017 Bump github.com/stretchr/testify from 1.8.3 to 1.8.4 in /internal/benchmarks ...
  • 04af82a Bump github.com/stretchr/testify from 1.8.3 to 1.8.4 (#148)
  • 4022811 Bump golang.org/x/tools from 0.9.1 to 0.10.0 in /internal/tools (#154)
  • 2b29724 Source code info locations inside message literals (#143)
  • c677062 Bump github.com/stretchr/testify from 1.8.2 to 1.8.3 in /internal/benchmarks ...
  • Additional commits viewable 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)

Bumps [github.com/bufbuild/protocompile](https://github.com/bufbuild/protocompile) from 0.1.0 to 0.6.0.
- [Release notes](https://github.com/bufbuild/protocompile/releases)
- [Commits](bufbuild/protocompile@v0.1.0...v0.6.0)

---
updated-dependencies:
- dependency-name: github.com/bufbuild/protocompile
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file go Pull requests that update Go code labels Aug 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependencies Pull requests that update a dependency file go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants