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

TSC Discussion: Default Homebrew flavour on Apple Silicon #9110

Closed
claui opened this issue Nov 11, 2020 · 13 comments
Closed

TSC Discussion: Default Homebrew flavour on Apple Silicon #9110

claui opened this issue Nov 11, 2020 · 13 comments
Labels
discussion Input solicited from others TSC Technical Steering Committee

Comments

@claui
Copy link
Contributor

claui commented Nov 11, 2020

Background

Now that the first retail Apple Silicon Macs are being shipped with an estimated arrival date of 2020-11-17, early adopters are going to install Homebrew. I’d like for the @Homebrew/tsc members to discuss and decide which default flavour the Homebrew installer is supposed to choose when run from a native Apple Silicon shell.

Assumptions

To keep the discussion focused, I propose a few assumptions I’ve harvested from several Slack discussions. I’d like to encourage you to work with those assumptions but feel free to challenge them if you strongly disagree.

My assumptions are:

  1. Every Homebrew installation is going to be associated with either the Intel or ARM architecture, which is decided at install time and unmodifiable. I’ll call that Homebrew’s flavour for the sake of this discussion.
  2. A given Homebrew installation will build formulae, or install bottles, only for the single architecture that matches its flavour. Simply put, Homebrew will refuse to run unless its main process matches its flavour.
  3. A given Homebrew installation will only interact with its own, dedicated Cellar, repositories and taps. Strictly no mixing and matching.
  4. Looking at macOS 11 Big Sur compatibility on Apple Silicon #7857, we’re making great progress but Homebrew is still not nearly production-ready on native Apple Silicon.
  5. People who buy first batches of Apple Silicon Macs should expect any third-party software to work only in Rosetta for weeks or months.
  6. There’s a good chance we’re not going to have neither Intel- nor ARM-based Big Sur bottles ready on day one.

Call for decisions

Given the above assumptions, I’d like for the TSC members to discuss the following decisions:

  • When run on a native Apple Silicon shell, should the Homebrew installation command-line result in the Intel flavour of Homebrew to be installed or the ARM flavour? (Please answer Intel, ARM, or Abstain.)

  • Now assume we’ve decided on the Intel flavour in the previous question. Should the Homebrew installer offer a user-facing command-line switch that allows the user to override that decision and install the experimental ARM flavour of Homebrew? (Please answer 👍, 👎 or Abstain.)

  • Now assume the decision on the previous question to be 👍. Should our instructions on https://docs.brew.sh/Installation mention that command-line switch? (Please answer 👍, 👎 or Abstain.)

Of course, opinions and answers are going to change over time as ARM flavour support matures. Therefore, I’m looking for short-term answers only.
Thanks in advance, fellow maintainers.

Thanks to @SMillerDev for bringing up the question on Slack.
@Homebrew/maintainers: feel free to discuss along.

@claui claui added the discussion Input solicited from others label Nov 11, 2020
@MikeMcQuaid
Copy link
Member

  • People who buy first batches of Apple Silicon Macs should expect any third-party software to work only in Rosetta for weeks or months.

Has there been any testing of Rosetta on Apple Silicon? Does it all Just Work or is there any user-intervention required?

Until we have an answer to that: I'm not sure how we can discuss further.

Locking to restrict discussion to maintainers.

@Homebrew Homebrew locked as resolved and limited conversation to collaborators Nov 11, 2020
@claui
Copy link
Contributor Author

claui commented Nov 11, 2020

Has there been any testing of Rosetta on Apple Silicon?

Yes, briefly. Last time I checked, it worked just fine. There are also several reports in the Homebrew thread on Apple’s restricted Universal Quickstart forum of several people successfully using Homebrew that way, and no complaints so far. For a brief period back in early July, when Homebrew crashed on native Apple Silicon, running Terminal.app in Rosetta became a staple trick that people passed around to make Homebrew running at all.

Does it all Just Work or is there any user-intervention required?

As we change the installer, we’re going to have to build a flavour check into the brew executable so it will later always launch Ruby under the proper architecture.
Until we make that change, users would have to take manual steps to run Terminal.app under Rosetta every single time they use Homebrew.
Not aware of any further issues or required user intervention. But Rosetta hasn’t been our main testing focus so far. We’ve always considered Rosetta to be a temporary stop-gap solution in our discussions so far. @Bo98 @mistydemeo Feel free to chime in with any further insights you have.

Until we have an answer to that: I'm not sure how we can discuss further.

I disagree on that point. I think we can (and should) discuss the matter even with the limited information we have. If we don’t act, people are going to have a mix-and-match Homebrew starting next week. Any decision we make will be a net positive compared to that.

A TSC decision would also help us maintainers focus on which flavour to focus our tests as the first batch arrives. In particular, I’d like to know which flavour to install at /usr/local for the tests we get to do this week.

Locking to restrict discussion to maintainers

I appreciate your help in protecting the discussion. I’m not sure you’re aware that locking the issue disables reactions, which feels rather weird. No one has made an unsolicited comment so far so I think re-enabling reactions would be helpful for the TSC to make their decision and for other participants. We can always re-lock if any unwanted comments appear.

@claui
Copy link
Contributor Author

claui commented Nov 11, 2020

Note: Just got word that Rosetta isn’t enabled by default on retail Apple Silicon Macs. That could be a pretty strong point against forcing the Intel flavour.

Update: We could of course simply ask the user to install Rosetta.

@iMichka
Copy link
Member

iMichka commented Nov 11, 2020

I appreciate your help in protecting the discussion. I’m not sure you’re aware that locking the issue disables reactions, which feels rather weird

From my experience with this kind of thread, it sometimes attracts a bunch of unrelated comments and questions that "pollute" the discussion. I think it is fine to lock the thread for maintainers only. We can discuss things transparently here, without interference from random opinions. I am in favour of discussing parts of the things here instead of our internal Slack channels, which is not visible by the community. Our users can still post and comment to https://github.com/homebrew/discussions/discussions or open a new issue.

Regarding the decisions: I need to read more about the different options and think about it. I can't vote on this right now, because I need to pick up the subject :) So this will need more time on my side.

@claui
Copy link
Contributor Author

claui commented Nov 11, 2020

@iMichka Fair enough. Let’s keep the thread locked, then.

@sjackman
Copy link
Member

  • We currently have no CI or bottles for macOS on ARM.
  • Installing from source is a painful user experience, and results in GitHub issues.
  • Running Homebrew in Rosetta is likely to provide the better user experience for most users for some months.

Note: I am not a member of the TSC, and so cannot vote on a TSC decision. I am a member of the PLC. My opinion follows.

When run on a native Apple Silicon shell, should the Homebrew installation command-line result in the Intel flavour of Homebrew to be installed or the ARM flavour? (Please answer Intel, ARM, or Abstain.)

Intel, until the overwhelming majority of formulae have bottles for ARM

Now assume we’ve decided on the Intel flavour in the previous question. Should the Homebrew installer offer a user-facing command-line switch that allows the user to override that decision and install the experimental ARM flavour of Homebrew? (Please answer 👍, 👎 or Abstain.)

I tend towards 👎 and the user can install Homebrew on native ARM in a different non-/usr/local directory like for example ~/.homebrew using the alternative installation instructions https://docs.brew.sh/Installation#alternative-installs

Now assume the decision on the previous question to be 👍. Should our instructions on https://docs.brew.sh/Installation mention that command-line switch? (Please answer 👍, 👎 or Abstain.)

👍 Instructions to install Homebrew on native ARM should be documented.

@sjackman
Copy link
Member

  • Some formulae that require x86-64 may never work on ARM.
  • We will need to support parallel installations of Homebrew for Rosetta and native ARM for this reason.
  • The Rosetta installation must go in /usr/local/Cellar to make use of x86-64 bottles.
  • That precludes the native ARM installation also going in /usr/local/Cellar, and precludes building ARM bottles for this location.

@MikeMcQuaid
Copy link
Member

I've opened PRs to handle this based on the discussion here and in Slack:

Please review ASAP (if you're interested) as these need to land before Big Sur is released.

@iMichka
Copy link
Member

iMichka commented Nov 12, 2020

Here is my vote and final thoughts:

When run on a native Apple Silicon shell, should the Homebrew installation command-line result in the Intel flavour of Homebrew to be installed or the ARM flavour? (Please answer Intel, ARM, or Abstain.)

-> ARM flavour. No support for that on day one.
-> If they want to install the Intel version they need to switch to a Rosette shell.

The same holds for later bottle installs:
-> If you are in the native ARM shell, you install and use ARM bottles. No support on day one
-> If you are in a Rosetta shell, you install and use Intel bottles

Support for ARM native installs and builds can be enabled by setting HOMEBREW_DEVELOPER, and this as soon as possible, to let people test it.
No need for CI for that, with a clear disclaimer that we provide 0 support for that, and people should open pull requests.

Just to be clear: I took this decision based on the information I had, and I hope I did not misunderstood the situation.

@MikeMcQuaid
Copy link
Member

Support for ARM native installs and builds can be enabled by setting HOMEBREW_DEVELOPER, and this as soon as possible, to let people test it.

Don't even need to set this (but it will shut up various warnings) to test but just need to use one of our documented "alternate installs" (as per any other unsupported installation configurations).

@sjackman
Copy link
Member

When run on a native Apple Silicon shell, should the Homebrew installation command-line result in the Intel flavour of Homebrew to be installed or the ARM flavour? (Please answer Intel, ARM, or Abstain.)

Intel, until the overwhelming majority of formulae have bottles for ARM

I misread this question. Running the installation script on a native ARM Apple Silicon shell should produce an error message, instructing the user to run it in a Rosetta shell. Eventually it would install Homebrew on native ARM, once native ARM is supported by Homebrew with CI and bottles.

@MikeMcQuaid MikeMcQuaid added the TSC Technical Steering Committee label Dec 9, 2020
@sjackman
Copy link
Member

I believe this issue was resolved? PR Homebrew/install#373 once it's merged will permit installing Homebrew on native ARM.

@fxcoudert
Copy link
Member

Yes I think there is a good agreement on how to proceed now… CI is in place, bottles are being built.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
discussion Input solicited from others TSC Technical Steering Committee
Projects
None yet
Development

No branches or pull requests

5 participants