-
-
Notifications
You must be signed in to change notification settings - Fork 108
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
feat: add BAZEL env variable to js_binary #1351
base: main
Are you sure you want to change the base?
Conversation
a05386b
to
3c7ed2f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you search for a conventional variable set in other languages? What do ppl do there?
696fe59
to
d636729
Compare
If you take the CI vendors & tools as an example, they all set https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables
https://buildkite.com/docs/pipelines/environment-variables#buildkite-environment-variables
https://circleci.com/docs/variables/#built-in-environment-variables
Setting |
db6c713
to
c4f5663
Compare
I haven't seen the |
c4f5663
to
575aa48
Compare
Bazel itself sets |
Yes, tho There is precedent for setting
|
I'm just nitpicking this because every added variable has the potential to collide with something the user already set, and shorter is more likely. |
I do check if it is already set and don't set override it if it is. Perhaps I should create an issue on bazelbuild/bazel so that bazel itself sets |
A bit related: bazelbuild/bazel#15470 |
Differentiating between Bazel and non-Bazel environments is very common and to date users have been using either
BAZEL_TEST
orJS_BINARY__*
env vars. The former is not set by bazel underbazel run
and the latter is not particularly ergonomic.BAZEL
is simpler and easier to remember.Type of change
Test plan