787 Commits

Author SHA1 Message Date
Rylan Polster
73b64390b3
Use existing Utils::Bottles::Collector#specification_for method 2025-06-05 12:38:15 -04:00
Patrick Linnane
2c9b094bea
os/mac/diagnostic: set OCLP Support Tiers
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2025-04-12 17:03:54 -07:00
Mike McQuaid
d899f00c4b
Link to Support Tiers in diagnostic/error messages
Now that we have this nice URL let's reference it to allow our other
messages to be a bit shorter/kinder.
2025-04-01 11:35:27 +01:00
Douglas Eichelberger
39843b5d40
Resolve violations 2025-03-13 12:16:11 -07:00
Sean Molenaar
ab2b18f78c feat: add os_version for casks 2025-03-05 20:12:18 +01:00
botantony
68f8798821
zig std args: apply -fno-rosetta on macs with arm 2025-02-21 19:10:41 +01:00
botantony
c5d78f3347
zig std args: use symbols for compilation options 2025-02-21 17:07:29 +01:00
botantony
bfdfdc9489
-fno-rosetta flag 2025-02-21 16:49:11 +01:00
Douglas Eichelberger
8763fb6d29 Resolve rubocop violations 2025-02-17 18:56:31 -08:00
Sean Molenaar
27a2d94c48 feat: allow zap on linux 2025-02-17 14:30:44 +01:00
Sean Molenaar
975fe8a83f feat: allow cask binaries on linux 2025-02-17 14:30:43 +01:00
Sean Molenaar
c34b71655c feat: allow font install on linux
Apply suggestions from code review

Co-authored-by: Douglas Eichelberger <697964+dduugg@users.noreply.github.com>

feat: add linux appdir

Apply suggestions from code review

Co-authored-by: Douglas Eichelberger <697964+dduugg@users.noreply.github.com>
2025-01-19 11:14:24 +01:00
Issy Long
6ada9a9665
Add clarifying comments to rubocop:disables
- Needed for PR 18842 that adds a `DisableComment` RuboCop to ensure that all RuboCop disables have comments.
2025-01-12 16:59:07 +00:00
Ruoyu Zhong
64edbe6b79
os/mac/hardware/cpu: add M4 Pro/Max
Sources:
- https://github.com/AsahiLinux/docs/wiki/Codenames
- MacOSX15.2.sdk from Xcode 15.2 RC
2024-12-06 16:06:09 +08:00
Kiracus
c7b49d5cad cpu.rb: add Apple M4 2024-11-16 09:28:44 -08:00
Eric Knibbe
e52943d8d6
os/mac/diagnostic: fix case of OpenCore check 2024-11-13 12:23:34 -05:00
Ruoyu Zhong
d0418add45
os/mac/diagnostic: improve OpenCore check
This is based on [1].

[1]: https://github.com/Homebrew/brew/pull/18765#issuecomment-2474056438
2024-11-14 00:55:49 +08:00
Ruoyu Zhong
a525ce0ad8
Apply suggestions from code review
Co-authored-by: Eric Knibbe <enk3@outlook.com>
2024-11-13 23:43:24 +08:00
Ruoyu Zhong
13265ca170
os/mac/diagnostic: skip OpenCore check in CI 2024-11-13 23:11:16 +08:00
Ruoyu Zhong
dee399c27d
os/mac/diagnostic: display OpenCore version 2024-11-13 23:01:29 +08:00
Ruoyu Zhong
854fc16889
os/mac/diagnostic: fix OpenCore check
Fixes #18763.
2024-11-13 22:48:51 +08:00
Carlo Cabrera
2c20e3b8de
os/mac/diagnostic: check for OpenCore
This configuration is not supported. Let's make `brew doctor` complain
about it.
2024-11-13 09:43:16 +08:00
Bo Anderson
b34e6ee20e
Merge pull request #18638 from Homebrew/keg_relocate-type-fix
keg_relocate: fix error when dylib_id doesn't need changing
2024-10-26 06:45:57 +01:00
Bo Anderson
28f19878e3
keg_relocate: fix error when dylib_id doesn't need changing 2024-10-26 06:31:05 +01:00
Bo Anderson
529eadd6cc
os/mac/keg_relocate: don't change Swift stdlib dylib IDs 2024-10-25 20:55:21 +01:00
Douglas Eichelberger
ed4129b580 Remove removable constants 2024-10-07 19:45:48 -07:00
Douglas Eichelberger
8033fcf4a6 Fix brew style docs 2024-10-07 18:59:27 -07:00
Douglas Eichelberger
2d16333bbc Replace removable constants with overridable methods 2024-10-07 18:33:03 -07:00
Douglas Eichelberger
d3d25beb35 Use requires_ancestor consistently 2024-10-06 09:25:57 -07:00
Douglas Eichelberger
0855d7c9e0 Revert ENV changes 2024-10-05 12:35:28 -07:00
Douglas Eichelberger
f4a6dce64a Fix ENV 2024-10-05 12:18:29 -07:00
Douglas Eichelberger
0d5b56aa6a Fix tests 2024-10-05 12:18:29 -07:00
Douglas Eichelberger
eed660e784 Move remaining OS extensions to prepend 2024-10-05 12:18:29 -07:00
Bo Anderson
567f5eb4be
Allow sockets to use longer paths on macOS 2024-09-27 04:37:03 +01:00
Mike McQuaid
eab322946a
formula: fix alias/generic/prepend std_cmake_args issue.
Seen in:
https://github.com/Homebrew/homebrew-core/pull/191090#issuecomment-2363215204

There's a missing signature issue here due to the `generic_*` aliasing
we're doing. With prepend, though: this is no longer needed and we can
use `super` instead which is more idiomatic and nicer overall.

This pattern should probably be applied in other places but: let's try
this targetting fix for here first.
2024-09-20 13:01:42 +01:00
Douglas Eichelberger
125ced9cf8 Fix formatting 2024-09-19 10:58:53 -07:00
Douglas Eichelberger
61985bc7f3 Use top-level OS instead 2024-09-19 10:58:53 -07:00
Douglas Eichelberger
bb80f063dc Fix namespacing 2024-09-19 10:58:53 -07:00
Douglas Eichelberger
27e951c408 Replace undef with prepended modules 2024-09-19 10:58:53 -07:00
Michael Cho
99d81b4717
ENV/super: replace m4 shim with M4 variable
The problem is the shim can end up getting baked into formula binaries
(e.g. `flex`) or cause odd issues when mixed up with brew `m4`, e.g.
https://github.com/Homebrew/homebrew-core/issues/180040
2024-09-11 11:33:44 -04:00
Mike McQuaid
dc9618457d
Improve brew doctor output on prerelease macOS
- Avoid near duplicate messages
- Provide correct CLT download instructions

Before:
```
$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Your Command Line Tools are too outdated.
Update them from Software Update in System Settings.

If that doesn't show you any updates, run:
  sudo rm -rf /Library/Developer/CommandLineTools
  sudo xcode-select --install

Alternatively, manually download them from:
  https://developer.apple.com/download/all/.
You should download the Command Line Tools for Xcode 16.0.

Warning: A newer Command Line Tools release is available.
Update them from Software Update in System Settings.

If that doesn't show you any updates, run:
  sudo rm -rf /Library/Developer/CommandLineTools
  sudo xcode-select --install

Alternatively, manually download them from:
  https://developer.apple.com/download/all/.
You should download the Command Line Tools for Xcode 16.0.

Warning: Your Xcode (15.4) at /Applications/Xcode.app is too outdated.
Please update to Xcode 16.0 (or delete it).
Xcode can be updated from:
  https://developer.apple.com/download/all/

Warning: Your Xcode (15.4) is outdated.
Please update to Xcode 16.0 (or delete it).
Xcode can be updated from:
  https://developer.apple.com/download/all/

If 16.0 is installed, you may need to:
  sudo xcode-select --switch /Applications/Xcode.app
Current developer directory is:
  /Applications/Xcode.app/Contents/Developer

```

After:
```console
$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Your Command Line Tools are too outdated.
Install the Command Line Tools for Xcode 16 from:
  https://developer.apple.com/download/all/

Warning: Your Xcode (15.4) at /Applications/Xcode.app is too outdated.
Please update to Xcode 16.0 (or delete it).
Xcode can be updated from:
  https://developer.apple.com/download/all/

```
2024-09-06 17:38:25 +01:00
Bo Anderson
98fb5f9dea
Don't assume ENV is a superenv in RBI 2024-08-23 05:59:00 +01:00
Douglas Eichelberger
df2fcfdfb0 Add missing sigs 2024-08-15 09:21:43 -07:00
Douglas Eichelberger
70b072a7d0 Suppress sorbet type errors when using `undef' 2024-08-15 08:03:45 -07:00
Issy Long
45978435e7
rubocop: Use Sorbet/StrictSigil as it's better than comments
- Previously I thought that comments were fine to discourage people from
  wasting their time trying to bump things that used `undef` that Sorbet
  didn't support. But RuboCop is better at this since it'll complain if
  the comments are unnecessary.

- Suggested in https://github.com/Homebrew/brew/pull/18018#issuecomment-2283369501.

- I've gone for a mixture of `rubocop:disable` for the files that can't
  be `typed: strict` (use of undef, required before everything else, etc)
  and `rubocop:todo` for everything else that should be tried to make
  strictly typed. There's no functional difference between the two as
  `rubocop:todo` is `rubocop:disable` with a different name.

- And I entirely disabled the cop for the docs/ directory since
  `typed: strict` isn't going to gain us anything for some Markdown
  linting config files.

- This means that now it's easier to track what needs to be done rather
  than relying on checklists of files in our big Sorbet issue:

```shell
$ git grep 'typed: true # rubocop:todo Sorbet/StrictSigil' | wc -l
    268
```

- And this is confirmed working for new files:

```shell
$ git status
On branch use-rubocop-for-sorbet-strict-sigils
Untracked files:
  (use "git add <file>..." to include in what will be committed)
        Library/Homebrew/bad.rb
        Library/Homebrew/good.rb

nothing added to commit but untracked files present (use "git add" to track)

$ brew style
Offenses:

bad.rb:1:1: C: Sorbet/StrictSigil: Sorbet sigil should be at least strict got true.
^^^^^^^^^^^^^

1340 files inspected, 1 offense detected
```
2024-08-12 15:24:27 +01:00
Issy Long
c62ee6be6c
extend/os/mac/utils/bottles: Bump to Sorbet typed: strict 2024-08-10 00:21:13 +01:00
Issy Long
0e81efcccb
sorbet: Comment more files that can't be strict because of undef
- Found with
  `grep -rL "# typed: strict" Library/Homebrew | xargs grep -l "undef "`.
- This stops people from trying to bump them and
  getting an error that they can't fix because
  [it's a Sorbet limitation](https://sorbet.org/docs/error-reference#3008),
  wasting contributor time.
2024-08-09 18:23:00 +01:00
Michael Cho
0477944e71
shims/super/cc: pass -ld_classic if needed for -dead_strip_dylibs 2024-08-03 14:46:18 -04:00
Issy Long
9c6430954b
All the extract_to_dirs return void now 2024-07-11 11:05:47 +01:00
Kevin
c3c1528611
Revert "Use cp -c when copying files" 2024-06-17 21:17:10 -07:00