$(location) should be able to accept the label of an alias()
Open
P3
team-Rules-API
type: bug
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 75
Description
### Description of the bug:
This is about macros generating attributes with `location` function where an alias is used.
There is no way in Skylark to get the real label of an AliasConfiguredTarget.
Here's the horrible workaround I used:
```
labels = [target.label]
if repr(target).startswith("
Contributor guide
Research direction
Start with the Skylark macro behavior described here and trace how location(), alias(), AliasConfiguredTarget, and target.label interact; the issue names no files or tests. Done means location() can accept an alias's real label without relying on repr(target) parsing.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100