You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
java.lang.IllegalStateException: com.google.protobuf.Descriptors$DescriptorValidationException: withenum.ContainingNestedEnum.action: "Action" is not a message type.
It looks like it's happening because FieldDefinition.Builder.setType is called with just Action when processing fields of ContainingNestedEnum. Because of that it finds sample.Action in the main package (which is the wrong Action) and sets the type of the field as MESSAGE_TYPE which causes a fail down the line when trying to convert the ProtobufSchema into a Descriptor.
When I call ctx.resolveFull(ctx::getTypeForFullName, "withenum.ContainingNestedEnum.Action", true) from debugger it's able to find the correct Action with the correct EnumElement type.
I'm able to reproduce it with v7.8.0 tag. Similar protos have been working properly in the past until the newer versions.
Cheers,
Leonti
The text was updated successfully, but these errors were encountered:
We have recently tried upgrading
protobuf-provider
package from7.6.1
to7.8.0
and noticed that it doesn't handle nested types properly anymore.Here is a self-contained failing test which I put in
ProtobufSchemaTest
:This fails with:
It looks like it's happening because FieldDefinition.Builder.setType is called with just
Action
when processing fields ofContainingNestedEnum
. Because of that it findssample.Action
in the main package (which is the wrongAction
) and sets the type of the field asMESSAGE_TYPE
which causes a fail down the line when trying to convert theProtobufSchema
into a Descriptor.When I call
ctx.resolveFull(ctx::getTypeForFullName, "withenum.ContainingNestedEnum.Action", true)
from debugger it's able to find the correctAction
with the correctEnumElement
type.I'm able to reproduce it with
v7.8.0
tag. Similar protos have been working properly in the past until the newer versions.Cheers,
Leonti
The text was updated successfully, but these errors were encountered: