-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Let aquery print effective environment for all CommandActions
#17108
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
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 AbstractActionsaquery print effective environment for all CommandActions
|
@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 <[email protected]>
Instead of printing the fixed part of the
ActionEnvironmentof allSpawnActions,aquerynow prints the effective environment resolved against an empty client environment of allAbstractActions that implementCommandAction.For
SpawnActions, 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 asINCLUDEwith MSVC) emitted.Work towards #12852