626 Commits

Author SHA1 Message Date
Patrick Linnane
e63c885033
Support Tahoe, drop Mojave and older
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2025-09-12 10:40:19 -07:00
Mike McQuaid
3023e6dcad
Merge pull request #20660 from botantony/os/mac-typed
os/mac/*: `typed: strict`
2025-09-10 15:36:23 +00:00
botantony
843fc7c97a
os/mac/*: more style corrections
Signed-off-by: botantony <antonsm21@gmail.com>
Co-authored-by: Bo Anderson <mail@boanderson.me>
2025-09-10 16:59:51 +02:00
Bo Anderson
055c87e47e
os/mac: updates for Xcode/macOS 26 RC 2025-09-10 03:39:46 +01:00
botantony
bc2c12c742
os/mac/*: style corrections
Signed-off-by: botantony <antonsm21@gmail.com>
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2025-09-09 18:13:19 +02:00
botantony
0adf85970d
os/mac/xcode: typed: strict
Signed-off-by: botantony <antonsm21@gmail.com>
2025-09-09 15:28:53 +02:00
botantony
28761d8756
os/mac/sdk: typed: strict
Signed-off-by: botantony <antonsm21@gmail.com>
2025-09-09 15:28:53 +02:00
botantony
289fed93b4
os/mac/mach: typed: strict
Signed-off-by: botantony <antonsm21@gmail.com>
2025-09-09 15:28:53 +02:00
botantony
744e2452d8
os/mac/keg: typed: strict
Signed-off-by: botantony <antonsm21@gmail.com>
2025-09-09 15:07:35 +02:00
copilot-swe-agent[bot]
4ee43fbde1
Improve quarantine support error messages with specific CLT guidance
Co-authored-by: MikeMcQuaid <125011+MikeMcQuaid@users.noreply.github.com>
2025-08-13 14:30:05 +01:00
Eric Knibbe
626b6aca2d
RubyDoc output fixes 2025-08-05 17:13:42 -04:00
Mike McQuaid
d57efd9ea2
Improve some Pathname instance variable handling
Will fix or at least partly address:
```
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/os/linux/elf.rb:225: warning: The class Pathname reached 8 shape variations, instance variables accesses will be slower and memory usage increased.
35
It is recommended to define instance variables in a consistent order, for instance by eagerly defining them all in the #initialize method.
```
2025-07-11 08:02:27 +00:00
Bo Anderson
b8e2cddbbd
Preliminary macOS 26 (Tahoe) support 2025-06-09 21:41:49 +01:00
Rylan Polster
da624601bb
os/mac/pkgconfig/15: update expat version 2025-06-04 15:46:41 -04:00
Michael Cho
5722d3dc8f
os/mac/pkgconfig/15: update expat version for 15.2 2024-12-19 12:08:02 -05:00
Michael Cho
252678692f
os/mac/pkgconfig: add bzip2.pc for rust formulae 2024-10-11 14:55:37 -04:00
Douglas Eichelberger
d3d25beb35 Use requires_ancestor consistently 2024-10-06 09:25:57 -07:00
Douglas Eichelberger
eed660e784 Move remaining OS extensions to prepend 2024-10-05 12:18:29 -07:00
Mike McQuaid
94416e82f0
Add new odeprecated, odisabled, remove disabled code.
Prepare the usual deprecation cycle for Homebrew 4.4.0.
2024-09-24 10:15:34 +01:00
Mike McQuaid
d8fd19dde5
Merge pull request #18298 from Homebrew/curl-14.5
os/mac/pkgconfig/14: update libcurl for 14.5 SDK
2024-09-20 12:55:02 +01:00
Bo Anderson
40c6f05a76
os/mac/pkgconfig/14: update libcurl for 14.5 SDK 2024-09-10 00:22:32 +01:00
Bo Anderson
fe1577dabf
os/mac/pkgconfig/15: drop NTLM_WB reference in libcurl 2024-09-10 00:16:15 +01: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
3627cca066
Remove some unnecessary include Kernel 2024-08-20 04:16:18 +01: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
Bo Anderson
7da94a8f01
Preliminary macOS 15 (Sequoia) support 2024-06-11 02:59:31 +01:00
Mike McQuaid
222fe8ef0b
Homebrew 4.3.0 deprecation/disable/removals.
The usual pass of deprecating/disabling/removing code for the next
minor Homebrew release.
2024-05-07 12:18:04 +01:00
Markus Reiter
480e264d9a
Lint Ruby docs. 2024-05-01 11:35:21 +02:00
Markus Reiter
0f0055ede4
Make documentation @api private by default. 2024-04-26 19:04:20 +02:00
Markus Reiter
4b432c7ea4
Explicitly mark non-private APIs. 2024-04-22 21:16:49 +02:00
Douglas Eichelberger
c59d9fa833 Prefer numbered block params over proc conversion, cont'd 2024-04-08 09:47:27 -07:00
Bo Anderson
5582849ae7
Reproducible builds for native compiled binaries 2024-03-11 16:06:55 +00:00
Mike McQuaid
ea2892f8ee
brew.rb: handle missing args. 2024-03-07 16:20:20 +00:00
Douglas Eichelberger
fe439e8320 Apply 'chmod -x' to executables without shebangs 2024-03-06 22:22:49 -08:00
Bo Anderson
58874de60b
Generalise internal cross-image handling 2024-02-22 17:25:20 +00:00
Douglas Eichelberger
eb7c3e52a0 Require SystemInclude only where needed 2024-01-31 11:42:01 -08:00
Issy Long
f682147598
Fix RuboCop Style/RedundantFreeze offenses 2024-01-18 22:20:01 +00:00
Bo Anderson
c51838fa1f os/mac/pkgconfig/14: update for 14.2 2024-01-01 16:33:25 +00:00
Bo Anderson
afe453da28
Merge pull request #16389 from Bo98/xcode-15.1
os/mac/xcode: support Xcode 15.1
2023-12-23 16:46:18 +00:00
Bo Anderson
61a73014d3 os/mac/xcode: support Xcode 15.1 2023-12-23 00:55:50 +00:00
Bo Anderson
04ad24efe8 os/mac/xcode: add fast path for Xcode version detection 2023-12-23 00:49:36 +00:00
Bo Anderson
5692c8ecbf
Fix style violations under newer RuboCop 2023-12-14 05:47:12 +00:00
Bo Anderson
b42256d286
Deprecate, disable & delete code for Homebrew 4.2.0 2023-12-07 23:42:13 +00:00
Rylan Polster
b7532a86e1
Add commented out deprecations for MacOS when simulating Linux 2023-11-22 21:22:00 -05:00
Bo Anderson
cf08039712
os/mac/xcode: remove unnecessary type assertion 2023-09-13 14:26:27 +01:00
Bo Anderson
6d0c424b41
os/mac/pkgconfig: update for macOS 14 RC SDK 2023-09-13 01:47:03 +01:00
Mike McQuaid
9d44d278e4
os/mac/keg: fix change_rpath type signature.
Fixes #15990
2023-09-11 14:57:22 +01:00
Steve Peters
94ef9a4b7a codesign in keg_relocate instead of keg methods
Currently the codesign_patched_binary method may be called many
times for the same file when installing a keg.

This removes the calls to codesign_patched_binary from os/mac/keg
and adds a single call to the relocate_dynamic_linkage and
fix_dynamic_linkage methods in extend/os/mac/keg_relocate
to speed up keg installation.
2023-09-09 18:14:28 -07:00
Carlo Cabrera
93b43ad7a9
os/mac/mach: fix rpath deletion of fat machos
Fixes #15859.
2023-08-14 14:29:05 +08:00
Carlo Cabrera
b5334b818c
os/mac/mach: avoid recursively resolving rpaths
This is just a recipe for infinite loops. Plus, recursive references are
likely to be invalid, so we don't really gain much by attempting to
resolve them.[^1] (But we could if we made the logic here much more
complicated.)

Fixes a CI failure seen at Homebrew/homebrew-core#138323.

[^1]: See, for example, embree/embree#455.
2023-08-05 23:40:22 +08:00