Mike McQuaid
b70884a474
Merge pull request #16848 from Homebrew/rubocop_default_hash_syntax
...
rubocop: default hash syntax.
2024-03-08 07:55:33 +00:00
apainintheneck
e0cea903ec
s/to_api_hash/to_internal_api_hash/
2024-03-07 20:29:58 -08:00
apainintheneck
12d5a40262
dev-cmd/generate-cask-api: start generating cask internal JSON v3
...
This adds a new file to the output of `brew generate-cask-api` which
represents the new internal JSON v3 file. It involves removing
a bunch of unneeded hash keys while removing blank ones as well.
I've made some slight changes to the cask loader as well but more
might be necessary before this starts loading things correctly.
The full loader code will be added in a separate PR.
2024-03-07 20:29:58 -08:00
Mike McQuaid
ea2892f8ee
brew.rb: handle missing args.
2024-03-07 16:20:20 +00:00
Mike McQuaid
3654c1ad2c
Merge pull request #16844 from reitermarkus/tap-clear-all-caches
...
Actually clear all tap caches.
2024-03-07 15:36:25 +00:00
Markus Reiter
47ff0b76c8
Actually clear all tap caches.
2024-03-07 15:43:16 +01:00
Markus Reiter
be9c0b8787
Simplify TapConfig
.
2024-03-07 15:31:37 +01:00
Michael Cho
12d1e56ff5
dev-cmd/bump: skip autobump formulae & casks
...
Instead output a message that corresponding formula/cask is on the
autobump list. This avoids deferring the information to the error
message within `bump-{formula,cask}-pr`.
Signed-off-by: Michael Cho <michael@michaelcho.dev>
2024-03-06 12:34:29 -05:00
Mike McQuaid
3ea74ea417
Merge pull request #16835 from reitermarkus/tap-config-private
...
Don't store tap config when value is unknown.
2024-03-06 15:33:54 +00:00
Mike McQuaid
026ca68c5c
Merge pull request #16834 from reitermarkus/tap-new-private
...
Make `Tap::new` private.
2024-03-06 15:33:25 +00:00
Markus Reiter
c7f4e006f4
Don't store tap config when value is unknown.
2024-03-06 15:18:52 +01:00
Markus Reiter
e3a102efd4
Make Tap::new
private.
2024-03-06 15:10:14 +01:00
Markus Reiter
a851bb86ef
Add type signature for Tap::fetch
.
2024-03-06 14:30:17 +01:00
Kevin
a86094d794
Merge pull request #16808 from reitermarkus/tap-sig-alias-table
...
Simplify `Tap#alias_table`.
2024-03-04 21:33:07 -08:00
Mike McQuaid
a9f655b515
Merge pull request #16811 from reitermarkus/tapconfig-sig
...
Add type signatures for `TapConfig`.
2024-03-04 16:27:15 +00:00
Markus Reiter
00d69284e4
Add type signatures for TapConfig
.
2024-03-04 17:14:02 +01:00
Markus Reiter
1a13097a86
Actually cache Tap#pypi_formula_mappings
.
2024-03-04 16:57:39 +01:00
Markus Reiter
34af31a05d
Actually cache Tap#style_exceptions
.
2024-03-04 16:51:38 +01:00
Markus Reiter
9e8acb6312
Actually cache Tap#audit_exceptions
.
2024-03-04 16:51:35 +01:00
Markus Reiter
890bec6515
Simplify Tap#alias_reverse_table
.
2024-03-04 16:49:33 +01:00
Markus Reiter
0592f7ac07
Simplify Tap#alias_table
.
2024-03-04 16:47:48 +01:00
Mike McQuaid
8d4e841965
Merge pull request #16778 from reitermarkus/tap-sig-4
...
Simplify `Tap#custom_remote?`.
2024-03-04 14:42:52 +00:00
Markus Reiter
abc591e702
Simplify Tap#custom_remote?
.
2024-03-04 14:30:06 +01:00
Markus Reiter
b4167f97d6
Simplify Tap#remote_repo
.
2024-03-04 14:27:55 +01:00
Michael Cho
72f8399110
formula_auditor: move out synced_versions_formulae logic
...
* tap: take ownership of synced_versions_formulae.json
* formula: add synced_with_other_formulae? logic
Signed-off-by: Michael Cho <michael@michaelcho.dev>
2024-03-03 20:51:09 -05:00
apainintheneck
fb055f7aaf
tap: revert caching Tap.reverse_tap_migrations_renames
...
This could cause problems if a tap is installed during the lifetime
of the program which happens occasionally with `Tap#ensure_installed!`.
It also seems to be slow mainly because of intermediate arrays and
Pathname objects that get created in `Tap.each`. Maybe that should
be optimized instead.
2024-03-02 11:31:04 -08:00
apainintheneck
2da1c93df7
tap: memoize Tap.reverse_tap_migrations_renames
...
This should be a relatively small hash but it gets recalculated
every time we call Cask#oldnames or Formula#oldnames which ends
up being a lot if you run certain commands with --eval-all.
For example, when running the following, it took 10% of the total
runtime.
```
brew deps --casks --eval-all
```
2024-03-01 20:14:42 -08:00
apainintheneck
99d5200db3
tap: fix performance regression in *_files_by_name
...
We essentially stopped caching these accidentally and they get
called every time we try to load a cask or formula from the API.
It gets really, really, really slow.
I ran `brew deps --casks --eval-all` before and after the changes.
I let it run for 3 minutes before killing it. No output had been
printed to the screen.
It finished printing all output (pages and pages of it) in less
than a minute.
---
This should match the caching behavior we had before the
recent changes in these two PRs.
- https://github.com/Homebrew/brew/pull/16777
- https://github.com/Homebrew/brew/pull/16775
2024-03-01 19:30:53 -08:00
Ruoyu Zhong
38b671d8bb
Merge pull request #16750 from iMichka/autobump
...
bump-formula|cask-pr: do not allow to bump autobumped packages
2024-03-02 00:33:06 +08:00
Mike McQuaid
387332ab68
Merge pull request #16782 from reitermarkus/tap-sig-5
...
Rename `Tap#reverse_cask_renames` to `Tap#cask_reverse_renames`.
2024-03-01 15:41:39 +00:00
Mike McQuaid
6c6c418dff
Merge pull request #16785 from reitermarkus/tap-sig-remote
...
Actually return `super` in `CoreTap#remote`.
2024-03-01 13:46:39 +00:00
Mike McQuaid
56b3982e7a
Merge pull request #16784 from reitermarkus/tap-sig-7
...
Add signature for `Tap#config`.
2024-03-01 13:46:20 +00:00
Markus Reiter
567ea44c99
Actually return super
in CoreTap#remote
.
2024-03-01 13:22:03 +01:00
Markus Reiter
0966d2cd8f
Add signature for Tap#config
.
2024-03-01 13:16:56 +01:00
Markus Reiter
01133769ba
Clear cache for Tap#formula_reverse_renames
.
2024-03-01 12:58:05 +01:00
Markus Reiter
c3c5437c4f
Rename Tap#reverse_cask_renames
to Tap#cask_reverse_renames
.
2024-03-01 12:57:37 +01:00
Michka Popoff
f96290eb39
bump-formula|cask-pr: do not allow to bump autobumped packages
...
Avoids:
- Bumping stuff by mistake that will get autobumped anyway
- Abusing the system to get "free" commits
2024-03-01 09:15:43 +00:00
Mike McQuaid
f1eea64523
Merge pull request #16779 from reitermarkus/fix-load-from-path
...
Fix loading casks/formulae from relative paths.
2024-03-01 08:47:41 +00:00
Mike McQuaid
0e1c1e3435
Merge pull request #16777 from reitermarkus/tap-sig-3
...
Simplify `Tap#formula_files_by_name`.
2024-03-01 08:41:33 +00:00
Markus Reiter
3da0f8c4a6
Fix loading casks/formulae from relative paths.
2024-03-01 04:05:15 +01:00
Markus Reiter
2a78eba1ad
Simplify Tap#formula_files_by_name
.
2024-02-29 22:48:50 +01:00
Markus Reiter
755c8aecad
Simplify Tap#cask_files_by_name
.
2024-02-29 22:47:43 +01:00
Mike McQuaid
8a846fb1c2
Merge pull request #16766 from reitermarkus/tap-installed
...
Only show installed taps in `brew tap` output.
2024-02-29 10:35:19 +00:00
Markus Reiter
e08e873921
Only show installed taps in brew tap
output.
2024-02-28 20:18:55 +01:00
apainintheneck
bfe5e43ff4
api/formula: Fix failing specs
...
- clear the formula API cache
- make the API cache directory
- fix stubbed return values (thanks Sorbet!)
2024-02-27 20:55:16 -08:00
apainintheneck
cefd3273cc
tap: Add helper to generate core formula API hash
...
This abstracts away this helper to make it easier to test and
reason about.
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
Markus Reiter
132a87aff5
Rename Tap#repo_var
to Tap#repo_var_suffix
.
2024-02-23 16:02:29 +01:00
Markus Reiter
ab27efbd9d
Make Tap::each
respect the API.
2024-02-22 17:56:47 +01:00
Mike McQuaid
89fd6964f9
Merge pull request #16715 from reitermarkus/tap-ensure-installed
...
Clean up `Tap#ensure_installed!` usage.
2024-02-22 08:47:48 +00:00