2288 Commits

Author SHA1 Message Date
Patrick Linnane
992b50a413
various: fix minor typos
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2024-05-13 14:30:06 -07:00
Mike McQuaid
50384591c7
extend/kernel: add sigs to opoo/onoe/ofail
Add these and correctly pass through a string to
`GitHub::Actions.puts_annotation_if_env_set`.

Also, fix some call sites to not rely on the `void` return.
2024-05-10 14:12:19 +01:00
Mike McQuaid
16901a674f
extend/kernel: make opoo/odie/etc. print GitHub Actions notes.
We already do this for deprecations but these may make warnings
and errors from Homebrew easier to spot in GitHub Actions logs.

While we're here, cleanup other cases that should have used
`GitHub::Actions::Annotation` but didn't and provide some helpers and
tweaks there necessary for our use case here.
2024-05-09 14:43:53 +01:00
apainintheneck
37cbfc40bf Fix internal formula json v3 frozen hash parsing bug
This caused formulae with uses from macos bounds to not load correctly
because they tried to modify a frozen hash. It wasn't obvious from
the tests because I didn't replicate the real world JSON parsing
conditions closely enough. I also had to modify `Cachable#clear_cache`
so that it can clear frozen hashes.

Error:
```
Error: can't modify frozen Hash: {"since"=>"catalina"}
Warning: Removed Sorbet lines from backtrace!
Rerun with `--verbose` to see the original backtrace
/usr/local/Homebrew/Library/Homebrew/extend/hash/keys.rb:123:in `delete'
/usr/local/Homebrew/Library/Homebrew/extend/hash/keys.rb:123:in `block in _deep_transform_keys_in_object!'
/usr/local/Homebrew/Library/Homebrew/extend/hash/keys.rb:122:in `each'
/usr/local/Homebrew/Library/Homebrew/extend/hash/keys.rb:122:in `_deep_transform_keys_in_object!'
/usr/local/Homebrew/Library/Homebrew/extend/hash/keys.rb:48:in `deep_transform_keys!'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:230:in `block (2 levels) in load_formula_from_api'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:218:in `each'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:218:in `block in load_formula_from_api'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:304:in `instance_exec'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:304:in `block (2 levels) in load_formula_from_api'
/usr/local/Homebrew/Library/Homebrew/formula.rb:3664:in `instance_eval'
/usr/local/Homebrew/Library/Homebrew/formula.rb:3664:in `stable'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:293:in `block in load_formula_from_api'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:283:in `initialize'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:283:in `new'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:283:in `load_formula_from_api'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:962:in `load_from_api'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:955:in `klass'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:569:in `get_formula'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:1009:in `factory'
/usr/local/Homebrew/Library/Homebrew/dependency.rb:41:in `to_formula'
/usr/local/Homebrew/Library/Homebrew/utils/autoremove.rb:46:in `block (2 levels) in formulae_with_no_formula_dependents'
/usr/local/Homebrew/Library/Homebrew/utils/autoremove.rb:45:in `each'
/usr/local/Homebrew/Library/Homebrew/utils/autoremove.rb:45:in `block in formulae_with_no_formula_dependents'
/usr/local/Homebrew/Library/Homebrew/utils/autoremove.rb:39:in `each'
/usr/local/Homebrew/Library/Homebrew/utils/autoremove.rb:39:in `formulae_with_no_formula_dependents'
/usr/local/Homebrew/Library/Homebrew/utils/autoremove.rb:59:in `unused_formulae_with_no_formula_dependents'
/usr/local/Homebrew/Library/Homebrew/utils/autoremove.rb:16:in `removable_formulae'
/usr/local/Homebrew/Library/Homebrew/cleanup.rb:693:in `autoremove'
/usr/local/Homebrew/Library/Homebrew/cleanup.rb:291:in `clean!'
/usr/local/Homebrew/Library/Homebrew/cmd/cleanup.rb:52:in `run'
/usr/local/Homebrew/Library/Homebrew/brew.rb:92:in `<main>'
```
2024-05-01 21:36:37 -07:00
Markus Reiter
480e264d9a
Lint Ruby docs. 2024-05-01 11:35:21 +02:00
Markus Reiter
caf87c0336
Warn about undocumented non-private APIs. 2024-05-01 11:35:20 +02:00
Markus Reiter
f7361c8d29
Remove disabled extend. 2024-04-30 11:01:12 +02:00
Markus Reiter
0b56d0be4a
Document Tab.for_keg and use Keg#tab where possible. 2024-04-28 20:50:13 +02:00
Markus Reiter
0f0055ede4
Make documentation @api private by default. 2024-04-26 19:04:20 +02:00
Mike McQuaid
af31d36295
Merge pull request #17156 from reitermarkus/unused-method
Remove unused private method.
2024-04-26 15:03:32 +01:00
Markus Reiter
7c8c75aa37
Remove unused method. 2024-04-26 12:34:50 +02:00
Carlo Cabrera
e3e927f688
Merge pull request #17104 from Homebrew/llvm-library-paths
extend/ENV/super: avoid adding `llvm` to `HOMEBREW_LIBRARY_PATHS`
2024-04-24 17:16:10 +08:00
Markus Reiter
5e636174e8
Explicitly mark non-public APIs. 2024-04-23 19:10:45 +02:00
Markus Reiter
4b432c7ea4
Explicitly mark non-private APIs. 2024-04-22 21:16:49 +02:00
William Woodruff
0f0dee42b4
ensure_executable!: add opt_bin path to search
Signed-off-by: William Woodruff <william@yossarian.net>
2024-04-18 11:11:26 -07:00
Carlo Cabrera
4f31a3e8df
extend/ENV/super: avoid adding llvm to HOMEBREW_LIBRARY_PATHS
This leads to undesired linkage with LLVM's `libunwind` (because it
shadows the system's `libunwind`).

See, for example, Homebrew/homebrew-core#169354.
2024-04-18 23:15:47 +08:00
Mike McQuaid
8baed211a7
brew style --fix 2024-04-08 19:23:33 +01:00
Douglas Eichelberger
057f561d2c Port Homebrew::Cmd::Readall 2024-04-01 10:05:02 -07:00
Bo Anderson
28a80a6ebf
Avoid writable_real? 2024-03-27 06:26:32 +00:00
Michael Cho
f432a7f401
formula_cellar_checks: fix type from #16946
Signed-off-by: Michael Cho <michael@michaelcho.dev>
2024-03-25 15:55:37 -04:00
Michael Cho
e31a2b8ed7
formula_cellar_checks: add more types
Signed-off-by: Michael Cho <michael@michaelcho.dev>
2024-03-24 19:46:57 -04:00
Douglas Eichelberger
084f63ef22 Port Homebrew::DevCmd::UpdateTest 2024-03-22 09:33:28 -07:00
Douglas Eichelberger
ee0c967ce0 Port Homebrew::DevCmd::Bottle 2024-03-20 10:16:17 -07:00
Douglas Eichelberger
9f63674125 Include .rbi shims in yard docs 2024-03-17 20:53:58 -07:00
Mike McQuaid
f086138043
Fix GitHub Actions annotation format.
Co-authored-by: Bo Anderson <mail@boanderson.me>
2024-03-14 14:09:11 +00:00
Mike McQuaid
dcaa69a2dc
Add GitHub Actions warning/error annotations for deprecations/disables.
This should make these messages, particular warnings, more obvious to
GitHub Actions users.

There's an argument perhaps we should do this more broadly for all
warning/error messages but: this feels like a good start.
2024-03-14 09:49:12 +00:00
Bo Anderson
c8214fd1ce
Merge pull request #16860 from Homebrew/reproducible-builds
Reproducible builds for native compiled binaries
2024-03-13 03:55:38 +00:00
Bo Anderson
5582849ae7
Reproducible builds for native compiled binaries 2024-03-11 16:06:55 +00:00
Michael Cho
2d884981c2
cleaner: add types
Signed-off-by: Michael Cho <michael@michaelcho.dev>
2024-03-11 11:46:23 -04:00
Mike McQuaid
99e0b69262
Merge pull request #16852 from gliptak/xcode1
Emit more specific error text on outdated Xcode
2024-03-08 08:38:14 +00:00
Mike McQuaid
de73522b5a
os/Mac/diagnostic: include Xcode path and version. 2024-03-08 08:24:45 +00:00
Gábor Lipták
05acfaba33 Emit more specific error text on outdated Xcode
Signed-off-by: Gábor Lipták <gliptak@gmail.com>
2024-03-07 16:24:08 -05:00
Mike McQuaid
ea2892f8ee
brew.rb: handle missing args. 2024-03-07 16:20:20 +00:00
apainintheneck
e9a05d896a cachable: make #overwrite_cache! private 2024-02-27 20:55:16 -08:00
apainintheneck
d64de40e52 Update api code to load internal JSON v3 file 2024-02-27 20:55:16 -08:00
Bo Anderson
1d7101d8a3
Use HOMEBREW_TEMP more universally 2024-02-26 16:58:53 +00:00
Issy Long
f4218a6316
Fix RuboCop Performance/MapCompact offenses
- Rename an iterator variable since it would make the line too long.
2024-02-25 22:59:59 +00:00
Bo Anderson
58874de60b
Generalise internal cross-image handling 2024-02-22 17:25:20 +00:00
Mike McQuaid
aa925598ee
Merge pull request #16699 from dduugg/modern-rspec
Modernize RSpec configuration
2024-02-19 16:56:53 +00:00
Mike McQuaid
412852bd5f
Apply suggestions from code review
Co-authored-by: Markus Reiter <me@reitermark.us>
2024-02-19 14:05:12 +00:00
Douglas Eichelberger
d6b3f5031a
Enable and fix warnings 2024-02-19 13:57:27 +00:00
Douglas Eichelberger
8a71570a6b brew style --fix 2024-02-18 15:47:56 -08:00
Douglas Eichelberger
aab04229d1 Code review fixes 2024-02-11 20:27:39 -08:00
Douglas Eichelberger
5b5cfe89de Resolve violations from removing hidden.rbi 2024-02-11 20:27:38 -08:00
Douglas Eichelberger
eb7c3e52a0 Require SystemInclude only where needed 2024-01-31 11:42:01 -08:00
Douglas Eichelberger
3a27cac7df
Merge pull request #16510 from dduugg/inverse-include-exclude-cop
Vendor remaining Rails cops, remove ActiveSupport
2024-01-30 11:59:10 -08:00
Douglas Eichelberger
e00d066d87 Replace Time refinement with Timer Util 2024-01-29 18:50:12 -08:00
Douglas Eichelberger
6472aca1a6 Prefer endless methods 2024-01-26 15:03:59 -08:00
Douglas Eichelberger
8c832e0905 Remove some fixed FIXMEs 2024-01-26 12:00:13 -08:00
Douglas Eichelberger
e574904cb7 Use each_with_object 2024-01-22 10:52:43 -08:00