bazelbuild / bazelbuild/bazel-skylib
Feature request: Have the paths library support make variable substitution.
- Dominant language
- Starlark
- Stars
- 444
- Forks
- 202
- PR merge metrics
- No merged PRs in 30d
Description
If I want to get the path to a file which has been built in bazel, I can do something using make variable substitution with something like "$(execroot ...)". Likewise, if I want to get the path to a directory of a file by already-known path, I can do so by using the paths.dirname() component.
However, I'm currently unable to combine these two features together. If I need the directory containing a file which will be copied or built by bazel, I have no way of doing so. Attempts at [getting help](https://groups.google.com/g/bazel-discuss/c/oipjdb6XlDs) on the bazel-discuss mailing list have not resolved in solutions.
Contributor guide
Research direction
Start by locating the paths library entry points and its existing paths.dirname() handling, then trace how make variable substitution is represented in Bazel. Determine how the two features should compose for a built or copied file, and consider the relevant library tests if present. Done means a path can apply make variable substitution and then obtain the containing directory.
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