bazelbuild / rules_apple

Bazel rules to build apps for Apple platforms.
Apache License 2.0
512 stars 269 forks source link

Remove `ctx.resolve_tools` in favor of `ctx.actions.run(executable = …)` and `ctx.actions.run(tools = ...)`. #2438

Closed tjgq closed 7 months ago

tjgq commented 7 months ago

By passing the files_to_run for a tool into the executable or tools argument to ctx.actions.run or ctx.actions.run_shell, it's no longer necessary to pass the return values of ctx.resolve_tools into the inputs and input_manifests arguments.

Each struct field of the AppleMacToolsToolchainInfo and AppleXPlatToolsToolchainInfo providers previously populated with the return values of ctx.resolve_tools is now populated with the files_to_run for the respective tool.

The resolved_ prefix is removed from field and variable names; in addition to it no longer making sense, this change provides proof that all usages have been audited.

This lets us retire the ctx.resolve_tools API in a future Bazel version.

luispadron commented 7 months ago

We should list this as a breaking change in the releases i think, it broke some downstream rules since the AppleMacToolchainInfo provider fields have changed (and some of the resource action arguments)

brentleyjones commented 7 months ago

That's not public API, right? I think we are free to modify that without any mention.

luispadron commented 7 months ago

Yeah you're right. Thought it was in providers.bzl but doesn't look like it