bitter-ability-32190
11/04/2022, 1:49 PMper_platform
object 👀
It's usage right now is scoped to asset's sources field, specifically for http_source
objects:
file(
source=per_platform(
linux_x86_64=http_source(...),
linux_arm64=http_source(...),
)
)
⚠️ One warning (also in the docstring) ⚠️
This SHOULD NOT be used today for the source
field for a source file. Otherwise we'd (implicitly through dep inference) have platform-dependent dependency graphs, which the engine doesn't support. (It technically could, and maybe will, for targets WITHOUT a dependency field, but the blanket statement is a very fair warning)resource
to fix https://github.com/pantsbuild/pants/issues/16900 IFF the new successor doesn't have a dependencies field (which idk maybe desirable?).