Skip to content
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 env and env_inherit to native_binary and native_test (using @bazel_features) #484

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

redsun82
Copy link

@redsun82 redsun82 commented Jan 11, 2024

This relies on the RunEnvironmentInfo that was introduced in bazel 5.3.0. To keep the library compatible with previous versions, bazel_features is used.

To make it possible to run CI and update the docs without all the dependencies from @bazel_features (some of which would be private and not visible to the doc generation rule), a bazel_features_stub directory is introduced which remains unused when using a released version of the library (it gets removed by MODULE.bazel-remove-override.patch).

Also, this requires a user to do an additional WORKSPACE setup step if they need to use native_binary.bzl and they are not using bzlmod.

Closes #409

@redsun82 redsun82 changed the title Add env and env_inherit to native_binary and native_test Add env and env_inherit to native_binary and native_test (using @bazel_features) Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add env attr to native_binary and native_test
1 participant