Include name in repr of exported rules#18392
Closed
fmeum wants to merge 1 commit intobazelbuild:masterfrom
Closed
Conversation
repr of rulesrepr of exported rules
Collaborator
Author
|
@comius Could you review this (very small) change? |
Collaborator
Author
|
@comius Friendly ping |
comius
approved these changes
Jun 7, 2023
Contributor
|
I'm slightly reluctant to approve this, but seems to be the best of the bad choices. In general people shouldn't rely on string representation. The PR fixes a previous unintentional change in the representation. The representation has the problem of not including .bzl file where the rule was created. But that's the same problem that pests ctx.rule.kind. |
amishra-u
pushed a commit
to amishra-u/bazel
that referenced
this pull request
Jun 7, 2023
For an exported rule `foo_library`, `repr(foo_library)` now evaluates to `<rule foo_library>`, not `<rule>`, matching the behavior of native rules more closely. Fixes bazelbuild#17483 Closes bazelbuild#18392. PiperOrigin-RevId: 538458291 Change-Id: I331955655756a3c235be0a93f1394716ddf9849d
Collaborator
Author
|
@bazel-io flag |
Member
|
@bazel-io fork 6.4.0 |
This was referenced Aug 10, 2023
bazel-io
pushed a commit
to bazel-io/bazel
that referenced
this pull request
Aug 10, 2023
For an exported rule `foo_library`, `repr(foo_library)` now evaluates to `<rule foo_library>`, not `<rule>`, matching the behavior of native rules more closely. Fixes bazelbuild#17483 Closes bazelbuild#18392. PiperOrigin-RevId: 538458291 Change-Id: I331955655756a3c235be0a93f1394716ddf9849d
iancha1992
pushed a commit
that referenced
this pull request
Aug 22, 2023
For an exported rule `foo_library`, `repr(foo_library)` now evaluates to `<rule foo_library>`, not `<rule>`, matching the behavior of native rules more closely. Fixes #17483 Closes #18392. Commit 002490b PiperOrigin-RevId: 538458291 Change-Id: I331955655756a3c235be0a93f1394716ddf9849d Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For an exported rule
foo_library,repr(foo_library)now evaluates to<rule foo_library>, not<rule>, matching the behavior of native rules more closely.Fixes #17483