-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Crash on using TEST_NAME as an environment variable name in rules #16094
Comments
Currently bazel hard-codes setting the At the very least, though, we shouldn't crash. Either we should allow overriding (and have it work), or forbid it (with documentation and a clear error message). |
Not crashing and emitting a useful error message would be a reasonable solution IMO. 👍🏽 |
This fixes bazelbuild#16094 Previously Bazel will crash if test uses reserved env variable (like `TEST_NAME`). Let's report an error in this case.
This fixes bazelbuild#16094 Previously Bazel will crash if test uses reserved env variable (like `TEST_NAME`). Let's report an error in this case.
This closes bazelbuild#16094 Previously Bazel will crash if test uses reserved env variable (like `TEST_NAME`). Let's report an error in this case.
This closes bazelbuild#16094 Previously Bazel will crash if test uses reserved env variable (like `TEST_NAME`). Let's report an error in this case.
This closes bazelbuild#16094 Previously Bazel will crash if test uses reserved env variable (like `TEST_NAME`). Let's report an error in this case.
This closes bazelbuild#16094 Previously Bazel will crash if test uses reserved env variable (like `TEST_NAME`). Let's report an error in this case.
This closes bazelbuild#16094 Previously Bazel will crash if test uses reserved env variable (like `TEST_NAME`). Let's report an error in this case.
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs. If you think this issue is still relevant and should stay open, please post any comment here and the issue will no longer be marked as stale. |
This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please post |
Description of the bug:
Passing an environment variable with the name TEST_NAME causes Bazel to crash. Renaming it to (say) MY_TEST_NAME fixes the issue.
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Repo with minimal example: https://github.com/varungandhi-src/bazel-crash/tree/042d1747b4e76c3e9e089cd72222bd3b5a36fdf5
Test with
bazel test //...
.The main problematic part seems to be this is this in
x.bzl
:Which operating system are you running Bazel on?
macOS 12.5
What is the output of
bazel info release
?release 5.2.0-homebrew
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse master; git rev-parse HEAD
?Have you found anything relevant by searching the web?
There is a similar error in #14681
But the cause seems to be different.
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: