Remove calls to resolve_tools - #2446
Conversation
Replace them mostly with `FilesToRunProvider`s. For cc_wrapper, where repl's also need the runfiles, use a struct that has the executable, the `FilesToRunProvider` and the runfiles. The executable could be retrieved from the `FilesToRunProvider`, but it is more convenient to just have it in the struct. FilesToRunProvider also makes sure that when passed as a tool, all the necessary runfiles are available for that tool. Use this for protoc and cc_wrapper. cc_wrapper cannot rely on the RUNFILES_* environment variables. Pass cc_wrapper either its path or the path to its manifest directly. Make sure that we correctly pass around env variables at various points so that tools we depend are in the `PATH` and have the environment they expect. Remove outdated comment about re-enabling resolve_tools for bazel 8
|
Making a duplicate to compare the CI situation with forked PR vs local PR. |
|
An important note: Things still work with these changes, but the way that they work is subtly different. Before, all of the runfiles were aggregated together as the runfiles of whatever tool was being executed. Now, each tool lives next to its own runfiles and possibly its own runfiles manifest. This shows up with Another thing to note is Once you get the approach, almost all of the PR is easy to follow:
|
Replace them mostly with
FilesToRunProviders. For cc_wrapper, where repl's also need the runfiles, use a struct that has the executable, theFilesToRunProviderand the runfiles. The executable could be retrieved from theFilesToRunProvider, but it is more convenient to just have it in the struct.FilesToRunProvider also makes sure that when passed as a tool, all the necessary runfiles are available for that tool. Use this for protoc and cc_wrapper.
cc_wrapper cannot rely on the RUNFILES_* environment variables. Pass cc_wrapper either its path or the path to its manifest directly.
Make sure that we correctly pass around env variables at various points so that tools we depend are in the
PATHand have the environment they expect.Remove outdated comment about re-enabling resolve_tools for bazel 8