Remove deprecated pex_binary(platforms=...) for 2.22, deprecate resolve_local_platforms#20823
Remove deprecated pex_binary(platforms=...) for 2.22, deprecate resolve_local_platforms#20823
pex_binary(platforms=...) for 2.22, deprecate resolve_local_platforms#20823Conversation
9eaed5a to
cd0764f
Compare
resolve_local_platformspex_binary(platforms=...) for 2.22, deprecate resolve_local_platforms
|
|
||
| class PexResolveLocalPlatformsField(TriBoolField): | ||
| alias = "resolve_local_platforms" | ||
| removal_version = "2.24.0.dev0" |
There was a problem hiding this comment.
The Pex --resolve-local-platforms option applies to both --platform and --complete-platform foreign targets despite what the CLI help says (--resolve-local-platforms existed before --complete-platform was introduced and I failed to update the help). Since --platform went away but --complete-platform did not, --resolve-local-platforms can still be useful. In fact Pants uses it internally for FAAS:
pants/src/python/pants/backend/python/util_rules/faas.py
Lines 506 to 508 in 8760750
There was a problem hiding this comment.
Example useful case here: altana-ai/repro-pants-debugger-issue#1
There was a problem hiding this comment.
Thank you for identifying this and for letting me know!
(I've filed #22247 so we don't forget)
This field was deprecated in #20012, released in 2.19. We've now branched for 2.21 and thus
mainis prepping for 2.22. So, the deprecation has expired!In that PR, there was discussion about working out whether this should remain for longer. This has been deprecated for several releases now, and it's being removed early in the 2.22 release cycle: if someone comments, we can reinstate/reconsider.
Also, as part of this, I noticed the
resolve_local_platformsfield and option now seem to be meaningless: the underlyingpex --resolve-local-platformsfield is documented asWhen --platforms are specified, .... Thus, this deprecates that field and the global option for 2.24.