Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate running on macOS 12 (and 13, for arm64) (#21569)
This PR sets up infrastructure for deprecating running Pants on macOS versions, as they go out of support, and uses it to deprecate: - macOS 12 (x86-64, and arm64) - macOS 13 (arm64) Thus, after this PR, Pants supports running on macOS 13 or newer on x86-64, and macOS 14 or newer on arm64. (Why different? Github provides macOS 14 arm64 runners, but not macOS 13.) The infrastructure is general (rather than specific like #21326), anticipating deprecating one macOS version a year. For instance, we'll need to deprecate support for macOS 13 (on x86-64) as it approaches end-of-life in the middle of 2025. From https://en.wikipedia.org/wiki/MacOS#Timeline_of_releases, it seems like Apple supports operating systems for about 3 years, e.g. GA macOS 12 was released October 2021, and the final release was July 2024. The new `[GLOBAL].allow_deprecated_macos_versions` option is an allow-list of versions that are permitted, rather than a plain boolean, to ensure new deprecations are still visible. For instance, I think that someone who's opted-in to running on macOS 12 (`allow_deprecated_macos_versions = ["12"]`) should still get new alerts when they upgrade Pants to a version where macOS 13 is deprecated, when running on macOS 13, and similarly if they run on macOS 11 without realising it. ## Broader discussion/macOS platform support Pants currently explicitly supports running on versions of macOS that are not maintained, and is built on such systems (e.g. we have a self-hosted arm64 runner with macOS 11). macOS 12 recently reached end-of-life, and Github is phasing out its (free) hosted runners in December 2024 (https://github.blog/changelog/2024-08-19-notice-of-upcoming-deprecations-and-breaking-changes-in-github-actions-runners/, #21333). There's a desire to reduce Pantsbuild's costs, since it's now volunteer driven project, so using free runners is much better than relying on self-hosted ones (both direct money costs to pay for the machines, and volunteer time to maintain the machines). To achieve this, we'll need to stick closer to what Github supports, which seems to be close to what Apple supports. Thus, by deprecating macOS 12 in Pants 2.24.x, we can limit ourselves to macOS 13+ in 2.25+, and reduce how long we need to keep macOS 12 machines around. (That is, as soon as we close off the 2.24.x release series, we can jettison any macOS 12 machines.) That is, under the process being implied here, we'll end up with something like for macOS version support: | Pants series | x86-64, not deprecated | x86-64, supported-but-deprecated | arm64, not deprecated | arm64, supported-but-deprecated | |------------------|------------------------|----------------------------------|-----------------------|---------------------------------| | 2.22.x | macOS 10.15 | - | macOS 11 | - | | 2.23.x (#21326) | 12 | 10.15, 11 | 12 | 11 | | 2.24.x (this PR) | 13 | 12 | 14 | 12, 13 | | 2.25.x | 13 | - | 14 | - | | ... | | | | | | 2.A.x (mid 2025) | 14 | 13 | 14 | - | | 2.(A+1).x | 14 | - | 14 | - | | ... | | | | | | 2.B.x (mid 2026) | 15 | 14 | 15 | 14 | | 2.(B+1).x | 15 | - | 15 | - | Note: this may be too annoying for our users: it's a pain if a build tool has restrictive system support. I note that, for example, Rust supports 10.15+ (x86-64) and 11.0+ (arm64): https://doc.rust-lang.org/nightly/rustc/platform-support/apple-darwin.html Fixes #21333
- Loading branch information