go_test: Add env attribute#3004
Conversation
79e1d9e to
20e980e
Compare
Previously it was not possible to look up runfiles from a manifest unless they were in the main workspace. Factor in in-path workspaces when looking up runfiles.
c0ffbfd to
49df7be
Compare
|
Thanks for working on this @illicitonion. My understanding is that we could add support for this attribute using the With this approach, we should just need to run whatever pre-processing is needed on the It would also be good to add some documentation to the |
This allows setting environment variables before static initialisers run, and which reference expanded locations. See bazel-contrib#2921 for more context.
49df7be to
5c897f2
Compare
Oh nice, that's much simpler! Done!
Added to core.rst
There's one test (tests/core/go_test/env_test.go) showing that an env var is set and expanded to the path of a file which can then be read - are there more contexts you have in mind to test? |
db119b1 to
5c897f2
Compare
What type of PR is this?
Feature
What does this PR do? Why is it needed?
This allows setting environment variables before static initialisers
run, and which reference expanded locations.
Which issues(s) does this PR fix?
Partially fixes #2921