fix proto import paths for C# where possible

pull/8857/head
Jan Tattermusch 8 years ago
parent 0201776d29
commit 091057a4e5
  1. 24
      src/csharp/Grpc.Examples/Math.cs
  2. 2
      src/csharp/Grpc.Examples/MathGrpc.cs
  3. 22
      src/csharp/Grpc.HealthCheck/Health.cs
  4. 2
      src/csharp/Grpc.HealthCheck/HealthGrpc.cs
  5. 66
      src/csharp/Grpc.Reflection/Reflection.cs
  6. 8
      src/csharp/Grpc.Reflection/ReflectionGrpc.cs
  7. 9
      src/csharp/generate_proto_csharp.sh

@ -1,5 +1,5 @@
// Generated by the protocol buffer compiler. DO NOT EDIT! // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: math.proto // source: math/math.proto
#pragma warning disable 1591, 0612, 3021 #pragma warning disable 1591, 0612, 3021
#region Designer generated code #region Designer generated code
@ -9,11 +9,11 @@ using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic; using scg = global::System.Collections.Generic;
namespace Math { namespace Math {
/// <summary>Holder for reflection information generated from math.proto</summary> /// <summary>Holder for reflection information generated from math/math.proto</summary>
public static partial class MathReflection { public static partial class MathReflection {
#region Descriptor #region Descriptor
/// <summary>File descriptor for math.proto</summary> /// <summary>File descriptor for math/math.proto</summary>
public static pbr::FileDescriptor Descriptor { public static pbr::FileDescriptor Descriptor {
get { return descriptor; } get { return descriptor; }
} }
@ -22,15 +22,15 @@ namespace Math {
static MathReflection() { static MathReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String( byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat( string.Concat(
"CgptYXRoLnByb3RvEgRtYXRoIiwKB0RpdkFyZ3MSEAoIZGl2aWRlbmQYASAB", "Cg9tYXRoL21hdGgucHJvdG8SBG1hdGgiLAoHRGl2QXJncxIQCghkaXZpZGVu",
"KAMSDwoHZGl2aXNvchgCIAEoAyIvCghEaXZSZXBseRIQCghxdW90aWVudBgB", "ZBgBIAEoAxIPCgdkaXZpc29yGAIgASgDIi8KCERpdlJlcGx5EhAKCHF1b3Rp",
"IAEoAxIRCglyZW1haW5kZXIYAiABKAMiGAoHRmliQXJncxINCgVsaW1pdBgB", "ZW50GAEgASgDEhEKCXJlbWFpbmRlchgCIAEoAyIYCgdGaWJBcmdzEg0KBWxp",
"IAEoAyISCgNOdW0SCwoDbnVtGAEgASgDIhkKCEZpYlJlcGx5Eg0KBWNvdW50", "bWl0GAEgASgDIhIKA051bRILCgNudW0YASABKAMiGQoIRmliUmVwbHkSDQoF",
"GAEgASgDMqQBCgRNYXRoEiYKA0RpdhINLm1hdGguRGl2QXJncxoOLm1hdGgu", "Y291bnQYASABKAMypAEKBE1hdGgSJgoDRGl2Eg0ubWF0aC5EaXZBcmdzGg4u",
"RGl2UmVwbHkiABIuCgdEaXZNYW55Eg0ubWF0aC5EaXZBcmdzGg4ubWF0aC5E", "bWF0aC5EaXZSZXBseSIAEi4KB0Rpdk1hbnkSDS5tYXRoLkRpdkFyZ3MaDi5t",
"aXZSZXBseSIAKAEwARIjCgNGaWISDS5tYXRoLkZpYkFyZ3MaCS5tYXRoLk51", "YXRoLkRpdlJlcGx5IgAoATABEiMKA0ZpYhINLm1hdGguRmliQXJncxoJLm1h",
"bSIAMAESHwoDU3VtEgkubWF0aC5OdW0aCS5tYXRoLk51bSIAKAFiBnByb3Rv", "dGguTnVtIgAwARIfCgNTdW0SCS5tYXRoLk51bRoJLm1hdGguTnVtIgAoAWIG",
"Mw==")); "cHJvdG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { }, new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {

@ -1,5 +1,5 @@
// Generated by the protocol buffer compiler. DO NOT EDIT! // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: math.proto // source: math/math.proto
// Original file comments: // Original file comments:
// Copyright 2015, Google Inc. // Copyright 2015, Google Inc.
// All rights reserved. // All rights reserved.

@ -1,5 +1,5 @@
// Generated by the protocol buffer compiler. DO NOT EDIT! // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: health.proto // source: grpc/health/v1/health.proto
#pragma warning disable 1591, 0612, 3021 #pragma warning disable 1591, 0612, 3021
#region Designer generated code #region Designer generated code
@ -9,11 +9,11 @@ using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic; using scg = global::System.Collections.Generic;
namespace Grpc.Health.V1 { namespace Grpc.Health.V1 {
/// <summary>Holder for reflection information generated from health.proto</summary> /// <summary>Holder for reflection information generated from grpc/health/v1/health.proto</summary>
public static partial class HealthReflection { public static partial class HealthReflection {
#region Descriptor #region Descriptor
/// <summary>File descriptor for health.proto</summary> /// <summary>File descriptor for grpc/health/v1/health.proto</summary>
public static pbr::FileDescriptor Descriptor { public static pbr::FileDescriptor Descriptor {
get { return descriptor; } get { return descriptor; }
} }
@ -22,14 +22,14 @@ namespace Grpc.Health.V1 {
static HealthReflection() { static HealthReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String( byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat( string.Concat(
"CgxoZWFsdGgucHJvdG8SDmdycGMuaGVhbHRoLnYxIiUKEkhlYWx0aENoZWNr", "ChtncnBjL2hlYWx0aC92MS9oZWFsdGgucHJvdG8SDmdycGMuaGVhbHRoLnYx",
"UmVxdWVzdBIPCgdzZXJ2aWNlGAEgASgJIpQBChNIZWFsdGhDaGVja1Jlc3Bv", "IiUKEkhlYWx0aENoZWNrUmVxdWVzdBIPCgdzZXJ2aWNlGAEgASgJIpQBChNI",
"bnNlEkEKBnN0YXR1cxgBIAEoDjIxLmdycGMuaGVhbHRoLnYxLkhlYWx0aENo", "ZWFsdGhDaGVja1Jlc3BvbnNlEkEKBnN0YXR1cxgBIAEoDjIxLmdycGMuaGVh",
"ZWNrUmVzcG9uc2UuU2VydmluZ1N0YXR1cyI6Cg1TZXJ2aW5nU3RhdHVzEgsK", "bHRoLnYxLkhlYWx0aENoZWNrUmVzcG9uc2UuU2VydmluZ1N0YXR1cyI6Cg1T",
"B1VOS05PV04QABILCgdTRVJWSU5HEAESDwoLTk9UX1NFUlZJTkcQAjJaCgZI", "ZXJ2aW5nU3RhdHVzEgsKB1VOS05PV04QABILCgdTRVJWSU5HEAESDwoLTk9U",
"ZWFsdGgSUAoFQ2hlY2sSIi5ncnBjLmhlYWx0aC52MS5IZWFsdGhDaGVja1Jl", "X1NFUlZJTkcQAjJaCgZIZWFsdGgSUAoFQ2hlY2sSIi5ncnBjLmhlYWx0aC52",
"cXVlc3QaIy5ncnBjLmhlYWx0aC52MS5IZWFsdGhDaGVja1Jlc3BvbnNlQhGq", "MS5IZWFsdGhDaGVja1JlcXVlc3QaIy5ncnBjLmhlYWx0aC52MS5IZWFsdGhD",
"Ag5HcnBjLkhlYWx0aC5WMWIGcHJvdG8z")); "aGVja1Jlc3BvbnNlQhGqAg5HcnBjLkhlYWx0aC5WMWIGcHJvdG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { }, new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {

@ -1,5 +1,5 @@
// Generated by the protocol buffer compiler. DO NOT EDIT! // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: health.proto // source: grpc/health/v1/health.proto
// Original file comments: // Original file comments:
// Copyright 2015, Google Inc. // Copyright 2015, Google Inc.
// All rights reserved. // All rights reserved.

@ -1,5 +1,5 @@
// Generated by the protocol buffer compiler. DO NOT EDIT! // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: reflection.proto // source: grpc/reflection/v1alpha/reflection.proto
#pragma warning disable 1591, 0612, 3021 #pragma warning disable 1591, 0612, 3021
#region Designer generated code #region Designer generated code
@ -9,11 +9,11 @@ using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic; using scg = global::System.Collections.Generic;
namespace Grpc.Reflection.V1Alpha { namespace Grpc.Reflection.V1Alpha {
/// <summary>Holder for reflection information generated from reflection.proto</summary> /// <summary>Holder for reflection information generated from grpc/reflection/v1alpha/reflection.proto</summary>
public static partial class ReflectionReflection { public static partial class ReflectionReflection {
#region Descriptor #region Descriptor
/// <summary>File descriptor for reflection.proto</summary> /// <summary>File descriptor for grpc/reflection/v1alpha/reflection.proto</summary>
public static pbr::FileDescriptor Descriptor { public static pbr::FileDescriptor Descriptor {
get { return descriptor; } get { return descriptor; }
} }
@ -22,36 +22,36 @@ namespace Grpc.Reflection.V1Alpha {
static ReflectionReflection() { static ReflectionReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String( byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat( string.Concat(
"ChByZWZsZWN0aW9uLnByb3RvEhdncnBjLnJlZmxlY3Rpb24udjFhbHBoYSKK", "CihncnBjL3JlZmxlY3Rpb24vdjFhbHBoYS9yZWZsZWN0aW9uLnByb3RvEhdn",
"AgoXU2VydmVyUmVmbGVjdGlvblJlcXVlc3QSDAoEaG9zdBgBIAEoCRIaChBm", "cnBjLnJlZmxlY3Rpb24udjFhbHBoYSKKAgoXU2VydmVyUmVmbGVjdGlvblJl",
"aWxlX2J5X2ZpbGVuYW1lGAMgASgJSAASIAoWZmlsZV9jb250YWluaW5nX3N5", "cXVlc3QSDAoEaG9zdBgBIAEoCRIaChBmaWxlX2J5X2ZpbGVuYW1lGAMgASgJ",
"bWJvbBgEIAEoCUgAEk4KGWZpbGVfY29udGFpbmluZ19leHRlbnNpb24YBSAB", "SAASIAoWZmlsZV9jb250YWluaW5nX3N5bWJvbBgEIAEoCUgAEk4KGWZpbGVf",
"KAsyKS5ncnBjLnJlZmxlY3Rpb24udjFhbHBoYS5FeHRlbnNpb25SZXF1Z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W9uX251bWJlchgCIAMoBSJQChNM", "TnVtYmVyUmVzcG9uc2USFgoOYmFzZV90eXBlX25hbWUYASABKAkSGAoQZXh0",
"aXN0U2VydmljZVJlc3BvbnNlEjkKB3NlcnZpY2UYASADKAsyKC5ncnBjLnJl", "ZW5zaW9uX251bWJlchgCIAMoBSJQChNMaXN0U2VydmljZVJlc3BvbnNlEjkK",
"ZmxlY3Rpb24udjFhbHBoYS5TZXJ2aWNlUmVzcG9uc2UiHwoPU2VydmljZVJl", "B3NlcnZpY2UYASADKAsyKC5ncnBjLnJlZmxlY3Rpb24udjFhbHBoYS5TZXJ2",
"c3BvbnNlEgwKBG5hbWUYASABKAkiOgoNRXJyb3JSZXNwb25zZRISCgplcnJv", "aWNlUmVzcG9uc2UiHwoPU2VydmljZVJlc3BvbnNlEgwKBG5hbWUYASABKAki",
"cl9jb2RlGAEgASgFEhUKDWVycm9yX21lc3NhZ2UYAiABKAkykwEKEFNlcnZl", "OgoNRXJyb3JSZXNwb25zZRISCgplcnJvcl9jb2RlGAEgASgFEhUKDWVycm9y",
"clJlZmxlY3Rpb24SfwoUU2VydmVyUmVmbGVjdGlvbkluZm8SMC5ncnBjLnJl", "X21lc3NhZ2UYAiABKAkykwEKEFNlcnZlclJlZmxlY3Rpb24SfwoUU2VydmVy",
"ZmxlY3Rpb24udjFhbHBoYS5TZXJ2ZXJSZWZsZWN0aW9uUmVxdWVzdBoxLmdy", "UmVmbGVjdGlvbkluZm8SMC5ncnBjLnJlZmxlY3Rpb24udjFhbHBoYS5TZXJ2",
"cGMucmVmbGVjdGlvbi52MWFscGhhLlNlcnZlclJlZmxlY3Rpb25SZXNwb25z", "ZXJSZWZsZWN0aW9uUmVxdWVzdBoxLmdycGMucmVmbGVjdGlvbi52MWFscGhh",
"ZSgBMAFiBnByb3RvMw==")); "LlNlcnZlclJlZmxlY3Rpb25SZXNwb25zZSgBMAFiBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { }, new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {

@ -1,5 +1,5 @@
// Generated by the protocol buffer compiler. DO NOT EDIT! // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: reflection.proto // source: grpc/reflection/v1alpha/reflection.proto
// Original file comments: // Original file comments:
// Copyright 2016, Google Inc. // Copyright 2016, Google Inc.
// All rights reserved. // All rights reserved.
@ -40,7 +40,7 @@ using System.Threading.Tasks;
using Grpc.Core; using Grpc.Core;
namespace Grpc.Reflection.V1Alpha { namespace Grpc.Reflection.V1Alpha {
public static class ServerReflection public static partial class ServerReflection
{ {
static readonly string __ServiceName = "grpc.reflection.v1alpha.ServerReflection"; static readonly string __ServiceName = "grpc.reflection.v1alpha.ServerReflection";
@ -61,7 +61,7 @@ namespace Grpc.Reflection.V1Alpha {
} }
/// <summary>Base class for server-side implementations of ServerReflection</summary> /// <summary>Base class for server-side implementations of ServerReflection</summary>
public abstract class ServerReflectionBase public abstract partial class ServerReflectionBase
{ {
/// <summary> /// <summary>
/// The reflection service is structured as a bidirectional stream, ensuring /// The reflection service is structured as a bidirectional stream, ensuring
@ -75,7 +75,7 @@ namespace Grpc.Reflection.V1Alpha {
} }
/// <summary>Client for ServerReflection</summary> /// <summary>Client for ServerReflection</summary>
public class ServerReflectionClient : ClientBase<ServerReflectionClient> public partial class ServerReflectionClient : ClientBase<ServerReflectionClient>
{ {
/// <summary>Creates a new client for ServerReflection</summary> /// <summary>Creates a new client for ServerReflection</summary>
/// <param name="channel">The channel to use to make remote calls.</param> /// <param name="channel">The channel to use to make remote calls.</param>

@ -40,13 +40,16 @@ REFLECTION_DIR=src/csharp/Grpc.Reflection
TESTING_DIR=src/csharp/Grpc.IntegrationTesting TESTING_DIR=src/csharp/Grpc.IntegrationTesting
$PROTOC --plugin=$PLUGIN --csharp_out=$EXAMPLES_DIR --grpc_out=$EXAMPLES_DIR \ $PROTOC --plugin=$PLUGIN --csharp_out=$EXAMPLES_DIR --grpc_out=$EXAMPLES_DIR \
-I src/proto/math src/proto/math/math.proto -I src/proto src/proto/math/math.proto
$PROTOC --plugin=$PLUGIN --csharp_out=$HEALTHCHECK_DIR --grpc_out=$HEALTHCHECK_DIR \ $PROTOC --plugin=$PLUGIN --csharp_out=$HEALTHCHECK_DIR --grpc_out=$HEALTHCHECK_DIR \
-I src/proto/grpc/health/v1 src/proto/grpc/health/v1/health.proto -I src/proto src/proto/grpc/health/v1/health.proto
$PROTOC --plugin=$PLUGIN --csharp_out=$REFLECTION_DIR --grpc_out=$REFLECTION_DIR \ $PROTOC --plugin=$PLUGIN --csharp_out=$REFLECTION_DIR --grpc_out=$REFLECTION_DIR \
-I src/proto/grpc/reflection/v1alpha src/proto/grpc/reflection/v1alpha/reflection.proto -I src/proto src/proto/grpc/reflection/v1alpha/reflection.proto
# TODO(jtattermusch): following .proto files are a bit broken and import paths
# don't match the package names. Setting -I to the correct value src/proto
# breaks the code generation.
$PROTOC --plugin=$PLUGIN --csharp_out=$TESTING_DIR --grpc_out=$TESTING_DIR \ $PROTOC --plugin=$PLUGIN --csharp_out=$TESTING_DIR --grpc_out=$TESTING_DIR \
-I . src/proto/grpc/testing/{control,empty,messages,metrics,payloads,services,stats,test}.proto -I . src/proto/grpc/testing/{control,empty,messages,metrics,payloads,services,stats,test}.proto

Loading…
Cancel
Save