Skip to content

Commit

Permalink
conflicting names when package is implicit
Browse files Browse the repository at this point in the history
  • Loading branch information
stan-is-hate committed May 31, 2024
1 parent 0cb87dc commit 0fc95d2
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 11 deletions.
1 change: 1 addition & 0 deletions integrated_tests/imported_message/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
tonic_build::configure().include_file("mod.rs").compile(
&[
"primary/primary.proto",
"primary/rectangle.proto",
"imported/imported.proto",
"zimported/zimported.proto",
],
Expand Down
12 changes: 1 addition & 11 deletions integrated_tests/imported_message/primary/primary.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ option java_multiple_files = true;
option java_package = "io.grpc.examples.primary";
option java_outer_classname = "PrimaryProto";

import "imported/imported.proto";
import "primary/rectangle.proto";
import "zimported/zimported.proto";

package primary;
Expand All @@ -17,16 +17,6 @@ service Primary {
rpc GetRectangle(RectangleLocationRequest) returns (RectangleLocationResponse) {}
}

// A latitude-longitude rectangle, represented as two diagonally opposite
// points "lo" and "hi".
message Rectangle {
// One corner of the rectangle.
imported.Point lo = 1;

// The other corner of the rectangle.
imported.Point hi = 2;
}

// A request payload to get a Rectangle.
message RectangleLocationRequest {
// The width of the rectangle.
Expand Down
24 changes: 24 additions & 0 deletions integrated_tests/imported_message/primary/rectangle.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

// Copyright 2015 gRPC authors.
//
syntax = "proto3";

option go_package = "github.com/pact-foundation/pact-go/v2/examples/grpc/primary";
option java_multiple_files = true;
option java_package = "io.grpc.examples.primary";
option java_outer_classname = "PrimaryProto";

import "imported/imported.proto";

package primary;


// A latitude-longitude rectangle, represented as two diagonally opposite
// points "lo" and "hi".
message Rectangle {
// One corner of the rectangle.
imported.Point lo = 1;

// The other corner of the rectangle.
imported.Point hi = 2;
}

0 comments on commit 0fc95d2

Please sign in to comment.