-
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
Let aquery
print effective environment for all CommandAction
s
#17108
Conversation
bf14b1a
to
bacf1b6
Compare
Instead of printing the fixed part of the `ActionEnvironment` of all `SpawnActions`, `aquery` now prints the effective environment resolved against an empty client environment of all `AbstractAction`s that implement `CommandAction`. For `SpawnAction`s, this should not result in any observable change, but C++ actions, which only override `AbstractAction#getEffectiveEnvironment`, now have their fixed environments (e.g. toolchain env vars such as `INCLUDE` with MSVC) emitted.
bacf1b6
to
04719c3
Compare
aquery
print environment for all AbstractAction
saquery
print effective environment for all CommandAction
s
@meisterT Could you review this PR? @cpsauer Could you check that this fixes the aquery problem? I don't think it would affect extra actions, but then I also know almost nothing about them. Also don't expect |
Thanks for diving in @fmeum! Looks to be a good improvement to me. [I don't have much experience in this part of the codebase, but radiating ideas: Might it make sense to pass through the actual client environment if it might influence the execution environment? Certainly that shouldn't block merging or anything, but it strikes me that people probably run this trying to understand how the build maps to commands on their specific machine/environment. That's true of the tool I maintain that uses this at least.] |
@cpsauer Making the output of The Xcode variables receive special handling by Bazel that is more or less equivalent to (but more efficient than) running xcode-locator as part of the action. Since with this change all environment variables that go into xcode-locator are available from |
Seems like it already is--inferred platform, environment specifying compiler, etc., right?--but you guys are certainly the experts. Definitely don't want this side discussion to block this improvement, though. |
@bazel-io flag |
All these things are deterministic functions of the outputs of repository rules, which you can either circumvent by specifying values for command-line flags such |
Sweet. Thanks again, guys. |
@bazel-io fork 6.1.0 |
Hi @fmeum! We are trying to cherry-pick the changes to release 6.1.0. But pre-submits checks are failing ([https://github.com//pull/17274]) . So could you please help us in cherry-picking this changes to release 6.1.0? |
Instead of printing the fixed part of the `ActionEnvironment` of all `SpawnActions`, `aquery` now prints the effective environment resolved against an empty client environment of all `AbstractAction`s that implement `CommandAction`. For `SpawnAction`s, this should not result in any observable change, but C++ actions, which only override `AbstractAction#getEffectiveEnvironment`, now have their fixed environments (e.g. toolchain env vars such as `INCLUDE` with MSVC) emitted. Work towards #12852 Closes #17108. PiperOrigin-RevId: 501198850 Change-Id: I035a8cfde32193ca7f1f71030bd183c20edfdc0d
…n`s (#17274) * Let `aquery` print effective environment for all `CommandAction`s Instead of printing the fixed part of the `ActionEnvironment` of all `SpawnActions`, `aquery` now prints the effective environment resolved against an empty client environment of all `AbstractAction`s that implement `CommandAction`. For `SpawnAction`s, this should not result in any observable change, but C++ actions, which only override `AbstractAction#getEffectiveEnvironment`, now have their fixed environments (e.g. toolchain env vars such as `INCLUDE` with MSVC) emitted. Work towards #12852 Closes #17108. PiperOrigin-RevId: 501198850 Change-Id: I035a8cfde32193ca7f1f71030bd183c20edfdc0d * Removed the function test_does_not_fail_horribly_with_file() --------- Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
Instead of printing the fixed part of the
ActionEnvironment
of allSpawnActions
,aquery
now prints the effective environment resolved against an empty client environment of allAbstractAction
s that implementCommandAction
.For
SpawnAction
s, this should not result in any observable change, but C++ actions, which only overrideAbstractAction#getEffectiveEnvironment
, now have their fixed environments (e.g. toolchain env vars such asINCLUDE
with MSVC) emitted.Work towards #12852