Skip to content
Snippets Groups Projects
Commit 3ee4e9a7 authored by Googler's avatar Googler Committed by Copybara-Service
Browse files

Make `Label#toString` return `@@`-prefixed labels

This change causes all labels in error messages, log output, Build Event Protocol, etc. to be prefixed with double-at (`@@`) if they are from non-main repos. This prevents cases where messages contain stuff like `the target @abc~1.0//:def is wrong` but the user can't do `bazel query @abc~1.0//:def` at all, since the actual target is `@@abc~1.0//:def`.

This required more test changes than expected as there have been many places in the codebase where we compare labels using some sort of string form (for example, toolchain types as automatic exec groups).

Fixes https://github.com/bazelbuild/bazel/issues/18543.

PiperOrigin-RevId: 565141761
Change-Id: I1261ab14067bcf5d44cd140e5528b5da5916dc87
parent b5c38af8
Showing
with 57 additions and 73 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment