Which version are you using? It seems the bug has been fixed in the latest release. https://github.com/google/protobuf/blob/2f4489a3e504e0a4aaffee69b551c6acc9e08374/src/google/protobuf/util/message_differencer.cc#L470
On Wed, Jun 7, 2017 at 2:29 PM Alex Shaver <[email protected]> wrote: > Reading through the source, it does seem like when Compare hits UnpackAny, > that 'GetDescriptor' check should avoid the fatal check. However, I'm > looking at source from a contemporary git pull, and the version in my > software may be an older one, if this is a recent change. > > > On Wednesday, June 7, 2017 at 5:06:37 PM UTC-4, Alex Shaver wrote: >> >> When I have a list of "Any"s, and I want to find if an element in the >> list matches some other 'Any' protobuf, I try to use the >> util::MessageDifferencer::Equals and I get errors "Comparison between two >> messages with different descriptors." I've tried a >> message1.GetDescriptor() == message2.GetDescriptor && MessageDifferencer. >> Equals(message1, message2) >> combination, to hopefully head that off, but I still get the same error, >> presumably because the descriptor is getting Any's descriptor, and not the >> descriptor of the internal message it contains. >> >> Is there a way to actually make this comparison work? It seems like the >> Equals comparison should have a specific carveout for the 'Any' case to >> begin with. >> > -- > You received this message because you are subscribed to the Google Groups > "Protocol Buffers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/protobuf. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
