Skip to content

Commit

Permalink
Use shorthand display form in Label#debugPrint
Browse files Browse the repository at this point in the history
This makes the output, which is meant to be friendly to humans, more concise. If users want `//foo` to be `print`ed as `//foo:foo`, they can specify `sep = ""` and also print `:foo`, but stripping the name off is not possible without this change.
  • Loading branch information
fmeum committed Jan 7, 2025
1 parent de4ba2f commit 95776cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ public void debugPrint(Printer printer, StarlarkThread thread) {
// ignore
}
}
printer.append(getDisplayForm(mainRepoMapping));
printer.append(getShorthandDisplayForm(mainRepoMapping));
}

@Override
Expand Down
4 changes: 2 additions & 2 deletions src/test/shell/bazel/workspace_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -723,8 +723,8 @@ EOF
cd main
bazel build @foo//:bar \
>& "$TEST_log" || fail "Expected build to succeed"
expect_log "@b//blah:blah"
expect_not_log "@a//blah:blah"
expect_log "@b//blah"
expect_not_log "@a//blah"
}

function test_workspace_addition_change_aspect() {
Expand Down

0 comments on commit 95776cb

Please sign in to comment.