Repository navigation
Support macOS 27 (Golden Gate) - #34
Merged
Merged
Conversation
macrtools was hard-broken on macOS 27. is_macos_r_supported() compared against an exclusive upper bound of "27.0", so sw_vers reporting "27.0" returned FALSE and aborted macos_rtools_install(), gfortran_install() and openmp_install(). This is the third occurrence of the same off-by-one: #27 shipped it for Tahoe, #28 fixed it, and the fixed value then went stale one release later. Centralize the window behind minimum_supported_macos_version() and first_unsupported_macos_version(), naming the ceiling for the first version it rejects rather than the newest it accepts, and render the advertised range from that bound via macos_support_range() so the abort and startup messages cannot drift from the check they describe. Add is_macos_golden_gate() for 27.x. Also fix version comparison for .0 releases. sw_vers emits only two components for a .0 release, and compareVersion() ranks a shorter string below an otherwise-equal longer one, so every .0 release landed in the previous release's range: "12.0" read as Big Sur, "11.0" matched no predicate at all, and "10.13" was rejected by an error message that named 10.13 as supported. pad_version() now normalizes both the version and the bounds before comparison. The suite previously passed 136/136 on a macOS 27 machine the package refused to run on, because the upper bound had never been tested. Add boundary, contiguity and .0-form coverage, verified by mutation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem
macrtoolsis hard-broken on macOS 27, not merely missing support for it.is_macos_r_supported()compared against an exclusive upper bound of"27.0", sosw_versreturning27.0evaluated toFALSE:That aborts
macos_rtools_install(),gfortran_install()andopenmp_install().This is the third occurrence of the same off-by-one: #27 shipped it for Tahoe, #28 fixed it, and the fixed value then went stale one release later. The mental model is "the bound is the newest version I support"; the contract is "the bound is the oldest version I reject."
The fix
minimum_supported_macos_version()/first_unsupported_macos_version(), mirroring the R version window from 0.0.7. The ceiling is now named for the first version it rejects.macos_support_range()derives the advertised major from that bound, so the abort and startup messages cannot drift from the check. They were previously two independent literals that had already diverged in wording.is_macos_golden_gate()for[27.0, 28.0).Second bug
sw_versemits only two components for a.0release ("27.0", never"27.0.0"), andcompareVersion()ranks a shorter string below an otherwise-equal longer one. Against the older three-component bounds, every.0release fell into the previous release's range:sw_vers"12.0"is_macos_big_sur"11.0""10.13"The last case produced an error naming 10.13 as supported while refusing it.
pad_version()now normalizes the version and both bounds before comparison.Also corrects the
recipesdocumentation, which said thedarwinrepository is chosen by comparing against the macOS version. It is chosen by comparing against the Darwin kernel version, and the two are no longer a fixed offset apart: Darwin stayed on 25 for macOS 26, then realigned to 27 for macOS 27, skipping 26.