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
mx := &descriptorpb.FileDescriptorProto{Name: proto.String("descriptor.proto")}
my := &descriptorpb.FileDescriptorProto{Name: proto.String("descriptor.proto")}
x := map[*descriptorpb.FileDescriptorProto]int{mx: 1}
y := map[*descriptorpb.FileDescriptorProto]int{my: 1}
cmp.Diff(x, y)
These two objects are inequal since map keys use == and not a recursive application of cmp.Equal. It hangs because cmp.Diff is trying to format the raw data structure for a descriptorpb.FileDescriptorProto. Since descriptorpb.FileDescriptorProto has a pointer to the protobuf type information, which itself closes over the transitive set of reachable protobuf types, this is a massive data structure. The reporter logic should be more aggressive about pruning the formatted value.
The text was updated successfully, but these errors were encountered:
The following snippet hangs:
These two objects are inequal since map keys use
==
and not a recursive application ofcmp.Equal
. It hangs becausecmp.Diff
is trying to format the raw data structure for adescriptorpb.FileDescriptorProto
. Sincedescriptorpb.FileDescriptorProto
has a pointer to the protobuf type information, which itself closes over the transitive set of reachable protobuf types, this is a massive data structure. The reporter logic should be more aggressive about pruning the formatted value.The text was updated successfully, but these errors were encountered: