https://pantsbuild.org/ logo
#general
Title
# general
f

famous-xylophone-36532

02/14/2023, 11:54 AM
Possible to specify platforms for all
pex_binary
targets in the project in
pants.toml
?
r

refined-addition-53644

02/14/2023, 12:20 PM
I don’t know about any option inside
pants.toml
but I think you can use
___defaults___
to achieve this. This you need to set in some top level BUILD file so that all the target defined under/at it use this default value
Copy code
__defaults__({
      (pex_binary, pex_binaries): dict(platforms=["platform1", ""platform2""], description="All supported platforms")
    })
https://www.pantsbuild.org/docs/targets#field-default-values By the way, this is bit tricky with platforms, you need to do this using
complete_platforms
. You might want to read this thread https://pantsbuild.slack.com/archives/C046T6T9U/p1670366698746769
πŸ™Œ 1
f

famous-xylophone-36532

02/14/2023, 12:57 PM
Oh thanks! Good read. Looks like this workflow will be improved exponentially by running the steps in containers. That's for sure!
r

refined-addition-53644

02/14/2023, 12:58 PM
Yeah that's the idea behind
docker_environment
which has been introduced in 2.15.
πŸ™Œ 1
f

famous-xylophone-36532

02/14/2023, 1:00 PM
Amazing!
r

refined-addition-53644

02/14/2023, 1:00 PM
f

famous-xylophone-36532

02/14/2023, 1:26 PM
This is really cool dude. Pants are back on for our project!
πŸŽ‰ 1
6 Views