pantsbuild / pants

The Pants Build System
https://www.pantsbuild.org
Apache License 2.0
3.26k stars 625 forks source link

Deprecate pex_binary.platforms in favor of complete_platforms #19978

Open benjyw opened 11 months ago

benjyw commented 11 months ago

The platforms field is a legacy hack: it specifies abbreviated platform strings that elide the full marker environment and compatibility tag information, causing spurious resolve errors. This leads to neverending user issues and support requests.

To remedy this we should:

We probably also want to tackle #15234 to remove one unnecessary hoop to specifying complete_platforms, but it's not a blocker.

huonw commented 6 months ago

There's at least one more place that is semi-equivalent to platforms: the FaaS target's runtime value will be converted to a platforms argument if there's no matching built-in complete_platforms.

https://github.com/pantsbuild/pants/blob/2e5c50511f809aa3c007bb54924277c3b0348f64/src/python/pants/backend/python/util_rules/faas.py#L400-L403

(https://github.com/pantsbuild/pants/issues/20515 is potentially related, although not yet confirmed.)