diff options
author | Guillaume Turri <guillaume.turri@gmail.com> | 2016-09-05 10:29:03 +0200 |
---|---|---|
committer | Jon Skeet <skeet@pobox.com> | 2016-09-05 09:29:03 +0100 |
commit | 9b8da104c12a2947b6e6d7a7da30a3ae56b31675 (patch) | |
tree | 0b050cab95b32f116dc03a1d7ef850e5dc7d361c /csharp/src/Google.Protobuf/Reflection | |
parent | 96a9d97352436c7284e8194e103ca8d92649ad02 (diff) | |
download | protobuf-9b8da104c12a2947b6e6d7a7da30a3ae56b31675.tar.gz protobuf-9b8da104c12a2947b6e6d7a7da30a3ae56b31675.tar.bz2 protobuf-9b8da104c12a2947b6e6d7a7da30a3ae56b31675.zip |
Rm check on dependency in the C# reflection API (#2051)
This check adds a few constraints on the way to build a project when we have
a proto file which imports another one. In particular, on projects which
build both C# and Java, it's easy to end up with exceptions like
Expected: included.proto but was src/main/protobuf/included.proto
A user may work around this issue, but it may add unnecessary constraints
on the layout of the project.
According to https://github.com/google/protobuf/commit/f3504cf3b1d456a843e8242fdee9ba0bf2991dc1#diff-ecb0b909ed572381a1c8d1994f09a948R309
it has already been considered to get rid of this check, for
similar considerations, and because it doesn't exist in the Java code
Diffstat (limited to 'csharp/src/Google.Protobuf/Reflection')
-rw-r--r-- | csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs index ab7cd922..94efea9e 100644 --- a/csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs @@ -251,17 +251,6 @@ namespace Google.Protobuf.Reflection "Dependencies passed to FileDescriptor.BuildFrom() don't match " + "those listed in the FileDescriptorProto."); } - for (int i = 0; i < proto.Dependency.Count; i++) - { - if (dependencies[i].Name != proto.Dependency[i]) - { - throw new DescriptorValidationException( - result, - "Dependencies passed to FileDescriptor.BuildFrom() don't match " + - "those listed in the FileDescriptorProto. Expected: " + - proto.Dependency[i] + " but was: " + dependencies[i].Name); - } - } result.CrossLink(); return result; @@ -341,4 +330,4 @@ namespace Google.Protobuf.Reflection /// </value> public static FileDescriptor DescriptorProtoFileDescriptor { get { return DescriptorReflection.Descriptor; } } } -}
\ No newline at end of file +} |