Skip to content

Commit

Permalink
Merge pull request #43706 from basselworkforce/main
Browse files Browse the repository at this point in the history
Include proto unzip directory as proto import directory argument for protoc
  • Loading branch information
gsmet authored Oct 16, 2024
2 parents a02c763 + 732c799 commit 29b0b6b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,7 @@ private void extractProtosFromArtifact(Path workDir, Collection<Path> protoFiles
.normalize().toAbsolutePath();
try {
Files.createDirectories(protoUnzipDir);
if (filesToInclude.isEmpty()) {
protoDirectories.add(protoUnzipDir.toString());
}
protoDirectories.add(protoUnzipDir.toString());
} catch (IOException e) {
throw new GrpcCodeGenException("Failed to create directory: " + protoUnzipDir, e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ option optimize_for = CODE_SIZE;
package org.acme.proto.extended;

// Import the base proto file
import "base.proto";
import "protobuf/base.proto";

// A message representing detailed user information
message DetailedUser {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ option java_outer_classname = "BASEProtos";
option optimize_for = CODE_SIZE;

// Import the extra proto file
import "role.proto";
import "protobuf/role.proto";

package org.acme.protos.base;

Expand Down

0 comments on commit 29b0b6b

Please sign in to comment.