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:
- 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:
- 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
- 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:
- The various entry-point functions in the
options
sub-package now accept optional variadicInterpreterOption
params. A single such option is now provided,WithOverrideDescriptorProto
, which allows the caller to provide an override version ofgoogle/protobuf/descriptor.proto
to use for interpreting options.