-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
Utils::Bottles::tag: ARM tag is arm64_big_sur #7942
Conversation
The canonical name of ARM64 is AArch64. See https://en.wikipedia.org/wiki/AArch64
For reference, the bottle tags on Linux are
|
Yes I do |
Just so we know what Apple call it: |
Line 122 in b9e2b82
On Intel $ uname -p
i386
$ uname -m
x86_64
$ brew ruby -e 'p ENV["HOMEBREW_PROCESSOR"]'
"Intel" On ARM $ uname -p
arm
$ uname -m
arm64
$ brew ruby -e 'p ENV["HOMEBREW_PROCESSOR"]'
arm Should |
I’d prefer |
Line 122 in b9e2b82
I feel like this line should be changed to -HOMEBREW_PROCESSOR="$(uname -p)"
+HOMEBREW_PROCESSOR="$(uname -m)" and |
I think standardizing on |
|
But I really like this bikeshed to be purple, cmon. |
|
In light of what @Bo98 wrote, I’d rather leave We may want a separate environment variable for "$(uname -m)". Alternatively, how about we derive the tag from |
Sorry, we're all sold out of purple. 💜 😉 |
If it's done for Linux as well as macOS that'd change the bottle tag prefix Our naming is a bit inconsistent and crazy making now that I've jumped down this rabbit hole. 🕳️🐇 |
I'd like to change |
I don’t know semantics nor purpose of
Oh I see. So that’s not what we want, either. |
I wouldn't be against this - but I'd make sure the user-agent still uses |
I'm -0 on this. It's not a major objection but I'd be concerned about the possibility of subtle bugs emerging, and I'm not sure if the benefits would outweight the potential of digging up weird bugs for awhile. |
if Hardware::CPU.intel? | ||
MacOS.version.to_sym | ||
else | ||
"#{ENV["HOMEBREW_PROCESSOR"]}_#{MacOS.version}".to_sym |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to keep up with the most recent conversation: what does this output on
Apple Silicon, currently? What does it output on Linux-on-ARM?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apple Silicon (on master
):
irb(main):001:0> Utils::Bottles.tag
=> :big_sur_arm
irb(main):002:0> "#{ENV["HOMEBREW_PROCESSOR"]}_#{MacOS.version}".to_sym
=> :"arm_11.0"
Apple Silicon (on this PR branch):
irb(main):001:0> Utils::Bottles.tag
=> :"arm64_11.0"
irb(main):002:0> "#{ENV["HOMEBREW_PROCESSOR"]}_#{MacOS.version}".to_sym
=> :"arm64_11.0"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! In that case:
"#{ENV["HOMEBREW_PROCESSOR"]}_#{MacOS.version}".to_sym | |
"#{ENV["HOMEBREW_PROCESSOR"]}_#{MacOS.version.to_sym}".to_sym |
At least so we're not referring to it as 11.0
(which isn't even a "valid" symbol).
Does Apple refer to it as ARM64 much/at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does Apple refer to it as ARM64 much/at all?
They’re going to great lengths to avoid any mention of ARM in their public-facing copy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that I wonder about using one of the terms they actually use? Can you summarise them at all @claui?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apple Silicon is the brand they use but when they talk about the architecture they use arm64
exclusively. No aarch64
even though it's the same thing.
e.g. https://developer.apple.com/documentation/xcode/porting_your_macos_apps_to_apple_silicon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha. I'd be fine with arm64_big_sur
or apple_silicon_big_sur
.
My reasoning for big_sur_arm
was that we will likely end up having a 11.x where they/we don't support x86_64 any longer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer arm64
over apple_silicon
, because it's what's returned by uname -m
, and it's many characters shorter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ready for re-review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine with me 👍
@claui I forget that I'm modifying |
Utils::Bottles::tag: ARM tag is arm64_big_sur
I've changed this PR to use |
if Hardware::CPU.intel? | ||
MacOS.version.to_sym | ||
else | ||
"#{Hardware::CPU.arch}_#{MacOS.version.to_sym}".to_sym |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the expected string on Apple Silicon now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
brew/Library/Homebrew/hardware.rb
Lines 40 to 42 in 28f4a70
def arch_64_bit | |
if arm? | |
:arm64 |
arm64
😢 The ARM branch of this code isn't tested. Any suggestions? |
That's fine, ignore it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to use |
Good job @sjackman 🍻 |
I’d be ok with leaving as is, given that x86_64 bottles will organically bubble up and go away in a few years. |
brew style
with your changes locally?brew tests
with your changes locally?Consistent with the Linux bottle tags,
aarch64_linux
,armv7_linux
, andx86_64_linux
.See
brew/Library/Homebrew/utils/bottles.rb
Line 9 in d1f6296