Skip to content

Commit

Permalink
Merge pull request #10375 from MikeMcQuaid/dev-cmd-arm
Browse files Browse the repository at this point in the history
dev-cmd: disable when broken on Apple Silicon.
  • Loading branch information
MikeMcQuaid committed Jan 21, 2021
2 parents e22f5f6 + 3bc31d4 commit 7360880
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 0 deletions.
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?

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

0 comments on commit 7360880

Please sign in to comment.