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

dev-cmd: disable when broken on Apple Silicon. #10375

Merged
merged 1 commit into from
Jan 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions Library/Homebrew/dev-cmd/install-bundler-gems.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,18 @@ def install_bundler_gems_args
Homebrew::CLI::Parser.new do
description <<~EOS
Install Homebrew's Bundler gems.
Not (yet) working on Apple Silicon.
EOS

named_args :none
end
end

def install_bundler_gems
# TODO: update description above if removing this.
raise UsageError, "not (yet) working on Apple Silicon!" if Hardware::CPU.arm?
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we can allow this command but block the commands we know don't work? Using the system ruby, install-bundler-gems does install gems, it's just that some don't work.


install_bundler_gems_args.parse

Homebrew.install_bundler_gems!
Expand Down
5 changes: 5 additions & 0 deletions Library/Homebrew/dev-cmd/man.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ def man_args
Homebrew::CLI::Parser.new do
description <<~EOS
Generate Homebrew's manpages.

Not (yet) working on Apple Silicon.
EOS
switch "--fail-if-changed",
description: "Return a failing status code if changes are detected in the manpage outputs. This "\
Expand All @@ -32,6 +34,9 @@ def man_args
end

def man
# TODO: update description above if removing this.
raise UsageError, "not (yet) working on Apple Silicon!" if Hardware::CPU.arm?

args = man_args.parse

Commands.rebuild_internal_commands_completion_list
Expand Down
7 changes: 7 additions & 0 deletions Library/Homebrew/dev-cmd/typecheck.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ def typecheck_args
Homebrew::CLI::Parser.new do
description <<~EOS
Check for typechecking errors using Sorbet.

Not (yet) working on Apple Silicon.
EOS
switch "--fix",
description: "Automatically fix type errors."
Expand Down Expand Up @@ -42,6 +44,11 @@ def typecheck_args

sig { void }
def typecheck
# TODO: update description above if removing this.
if Hardware::CPU.arm? || Hardware::CPU.in_rosetta2?
raise UsageError, "not (yet) working on Apple Silicon or Rosetta 2!"
end

args = typecheck_args.parse

Homebrew.install_bundler_gems!
Expand Down
6 changes: 6 additions & 0 deletions docs/Manpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,8 @@ Display the path where *`formula`* is located.

Install Homebrew's Bundler gems.

Not (yet) working on Apple Silicon.

### `irb` [*`--examples`*] [*`--pry`*]

Enter the interactive Homebrew Ruby shell.
Expand Down Expand Up @@ -1092,6 +1094,8 @@ casks to check is taken from `HOMEBREW_LIVECHECK_WATCHLIST` or

Generate Homebrew's manpages.

Not (yet) working on Apple Silicon.

* `--fail-if-changed`:
Return a failing status code if changes are detected in the manpage outputs. This can be used to notify CI when the manpages are out of date. Additionally, the date used in new manpages will match those in the existing manpages (to allow comparison without factoring in the date).

Expand Down Expand Up @@ -1322,6 +1326,8 @@ Run Homebrew's unit and integration tests.

Check for typechecking errors using Sorbet.

Not (yet) working on Apple Silicon.

* `--fix`:
Automatically fix type errors.
* `-q`, `--quiet`:
Expand Down
9 changes: 9 additions & 0 deletions manpages/brew.1
Original file line number Diff line number Diff line change
Expand Up @@ -1434,6 +1434,9 @@ Display the path where \fIformula\fR is located\.
.SS "\fBinstall\-bundler\-gems\fR"
Install Homebrew\'s Bundler gems\.
.
.P
Not (yet) working on Apple Silicon\.
.
.SS "\fBirb\fR [\fI\-\-examples\fR] [\fI\-\-pry\fR]"
Enter the interactive Homebrew Ruby shell\.
.
Expand Down Expand Up @@ -1505,6 +1508,9 @@ Only check casks\.
.SS "\fBman\fR [\fI\-\-fail\-if\-changed\fR]"
Generate Homebrew\'s manpages\.
.
.P
Not (yet) working on Apple Silicon\.
.
.TP
\fB\-\-fail\-if\-changed\fR
Return a failing status code if changes are detected in the manpage outputs\. This can be used to notify CI when the manpages are out of date\. Additionally, the date used in new manpages will match those in the existing manpages (to allow comparison without factoring in the date)\.
Expand Down Expand Up @@ -1822,6 +1828,9 @@ Randomise tests with the specified \fIvalue\fR instead of a random seed\.
.SS "\fBtypecheck\fR, \fBtc\fR [\fIoptions\fR]"
Check for typechecking errors using Sorbet\.
.
.P
Not (yet) working on Apple Silicon\.
.
.TP
\fB\-\-fix\fR
Automatically fix type errors\.
Expand Down