This provides a >3x speedup for `brew tap` with no arguments (i.e., when
listing taps). It also makes the completion significantly faster.
$ hyperfine --warmup=3 --setup 'git checkout {branch}' --parameter-list branch master,brew-tap-speedup 'brew tap'
Benchmark 1: brew tap (branch = master)
Time (mean ± σ): 1.405 s ± 0.080 s [User: 0.561 s, System: 0.238 s]
Range (min … max): 1.332 s … 1.549 s 10 runs
Benchmark 2: brew tap (branch = brew-tap-speedup)
Time (mean ± σ): 404.1 ms ± 124.8 ms [User: 107.9 ms, System: 200.7 ms]
Range (min … max): 308.8 ms … 693.7 ms 10 runs
Summary
brew tap (branch = brew-tap-speedup) ran
3.48 ± 1.09 times faster than brew tap (branch = master)
If you have `HOMEBREW_TEMP` set to a longer path (e.g. the user's
private temporary directory rather than `/private/tmp`), Sequoia will
error out on some tests when forking because the path is too long
(> 104 bytes).
To improve this situation let's:
- use a shorter path for `HOMEBREW_TEMP` by appending `/brew-tests` to
the existing `HOMEBREW_TEMP` used outside of tests rather than
creating nested temporary directories
- use the minimal amount of randomness to avoid collisions while
allowing parallel tests
- use `squeeze` to remove any double slashes in the temporary path
Currently, `brew link` installs `*.info` files to
`#{HOMEBREW_PREFIX}/share/info/dir` using the `install_info` method.
However, some formulae (e.g., `Emacs`) also ship `*.info.gz` files,
which are only `symlink`ed but not installed.
This commit allows `*.info.gz` files to be installed during linking in
addition to the `*.info` files.
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.
Currently, we silently ignore cases where a formula previously had an
`:all` bottle but now no longer does.
These are most often due to (in order of likelihood):
- bottle reproducibility breakage in `brew`
- new hard-coded `/usr/local` references in text files in a bottle
The former is a bug that should be fixed, while the latter can be fixed
trivally with an `inreplace`.
Let's try to make sure we always do this by making `brew bottle` error
out so that we can catch these instances as they happen rather than
after the fact.
I haven't encountered any cases where a formula previously had an `:all`
bottle but no longer does for reasons other than the two outlined above.
If we do encouter those in the future, we can either:
- update `brew bottle` to skip this check, perhaps with a new flag
- delete the formula's old `:all` bottle before doing `brew bottle` so
it doesn't error