rules_go
rules_go copied to clipboard
Support env_inherit for go_test
What version of rules_go are you using?
v0.33.0
What version of gazelle are you using?
v0.26.0
What version of Bazel are you using?
5.2.0
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
MacOS Monterry (12.4) Arm64
Any other potentially useful information about your toolchain?
What did you do?
I wanted to use env_inherit in go_test to pass through an environment variable
What did you expect to see?
The environment variable pass through successfully
What did you see instead?
env_inherit is not supported.
go_test currently allows defining fixed environment variables through env, but not passing through inherited environment variables. This was added to starlark support in Bazel 5.2 (https://blog.bazel.build/2022/06/08/bazel-5.2.html#starlark)
Example in rules_scala: https://github.com/bazelbuild/rules_scala/pull/1401