Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename SymlinkEvent.to to SymlinkEvent.path and SymlinkEvent.from to SymlinkEvent.target. #6885

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/test/shell/bazel/bazel_workspaces_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down