3

I have two simple .proto files. One has an import towards the other. When launching the command; protocols --java_out = 'exit path' -I 'path root' 'path .proto with import'. It throws me the following error: Import "path proto2.proto" was not found or had errors. In the import I have absolute paths My two files. proto1.proto:

syntax = "proto3";
import "/home/myuser/insProtoc/proto2.proto";

message SearchResponse {
  repeated Result results = 1;
}

proto2.proto:

syntax = "proto3";

message Result {
  string url = 1;
  string title = 2;
  repeated string snippets = 3;
}

Return this error;

/home//mysuser/insProtoc/proto2.proto: File not found. /--proto_path/ejemplo1.proto: Import "/home/muyuser/insProtoc/proto2.proto" was not found or had errors. /--proto_path/proto1.proto:6:12: "Result" is not defined.

Rahul Singh
  • 918
  • 14
  • 31
dfuentes
  • 31
  • 4

0 Answers0