-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix proto_path to handle generated sources and external workspaces (#205
) The execdir is the effective proto sources root for a rule: - for normal sources, execdir is the normal Bazel EXECDIR - for generated sources, execdir is Bazel's GENDIR - for external sources, execdir is EXECDIR/external/<workspace name> - for external generated sources, execdir is GENDIR/external/<workspace> This changes look through all of the transitive units for a rule and adds the execdir from each unit to the proto path.
- Loading branch information
Showing
5 changed files
with
86 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
syntax = "proto3"; | ||
|
||
import "tests/generated_proto_file/subdir/simple.proto"; | ||
|
||
package complicated; | ||
|
||
message Test { | ||
subdir.Test test = 1; | ||
} | ||
|
9 changes: 9 additions & 0 deletions
9
tests/generated_proto_file/complicated/complicated_copy.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
syntax = "proto3"; | ||
|
||
import "tests/generated_proto_file/subdir/copy.proto"; | ||
|
||
package complicated; | ||
|
||
message Test { | ||
subdir.Test test = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
syntax = "proto3"; | ||
|
||
package simple; | ||
package subdir; | ||
|
||
message Test { | ||
string value = 1; | ||
|