Conversation
| throw result.getError().getException(); | ||
| } | ||
| assertThat(result.get(skyKey).getModule().getGlobal("data")) | ||
| .isEqualTo("foo://:foo bar:@@data_repo~1.0//:bar baz:@@canonical_name//:baz"); |
There was a problem hiding this comment.
huh... why is this not bar:@data_repo//:bar?
There was a problem hiding this comment.
This verifies that to_display_form() doesn't return an apparent name in the context of a module extension, where if it did we would need to track that information in the lockfile.
There was a problem hiding this comment.
I see, because of BzlLoadFunction.java:1003.
There was a problem hiding this comment.
We got some test failures while importing this change: https://buildkite.com/bazel/google-bazel-presubmit/builds/77054
The source is at https://bazel-review.googlesource.com/q/2098361e4a924e0e09dcd48c50235b38c5c5fd84
/cc @iancha1992 @fmeum Can you please check what's different?
There was a problem hiding this comment.
The tests need to be updated now that my other PR has been merged. Will do that shortly and then you can reimport.
|
@bazel-io fork 7.1.0 |
Fixes bazelbuild#20486 Also use `to_display_form()` to generate Clang module names in the correct form for external repositories. `java_*` rules require more delicate handling and will be migrated in a follow-up change. RELNOTES: The `to_display_form()` method on `Label` returns a string representation of a label optimized for readability by humans.
7872172 to
b3e272c
Compare
b3e272c to
660bd8d
Compare
Fixes #20486 While `to_display_form()` can be called in all contexts, it only returns apparent names for BUILD threads, which are the most common use case for display form labels. Support for module extensions can be added later, but requires explicit tracking of inverse mappings in the lockfile. Also use `to_display_form()` to generate Clang module names in the correct form for external repositories. `java_*` rules require more delicate handling and will be migrated in a follow-up change. RELNOTES: The `to_display_form()` method on `Label` returns a string representation of a label optimized for readability by humans. Closes #21179. PiperOrigin-RevId: 606330539 Change-Id: Id6a4ad79fd3d50319320789b88c618aad28db28b
Fixes #20486 While `to_display_form()` can be called in all contexts, it only returns apparent names for BUILD threads, which are the most common use case for display form labels. Support for module extensions can be added later, but requires explicit tracking of inverse mappings in the lockfile. Also use `to_display_form()` to generate Clang module names in the correct form for external repositories. `java_*` rules require more delicate handling and will be migrated in a follow-up change. RELNOTES: The `to_display_form()` method on `Label` returns a string representation of a label optimized for readability by humans. Closes #21179. PiperOrigin-RevId: 606330539 Change-Id: Id6a4ad79fd3d50319320789b88c618aad28db28b
Fixes #20486 While `to_display_form()` can be called in all contexts, it only returns apparent names for BUILD threads, which are the most common use case for display form labels. Support for module extensions can be added later, but requires explicit tracking of inverse mappings in the lockfile. Also use `to_display_form()` to generate Clang module names in the correct form for external repositories. `java_*` rules require more delicate handling and will be migrated in a follow-up change. RELNOTES: The `to_display_form()` method on `Label` returns a string representation of a label optimized for readability by humans. Closes #21179. PiperOrigin-RevId: 606330539 Change-Id: Id6a4ad79fd3d50319320789b88c618aad28db28b Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
Fixes #20486
While
to_display_form()can be called in all contexts, it only returns apparent names for BUILD threads, which are the most common use case for display form labels. Support for module extensions can be added later, but requires explicit tracking of inverse mappings in the lockfile.Also use
to_display_form()to generate Clang module names in the correct form for external repositories.java_*rules require more delicate handling and will be migrated in a follow-up change.RELNOTES: The
to_display_form()method onLabelreturns a string representation of a label optimized for readability by humans.