-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Bazel@HEAD lacks env_inherit
on cc_test
#15268
Comments
The log you provided is expired, FWIW, but you're right-- Since this is not an easy fix, I'll roll it back for now until we get this straightened out. |
Oh, for some reason I missed that the commit you linked is in -- nevertheless, I will rollback while I work on that to minimize the breakage window. |
*** Reason for rollback *** Breaks tests using `env_inherit`. See: #15268 *** Original change description *** Flip cc_test to use the Starlark version. NOTE: This does not change the use of platform/toolchains based cc_test. RELNOTES: Switch cc_test implementation to Starlark. Note: cc_test will now link statically when _targeting_ Windows regardless of host platform (rather than always linking statically when Windows is the _host_). PiperOrigin-RevId: 441996034
I don't think I can close this bug or anything, but the rollback is submitted: |
With #15232, the analogue of |
@trybka FYI: There is a subtle difference in behavior between |
@fmeum concretely, you're saying: a) for proper native compatibility, we should filter keys in I believe I implemented (b) in 4ed40ee, but if there's a concern, I could go add filtering. Whatever we land on, I should update to add a test case. |
If b) was meant to say something like "except that might be genuinely less useful and the alternative might be preferred", then yes. I prefer the solution you implemented in 4ed40ee and would argue that if no one speaks up about any experienced breakage (unlikely), then this is the better of the two alternatives for the future. +1 on adding a test case codifying this decision. |
NOTE: This does not change the use of platform/toolchains based cc_test. RELNOTES: Switch cc_test implementation to Starlark. Note: cc_test will now link statically when _targeting_ Windows regardless of host platform (rather than always linking statically when Windows is the _host_). Additionally, the behavior of env_inherit differs--notably the inherited environment overrides the fixed environment. See: #15268 PiperOrigin-RevId: 443380618
NOTE: This does not change the use of platform/toolchains based cc_test. `env` attribute now handles location / makevar expansion. RELNOTES: Switch cc_test implementation to Starlark. Note: cc_test will now link statically when _targeting_ Windows regardless of host platform (rather than always linking statically when Windows is the _host_). Additionally, the behavior of env_inherit differs--notably the inherited environment overrides the fixed environment. See: #15268 PiperOrigin-RevId: 445938132
@trybka Looks like this could be closed? |
Yes, though I don't appear to have access to. @oquenchil can you take care of it? |
Description of the bug:
With the Starlark flip of
cc_test
in e04735d, the rule no longer provides theenv_inherit
attribute.What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
See https://pipelines.actions.githubusercontent.com/serviceHosts/e1b19da9-c261-489f-82be-008378a078a0/_apis/pipelines/1/runs/1251/signedlogcontent/14?urlExpires=2022-04-15T08%3A25%3A30.3485429Z&urlSigningMethod=HMACV1&urlSignature=hEga7PwNt42ZQYwL232J1U%2BEmPtUJJu%2B30dfi0c0M6g%3D, but really any use of
env_inherit
oncc_test
will fail at analysis time.Which operating system are you running Bazel on?
Linux
What is the output of
bazel info release
?development version
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.Using Bazelisk to fetch 22c91da.
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?
No response
Any other information, logs, or outputs that you want to share?
ee9727d can potentially be used to implement
env_inherit
in Starlark.The text was updated successfully, but these errors were encountered: