-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dirname variants of predefined source/output path variables. #23518
base: master
Are you sure you want to change the base?
Conversation
src/main/java/com/google/devtools/build/lib/analysis/LocationExpander.java
Outdated
Show resolved
Hide resolved
These are similar to existing `$(execpath)` and friends, but return the path of the artifact's directory rather than of the artifact itself.
fd6dce7
to
88c441f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @comius
Would it be more composable to provide a $(dirname ...)
primitive, i.e., a user would instead write $(dirname $(execpath ...))
or $(dirname $(rootpath ...))
?
@illicitonion Didn't you file an issue for this a while ago? Can't find it right now, but it also had relevant discussion. |
Nvm, found it: #23139 |
any idea who we should ping to review this one? |
Proposal A:
Proposal A-2:
Proposal B:
Proposal C:
Proposal D:
Proposal E:
|
Gentle ping @fmeum Was the above list of use cases and proposals what you were looking for, or would you prefer a more formal design doc -style writeup? |
This is what I (personally) have been looking for. It's very rich in information, thanks! Regarding My favorites are A and C, but I don't know which of them I'd prefer. |
@matts1 added ways to represent directories to bazel-skylib, it'd be really nice if we could ensure whatever path we take plays well with that. |
I've worked around a need for this feature before. |
These are similar to existing
$(execpath)
and friends, but return the path of the artifact's directory rather than of the artifact itself.Fixes #23516