diff --git a/src/main/java/com/google/devtools/build/lib/bazel/debug/WorkspaceRuleEvent.java b/src/main/java/com/google/devtools/build/lib/bazel/debug/WorkspaceRuleEvent.java index f4ba5335d17140..e35c4780dc3c5b 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/debug/WorkspaceRuleEvent.java +++ b/src/main/java/com/google/devtools/build/lib/bazel/debug/WorkspaceRuleEvent.java @@ -179,7 +179,11 @@ public static WorkspaceRuleEvent newOsEvent(String ruleLabel, Location location) /** Creates a new WorkspaceRuleEvent for a symlink event. */ public static WorkspaceRuleEvent newSymlinkEvent( String from, String to, String ruleLabel, Location location) { - SymlinkEvent e = WorkspaceLogProtos.SymlinkEvent.newBuilder().setFrom(from).setTo(to).build(); + SymlinkEvent e = + WorkspaceLogProtos.SymlinkEvent.newBuilder() + .setTarget(from) + .setPath(to) + .build(); WorkspaceLogProtos.WorkspaceEvent.Builder result = WorkspaceLogProtos.WorkspaceEvent.newBuilder(); diff --git a/src/main/java/com/google/devtools/build/lib/bazel/debug/workspace_log.proto b/src/main/java/com/google/devtools/build/lib/bazel/debug/workspace_log.proto index 84d82027c668f9..874ddc652fa44d 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/debug/workspace_log.proto +++ b/src/main/java/com/google/devtools/build/lib/bazel/debug/workspace_log.proto @@ -81,9 +81,9 @@ message OsEvent { // Information on "symlink" event in repository_ctx. message SymlinkEvent { // path to which the symlink will point to - string from = 1; + string target = 1; // path of the symlink - string to = 2; + string path = 2; } // Information on "template" event in repository_ctx. diff --git a/src/test/shell/bazel/bazel_workspaces_test.sh b/src/test/shell/bazel/bazel_workspaces_test.sh index 6293aa7c9fc7b0..00b698eb48792d 100755 --- a/src/test/shell/bazel/bazel_workspaces_test.sh +++ b/src/test/shell/bazel/bazel_workspaces_test.sh @@ -277,8 +277,8 @@ function test_symlink() { ensure_contains_exactly 'location: .*repos.bzl:3:3' 1 ensure_contains_atleast 'rule: "//external:repo"' 1 ensure_contains_exactly 'symlink_event' 1 - ensure_contains_exactly 'from: ".*symlink.txt"' 1 - ensure_contains_exactly 'to: ".*symlink_out.txt"' 1 + ensure_contains_exactly 'target: ".*symlink.txt"' 1 + ensure_contains_exactly 'path: ".*symlink_out.txt"' 1 } function test_template() {