-
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
Path map executable paths #22844
Path map executable paths #22844
Conversation
In `CommandLines`, the very first argument of the first command line is always a path to an executable. As such, it should both be path mapped and turned into a "callable" path (e.g. `./tool.sh` instead of `tool.sh`). This wasn't the case for `SpawnAction`'s created via `ctx.actions.run(executable = <some string>)`. This is fixed by moving the handling of the first argument into `CommandLines`.
c69935f
to
bb26cd6
Compare
Marking this as draft as the idea is flawed: It's possible that the user wants the executable to be looked up in path. |
39ce826
to
fa05d22
Compare
fa05d22
to
1e79fcb
Compare
@justinhorvitz Friendly ping |
Is this change only necessary due to the optimization detailed at https://cs.opensource.google/bazel/bazel/+/master:src/main/java/com/google/devtools/build/lib/analysis/actions/SpawnAction.java;l=979-982;drc=d32202b20f82c17f75ee204d505b08f2160640f5? That comes from d18702c, for which the internal description mentions a trivial memory savings. Maybe it's not worth it? @comius |
Not just because of that: There is plenty of starlark API that doesn't provide access to an |
Thanks, it's much easier to justify this change then. |
@bazel-io fork 7.3.0 |
@justinhorvitz @fmeum Just a friendly reminder, the 7.3.0RC1 is scheduled for next Monday, July 29th. Thanks! |
In `CommandLines`, the very first argument of the first command line is always a path to an executable. As such, it should be path mapped, even when it is a string. This wasn't the case for `SpawnAction`'s created via `ctx.actions.run(executable = <some string>)`. Work towards bazelbuild#6526 Work towards bazelbuild#22366 Closes bazelbuild#22844. PiperOrigin-RevId: 656258007 Change-Id: Ia046a7cc66aae51aec764e2f1c49e1d4f69e4b37 Closes bazelbuild#23040
In `CommandLines`, the very first argument of the first command line is always a path to an executable. As such, it should be path mapped, even when it is a string. This wasn't the case for `SpawnAction`'s created via `ctx.actions.run(executable = <some string>)`. Work towards bazelbuild#6526 Work towards bazelbuild#22366 Closes bazelbuild#22844. PiperOrigin-RevId: 656258007 Change-Id: Ia046a7cc66aae51aec764e2f1c49e1d4f69e4b37 Closes bazelbuild#23040
In `CommandLines`, the very first argument of the first command line is always a path to an executable. As such, it should be path mapped, even when it is a string. This wasn't the case for `SpawnAction`'s created via `ctx.actions.run(executable = <some string>)`. Work towards #6526 Work towards #22366 Closes #22844. PiperOrigin-RevId: 656258007 Change-Id: Ia046a7cc66aae51aec764e2f1c49e1d4f69e4b37 Closes #23040
In
CommandLines
, the very first argument of the first command line is always a path to an executable. As such, it should be path mapped, even when it is a string. This wasn't the case forSpawnAction
's created viactx.actions.run(executable = <some string>)
.Work towards #6526
Work towards #22366