bazelbuild / bazelbuild/bazel-skylib
native_binary attribute env does not expand locations
- Dominant language
- Starlark
- Stars
- 444
- Forks
- 202
- PR merge metrics
- No merged PRs in 30d
Description
In the `env` attribute of `cc_binary` or `sh_binary` locations get expanded. This does not happen for `native_binary` which is unexpected.
Usage example:
```
native_binary(
name = "my_example",
src = "//src/example",
data = [
":my_shared_lib",
],
env = {
"LD_DEBUG": "libs",
"LD_LIBRARY_PATH": "$(rootpath :my_shared_lib)",
},
)
```
Also it would be great to have the possibility to extend a path variable instead of overwriting it (`env_inherit`?).
Contributor guide
Research direction
The issue provides a native_binary example but names no source file or test. Start by locating native_binary's env handling and compare it with the stated cc_binary and sh_binary behavior. Done means locations such as $(rootpath :my_shared_lib) expand consistently; the separate env_inherit request needs its scope clarified.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100