3424 Commits

Author SHA1 Message Date
Mike McQuaid
c5dbd3ca24
Rearrange requires
This improves the load time of most brew commands. For an example of
one of the simplest commands this speeds up:

Without Bootsnap:
```
$ hyperfine 'git checkout master; brew help' 'git checkout optimise_requires; brew help'
Benchmark 1: git checkout master; brew help
  Time (mean ± σ):     525.0 ms ±  35.8 ms    [User: 229.9 ms, System: 113.1 ms]
  Range (min … max):   465.3 ms … 576.6 ms    10 runs

Benchmark 2: git checkout optimise_requires; brew help
  Time (mean ± σ):     383.3 ms ±  25.1 ms    [User: 133.0 ms, System: 72.1 ms]
  Range (min … max):   353.0 ms … 443.6 ms    10 runs

Summary
  git checkout optimise_requires; brew help ran
    1.37 ± 0.13 times faster than git checkout master; brew help
```

With Bootsnap:
```
$ hyperfine 'git checkout master; brew help' 'git checkout optimise_requires; brew help'
Benchmark 1: git checkout master; brew help
  Time (mean ± σ):     386.0 ms ±  30.9 ms    [User: 130.2 ms, System: 93.8 ms]
  Range (min … max):   359.5 ms … 469.3 ms    10 runs

Benchmark 2: git checkout optimise_requires; brew help
  Time (mean ± σ):     330.2 ms ±  32.4 ms    [User: 93.4 ms, System: 73.0 ms]
  Range (min … max):   302.9 ms … 413.9 ms    10 runs

Summary
  git checkout optimise_requires; brew help ran
    1.17 ± 0.15 times faster than git checkout master; brew help
```
2024-07-14 08:49:39 -04:00
Mike McQuaid
f39b5c1426
Merge pull request #17554 from Homebrew/cask-install-receipt 2024-07-13 10:55:06 -04:00
Mike McQuaid
7b66004d2c
Merge pull request #17655 from Homebrew/fix-bump-formula-pr-types-for-kwargs 2024-07-08 19:07:04 +01:00
Issy Long
517d3c9bcf
dev-cmd/bump-formula-pr: Fix types for fetch_resource_and_forced_version
- This should fix https://github.com/Homebrew/homebrew-core/actions/runs/9839505520, that is:

```
Parameter 'tag': Expected type Float, got type String with value "2024-07-05"
Caller: /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11473/lib/types/private/methods/call_validation.rb:215
Definition: /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/bump-formula-pr.rb:445 (Homebrew::DevCmd::BumpFormulaPr#fetch_resource_and_forced_version)
```

- I think I read https://sorbet.org/docs/sigs#rest-parameters too literally,
  yes Sorbet expands the kwargs into a hash type, but it's the value type that
  needs specifying in the sig (which for us is `String`).
2024-07-08 18:46:21 +01:00
Ilya Kulakov
1a6f6f0c5e
Update Library/Homebrew/dev-cmd/extract.rb
Co-authored-by: Ruoyu Zhong <zhongruoyu@outlook.com>
2024-07-06 10:57:51 -07:00
Ilya Kulakov
a1f9f501e2 extract: Fix missing '--git-revision' in the usage banner 2024-07-05 17:27:22 -07:00
Issy Long
58fb8afa2f
dev-cmd/bump-formula-pr: formula_version is Version not String
- Fixes https://github.com/Homebrew/brew/issues/17626.
2024-07-04 17:52:38 +01:00
Issy Long
f6e093a076
Remove unnecessary comment
- `T.let` is necessary in this case in strict mode.

Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2024-07-04 13:45:42 +01:00
Issy Long
f2f4f1c06d
sorbet: Tighten up dev-cmd types
- Change `returns(NilClass)` to `void`.
- Get rid of some of the `T.untyped`.
2024-07-04 12:04:29 +01:00
Mike McQuaid
21ba72b190
Merge pull request #17621 from Homebrew/actually-use-spoom-in-ci 2024-07-04 08:38:10 +01:00
Mike McQuaid
a934713992
dev-cmd/typecheck: improve indentation. 2024-07-04 08:28:24 +01:00
Mike McQuaid
e7b9a732b4
dev-cmd/typecheck: improve exit code handling. 2024-07-04 08:27:21 +01:00
Mike McQuaid
0fda9cb85e
Merge pull request #17622 from Kentzo/extract-log-version 2024-07-04 08:26:00 +01:00
Mike McQuaid
3773940382
Merge pull request #17606 from Homebrew/sorbet-strict-devcmd 2024-07-04 08:25:40 +01:00
Rylan Polster
acd60181c2
Add cask install receipts 2024-07-04 01:47:13 -04:00
Ilya Kulakov
0b4839b397 extract: Log formula version
When extracting based on --git-revision the version of the formula is
not known to the user upfront.
2024-07-03 16:41:31 -07:00
Issy Long
79ab11c62d
dev-cmd/typecheck: Stop dry running Spoom sigil bumps
- Sixteen months ago in PR 14921, I made it so that CI ran
  `brew typecheck --update --suggest-typed` and could commit the changes.
- Except it never actually ever made any changes because of the `--dry` option
  in the Spoom CLI args. Whoops!
2024-07-03 22:35:04 +00:00
Issy Long
4b83521061
dev_cmd/irb: Straight away require "formula"
- Otherwise we get: `uninitialized constant String::Formula (NameError)```
2024-07-03 20:39:36 +01:00
Issy Long
b6f142f7a9
Fewer T.musts 2024-07-03 19:53:37 +01:00
Issy Long
9baf50af29
Get rid of even more T.musts
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2024-07-03 15:04:18 +01:00
Issy Long
3d09094df0
Fewer T.musts 2024-07-02 16:20:39 +01:00
Issy Long
1db0834a91
dev-cmd/bottle: The cellar_parameter_needed? method returns always boolean 2024-07-02 11:21:29 +01:00
Issy Long
b9b065a54e
dev-cmd/bottle: Fix type errors (strings, symbols, either, none) thanks to the tests 2024-07-02 00:03:28 +01:00
Issy Long
9130dd1210
dev-cmd/contributions: Tighten up type sigs 2024-07-01 23:49:31 +01:00
Issy Long
3b695c6aa2
dev-cmd/bottle: Bump to Sorbet typed: strict 2024-07-01 23:38:26 +01:00
Issy Long
8360218a3e
Run brew style on all the new Sorbet sigs 2024-07-01 19:16:57 +01:00
Issy Long
f854a9f3fc
dev-cmd/audit: Bump to Sorbet typed: strict 2024-07-01 19:11:17 +01:00
Issy Long
9e0a749231
dev-cmd/extract: Can't be typed: strict because of undef usage 2024-07-01 18:40:12 +01:00
Issy Long
b1817391a8
dev-cmd/pr-pull: Bump to Sorbet typed: strict 2024-07-01 18:07:47 +01:00
Issy Long
8587f4ba11
dev-cmd/bump-formula-pr: Bump to Sorbet typed: strict 2024-07-01 13:14:47 +01:00
Issy Long
6b995ad111
dev-cmd/pr-upload: Bump to Sorbet typed: strict 2024-06-30 20:58:10 +01:00
Issy Long
d5af469e85
dev-cmd/tests: Bump to Sorbet typed: strict 2024-06-30 20:41:02 +01:00
Issy Long
0837f7c23c
dev-cmd/test: Bump to Sorbet typed: strict 2024-06-30 19:30:35 +01:00
Issy Long
3bf6a01516
dev-cmd/generate-formula-api: Bump to Sorbet typed: strict 2024-06-30 19:29:22 +01:00
Issy Long
944790acfe
dev-cmd/generate-cask-api: Bump to Sorbet typed: strict 2024-06-30 19:27:35 +01:00
Issy Long
3b28e90556
dev-cmd/tap-new: Bump to Sorbet typed: strict 2024-06-30 19:25:19 +01:00
Issy Long
69cf1df56f
dev-cmd/livecheck: Bump to Sorbet typed: strict 2024-06-30 19:23:26 +01:00
Issy Long
57ba22053f
dev-cmd/update-sponsors: Bump to Sorbet typed: strict 2024-06-30 19:10:38 +01:00
Issy Long
1b517a9d49
dev-cmd/irb: Bump to Sorbet typed: strict 2024-06-30 19:07:38 +01:00
Issy Long
c57cd4bf98
dev-cmd/contributions: Bump to Sorbet typed: strict 2024-06-30 18:42:16 +01:00
Issy Long
34caeb7ea8
dev-cmd/unbottled: Bump to Sorbet typed: strict 2024-06-30 17:49:27 +01:00
Ilya Kulakov
be48b47d91 extract: Add the --git-revision argument
When pinning formula alongside its dependencies it's important to limit
the search scope.
2024-06-28 17:45:35 -07:00
Alexander Bayandin
b24997242b dev-cmd/tap-new: update cache key 2024-06-22 20:55:13 +01:00
Alexander Bayandin
e44e645cec dev-cmd/tap-new: add macos-14 2024-06-22 17:47:24 +01:00
Eric Knibbe
b8dc576647
dev-cmd/extract: trim version to only digits/decimals for class & file names
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2024-06-20 08:15:36 -04:00
Mike McQuaid
64b86fe25c
bottle/github_packages: include path_exec_files.
`all_files` is added to the bottle JSON but not actually used by
`GitHubPackages` yet.
2024-06-19 21:49:31 +02:00
Patrick Linnane
8e089b2fd2
Revert "bottle/github_packages: include path_exec_files, all_files." 2024-06-18 09:59:27 -07:00
Mike McQuaid
0fa8e80a8f
Merge pull request #17518 from Homebrew/revert-17517-revert-17507-path_exec_files 2024-06-18 16:41:52 +02:00
Bo Anderson
1e7cf514eb
utils/gems: handle mismatching EUID and UID for bundle installs 2024-06-18 14:42:45 +01:00
Mike McQuaid
6b8b4d3f26
bottle/github_packages: include path_exec_files, all_files. 2024-06-16 09:35:33 +02:00