Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macos_version: add KERNEL_MAJOR_VERSIONS map #18674

Merged
merged 2 commits into from
Oct 31, 2024
Merged

Conversation

carlocab
Copy link
Member

@carlocab carlocab commented Oct 30, 2024

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

This will be used by llvm (and, presumably, in the future, versioned
LLVM formulae). The idea is that we will write a config file for each OS
version pointing to the correct SDKROOT so that llvm does not require
rebuilding/reinstalling when a user upgrades to a new major version of
macOS.

See Homebrew/homebrew-core#196094.

This will be used by `llvm` (and, presumably, in the future, versioned
LLVM formulae). The idea is that we will write a config file for each OS
version pointing to the correct SDKROOT so that `llvm` does not require
rebuilding/reinstalling when a user upgrades to a new major version of
macOS.

See Homebrew/homebrew-core#196094.
@Bo98
Copy link
Member

Bo98 commented Oct 30, 2024

Looks good but maybe we probably should expose the API as a function wrapping this constant as it's easier to deprecate etc.

We can probably make it calculated to be honest:

if version.major == 10
  version.minor + 4
else
  version.major + 9
end

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, thanks @carlocab!

@carlocab carlocab force-pushed the kernel-major-versions branch 2 times, most recently from 0dc64a5 to fd7e783 Compare October 31, 2024 07:05
@carlocab
Copy link
Member Author

Looks good but maybe we probably should expose the API as a function wrapping this constant as it's easier to deprecate etc.

We can probably make it calculated to be honest:

if version.major == 10
  version.minor + 4
else
  version.major + 9
end

Cool, done in 42dd0ac.

@carlocab carlocab merged commit a7548f0 into master Oct 31, 2024
27 checks passed
@carlocab carlocab deleted the kernel-major-versions branch October 31, 2024 07:34
Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @carlocab!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants