310 Commits

Author SHA1 Message Date
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
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
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
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
Bo Anderson
5582849ae7
Reproducible builds for native compiled binaries 2024-03-11 16:06:55 +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
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
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
f504b92c45
Preliminary macOS 14 (Sonoma) support 2023-06-05 23:21:11 +01:00
Markus Reiter
8274920217
Rename OS::Mac::Version to MacOSVersion. 2023-05-09 05:08:38 +02:00
Douglas Eichelberger
24cf6076e8 brew style --fix 2023-04-24 20:42:39 -07:00
Douglas Eichelberger
7fdd75ad41 brew style --fix 2023-04-17 11:00:55 -07:00
Douglas Eichelberger
09c679e75f Refactor module_function to reduce rbi need 2023-04-17 10:37:59 -07:00
Ruoyu Zhong
f5d414e365
os/mac/xcode: fix Clang version for Xcode 14.3
The one shown on the Wikipedia [^1] seems to be wrong. I can confirm
the actual version locally.

[^1]: https://en.wikipedia.org/wiki/Xcode#Xcode_11.0_-_14.x_(since_SwiftUI_framework)_2
2023-04-11 22:27:37 +08:00
Bo Anderson
5c55cd78fd
os/mac/xcode: update for Xcode 14.3 2023-04-11 02:50:44 +01:00
Ruoyu Zhong
e9ce4a5a4e
Update path to system settings on Ventura
"System Preferences" has been renamed to "System Settings" on Ventura.
Privacy and security settings have moved, too. This commit makes sure
these changes are reflected. (Some adjustments were already made in
#14092.)

Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com>
2023-03-17 19:24:07 +08:00
Issy Long
3e7a46f474
rubocop: Drop "v" from Naming/MethodParameterName allowlist
- This was an easy fix, "v" => "version".
2023-03-08 14:40:55 +00:00
Bo Anderson
a99323e5a6
os/mac/xcode: do not recommend softwareupdate CLI 2022-10-30 18:16:08 +00:00
Aryeh Hillman
51643d0ef0
Suggest --verbose for softwareupdate --all ...
Gives information about what is being updated, downloaded, etc. Else the updater is quite silent and it's hard to tell what's going on and when it will complete.

Example with the `--verbose` flag:

```
% softwareupdate --all --install --force --verbose

Software Update Tool

Finding available software
Downloading macOS Ventura 13.0
Password: 
Downloading: 65.02%
```

This feature is documented via `--help`; i.e.:

```
% softwareupdate --help
usage: softwareupdate <cmd> [<args> ...]

** Manage Updates:
	-l | --list		List all appropriate update labels (options:  --no-scan, --product-types)
	-d | --download		Download Only
	-i | --install		Install
		<label> ...	specific updates
		-a | --all		All appropriate updates
		-R | --restart		Automatically restart (or shut down) if required to complete installation.
		-r | --recommended	Only recommended updates
		     --os-only	Only OS updates
		     --safari-only	Only Safari updates
		     --stdinpass	Password to authenticate as an owner. Apple Silicon only.
		     --user	Local username to authenticate as an owner. Apple Silicon only.
	--list-full-installers		List the available macOS Installers
	--fetch-full-installer		Install the latest recommended macOS Installer
		--full-installer-version	The version of macOS to install. Ex: --full-installer-version 10.15
	--install-rosetta	Install Rosetta 2
	--background		Trigger a background scan and update operation

** Other Tools:
	--dump-state		Log the internal state of the SU daemon to /var/log/install.log
	--evaluate-products	Evaluate a list of product keys specified by the --products option 
	--history		Show the install history.  By default, only displays updates installed by softwareupdate.  

** Options:
	--no-scan		Do not scan when listing or installing updates (use available updates previously scanned)
	--product-types <type>		Limit a scan to a particular product type only - ignoring all others
		Ex:  --product-types macOS  || --product-types macOS,Safari 
	--products		A comma-separated (no spaces) list of product keys to operate on. 
	--force			Force an operation to complete.  Use with --background to trigger a background scan regardless of "Automatically check" pref 
	--agree-to-license		Agree to the software license agreement without user interaction.

	--verbose		Enable verbose output
	--help			Print this help
```
2022-10-22 16:09:52 -07:00
Bo Anderson
c092708448
Ventura RC version bumps 2022-10-20 20:04:42 +01:00
Bo Anderson
cd6b81b28d
os/mac/xcode: require Xcode 14.1 on Ventura 2022-10-07 19:28:35 +01:00
Bo Anderson
75e76361ac
Preliminary macOS 13 support 2022-06-07 02:39:36 +01:00
Bo Anderson
d857c8416d
os/mac: allow fake El Capitan setup for Portable Ruby builds 2022-05-31 17:56:25 +01:00
Mike McQuaid
1bb44979ee
Disable and delete code for 3.5.0
The next planned release will be 3.5.0 so let's fix things up for there.
2022-05-30 14:59:14 +01:00
Imre Horvath
60f33370b3
Fix detect_clang_version version extraction
The previous implementation was depending on a fix number of version number segments. Apple has introduced one more tag for the latest CLT version 13.4, which broke the check, leading to a false warning. With this rewritten regex we have a more robust version detection.
2022-05-27 11:18:11 +02:00
Bo Anderson
01d3dac43d
os/mac/xcode: support Xcode 13.4 2022-05-26 18:11:29 +01:00
Bo Anderson
51a5776071
os/mac/xcode: fix latest Xcode on Big Sur 2022-03-24 15:09:30 +00:00
Bo Anderson
8a10284baf
os/mac/xcode: support Xcode 13.3 2022-03-23 23:35:06 +00:00
Bo Anderson
f78a3ccb65
os/mac/xcode: support Xcode 13.2.1 2022-02-07 04:28:01 +00:00
Bo Anderson
404850600f
os/mac/xcode: update latest Xcode to 13.1 on Big Sur 2021-11-08 15:36:54 +00:00
Bo Anderson
5d670728f1
os/mac/xcode: require Xcode 13.1 on Monterey 2021-10-19 16:56:06 +01:00
Carlo Cabrera
bcc3cd7819
os/mac/xcode: update download url
Closes #12174.
2021-10-04 22:22:20 +08:00
fn ⌃ ⌥
bad19b88cd development_tools: update type signatures 2021-09-29 18:16:34 -07:00
fn ⌃ ⌥
9638e3e8c0 development_tools: update type signatures 2021-09-29 17:44:26 -07:00
fn ⌃ ⌥
61a7ffb999 development_tools: add type signatures 2021-09-29 15:12:53 -07:00
Bo Anderson
1be5ed836e
os/mac/xcode: support Xcode 13 2021-09-28 02:24:18 +01:00
Bo Anderson
49f789d492
os/mac/xcode: bump minimum CLT version to 12.5 2021-08-11 14:19:22 +01:00
Sam Ford
0752d25125
OS::Mac: Move version methods into ::Version 2021-06-23 09:03:46 -04:00
Francois-Xavier Coudert
8eb03a951f Updates for Monterey Xcode & CLT 2021-06-09 16:21:46 +02:00
Lorenzo Gatti
c564019a91 debug info now includes CLT version 2021-05-18 16:19:31 +02:00
Lorenzo Gatti
5a24b6aff3 minor changes to the wording 2021-05-17 17:28:58 +02:00