aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/google/protobuf/compiler/command_line_interface.cc6
-rw-r--r--src/google/protobuf/compiler/command_line_interface_unittest.cc6
2 files changed, 10 insertions, 2 deletions
diff --git a/src/google/protobuf/compiler/command_line_interface.cc b/src/google/protobuf/compiler/command_line_interface.cc
index 3629f682..3eba3486 100644
--- a/src/google/protobuf/compiler/command_line_interface.cc
+++ b/src/google/protobuf/compiler/command_line_interface.cc
@@ -439,7 +439,11 @@ bool CommandLineInterface::MakeInputsBeProtoPathRelative(
} else {
cerr << input_files_[i] << ": File does not reside within any path "
"specified using --proto_path (or -I). You must specify a "
- "--proto_path which encompasses this file." << endl;
+ "--proto_path which encompasses this file. Note that the "
+ "proto_path must be an exact prefix of the .proto file "
+ "names -- protoc is too dumb to figure out when two paths "
+ "(e.g. absolute and relative) are equivalent (it's harder "
+ "than you think)." << endl;
}
return false;
}
diff --git a/src/google/protobuf/compiler/command_line_interface_unittest.cc b/src/google/protobuf/compiler/command_line_interface_unittest.cc
index 0784e781..9da41c02 100644
--- a/src/google/protobuf/compiler/command_line_interface_unittest.cc
+++ b/src/google/protobuf/compiler/command_line_interface_unittest.cc
@@ -882,7 +882,11 @@ TEST_F(CommandLineInterfaceTest, CwdRelativeInputNotMappedError) {
ExpectErrorText(
"$tmpdir/foo.proto: File does not reside within any path "
"specified using --proto_path (or -I). You must specify a "
- "--proto_path which encompasses this file.\n");
+ "--proto_path which encompasses this file. Note that the "
+ "proto_path must be an exact prefix of the .proto file "
+ "names -- protoc is too dumb to figure out when two paths "
+ "(e.g. absolute and relative) are equivalent (it's harder "
+ "than you think).\n");
}
TEST_F(CommandLineInterfaceTest, CwdRelativeInputNotFoundAndNotMappedError) {