<https://github.com/pantsbuild/pants/pull/17334> g...
# development
b
https://github.com/pantsbuild/pants/pull/17334 got a makeover and is now a PR adding a
per_platform
object 👀 It's usage right now is scoped to asset's sources field, specifically for
http_source
objects:
Copy code
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)
@hundreds-father-404 (and @witty-crayon-22786) I think we could technically use this for the successor to
resource
to fix https://github.com/pantsbuild/pants/issues/16900 IFF the new successor doesn't have a dependencies field (which idk maybe desirable?).