498 Commits

Author SHA1 Message Date
Mike McQuaid
a1f112f3fe
Move o* output methods to Utils::Output
This reduces the surface area of our `Kernel` monkeypatch and removes
the need to `include Kernel` in a bunch of modules.

While we're here, also move `Kernel#require?` to `Homebrew` and fully
scope the calls to it.
2025-08-20 19:20:19 +01:00
copilot-swe-agent[bot]
8b10231085
Fix conflicts_with stanza odeprecated method call issue
Co-authored-by: MikeMcQuaid <125011+MikeMcQuaid@users.noreply.github.com>
2025-08-19 17:07:37 +01:00
Bevan Kay
69145c911d
cask/dsl/rename: add api support 2025-08-19 11:47:15 +10:00
Mike McQuaid
d13aaf94db
Deprecate conflicts_with formula: in Cask DSL.
This is outside of our usual deprecation process but it's a no-op method
that does, and has always done, nothing so it doesn't make sense to wait
another 2.5 months before deprecating it.

While we're here, make `conflicts_with` `typed: strict` in Sorbet.
2025-08-18 19:25:54 +01:00
Bevan Kay
9a60526c47
test/cask: speed up tests 2025-08-19 00:11:51 +10:00
Rylan Polster
8aabee74a6
Store cask API data for use in to_hash_with_variations 2025-08-11 22:06:07 -04:00
Mike McQuaid
e10d4c43c2
Optionally use DownloadQueue for reinstall, upgrade.
Follow up on `DownloadQueue` for download concurrency on `brew fetch`
and `brew install` to also add support for `brew reinstall` and
`brew upgrade`.

This required a fair bit of refactoring to make this work so I've also
made `install.rb`, `reinstall.rb` and `upgrade.rb` `typed: strict` to
add some extra guardrails from Sorbet here.

Co-authored-by: Carlo Cabrera <github@carlo.cab>
2025-07-24 15:41:03 +01:00
Bevan Kay
758ccd3493
test/fixtures: add minimal mp4 2025-07-16 18:52:07 +10:00
Mike McQuaid
607ffafd9f
fixtures/rubocop@x.x.x.rbi: fix style.
At least for me locally: `brew style` complains about this and
`brew style --fix` autocorrects it.
2025-07-11 13:54:51 +01:00
Issy Long
836d85277f
Keep only the parts of rubocop.rbi that we actually use
- This file was _massive_ - over 60k lines and we had to bump the file
  size limit for pushes to the repo!
- This was because by default Tapioca, when it encounters a
  `require "rubocop"` during RBI generation, loads all of the cops ever
  because they're all classes inside `RuboCop::Cop`.
- There wasn't an easy way to control this at Tapioca generation time
  (we tried), so now we parse the generated RBI file and delete classes
  and method definitions that we don't use.
- I regenerated the RBIs (`brew tc --update rubocop`) and added new
  things to the allowlist until Sorbet came back green.
- Now the file is ~7k lines and 240K - much better!
2025-07-04 00:27:12 +01:00
thibhero
1b0e79121a brew style error 2025-06-17 20:36:47 -04:00
thibhero
ea7d441370 removing fixture 2025-06-17 20:21:41 -04:00
thibhero
fc18956eeb removing longer tests and putting back integration_test.rb 2025-06-17 20:21:32 -04:00
Mike McQuaid
dffa42839c
Merge branch 'master' into master 2025-06-11 13:24:46 +01:00
Eric Knibbe
ea8152757e
rubocops/cask/no_overrides: avoid nested depends_on macos: 2025-06-10 14:31:58 -04:00
Mike McQuaid
e9f55a8f71
tests: default to API mode enabled.
While we're here, also add `brew tests --no-parallel` which I relied
on during testing.

Pretty much anywhere we rely on a stubbed formula on disk to work: we
need to disable the API.
2025-06-10 15:53:27 +01:00
Bo Anderson
b8e2cddbbd
Preliminary macOS 26 (Tahoe) support 2025-06-09 21:41:49 +01:00
thibhero
ab3b2736b5 double quotes for brew style 2025-05-31 21:35:35 -04:00
Thibaut Hérault
326376ef44 Removing attributes from macOS 2025-06-01 03:25:16 +02:00
thibhero
b1c8567977 adding tarball parent for linux 2025-05-31 14:17:40 -04:00
thibhero
b0b29f9b53 updating name tarball for linux 2025-05-31 14:03:08 -04:00
thibhero
960b4343cc updating tarball to remove attributes from MacOS 2025-05-31 13:25:25 -04:00
thibhero
19134b3005 making tests more robust with bottles to verify the whole hierarchy oh dependencies and dependants is upgraded as expected 2025-05-31 12:54:53 -04:00
thibhero
3963af774a adding tarball for the different tests in upgrade_spec.rb and install_spec.rb 2025-05-31 12:52:34 -04:00
botantony
91f328950f test/fixtures: fix cask JSON fixture
Signed-off-by: botantony <antonsm21@gmail.com>
2025-04-29 18:04:59 +02:00
botantony
9ff2abbcdf no_autobump!: rename no_autobump_msg field to no_autobump_message
Signed-off-by: botantony <antonsm21@gmail.com>
2025-04-29 18:04:59 +02:00
botantony
1fcacdc2dc formula/cask DSL: add no_autobump! method
Signed-off-by: botantony <antonsm21@gmail.com>
2025-04-29 18:04:59 +02:00
botantony
4fa1355be0 deprecate!/disable!: remove non-typed replacement field
Signed-off-by: botantony <antonsm21@gmail.com>
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2025-04-21 21:13:25 +02:00
botantony
d3cfc3d193
unpack .dmg: ignore .HFS+ Private* metadata directories
Signed-off-by: botantony <antonsm21@gmail.com>
2025-03-18 12:59:21 +01:00
Issy Long
089680c76f
rubocops/cask/stanza_order: Ensure arch and os are adjacent
- Because Patrick wanted this to be codified.
2025-03-16 21:36:07 +00:00
Sean Molenaar
756ba2ba59 Add Linux dependency check in cask.rb 2025-03-13 21:47:17 +01:00
thibhero
99fad7797c modifying files with brew style 2025-03-06 21:27:13 -05:00
thibhero
f4d93e19b8 refactoring testball case to make it more readable 2025-03-06 20:59:56 -05:00
thibhero
fa4e2bad6e updating testball5-0.1.tbz to make it work 2025-03-06 20:59:33 -05:00
thibhero
e5e647d950 refactoring testball 2025-03-06 19:58:32 -05:00
thibhero
4651b961fa removing attributes from macOS 2025-03-06 19:57:44 -05:00
thibhero
16599b6e05 tests for install_spec.rb 2025-03-06 19:34:46 -05:00
thibhero
4e90aa527d moving testball3 to testball5 2025-03-06 19:34:25 -05:00
thibhero
f0f2e59fb7 Merge branch 'master' into ask-test
# Conflicts:
#	Library/Homebrew/vendor/bundle/bundler/setup.rb
2025-03-06 00:12:32 -05:00
thibhero
885b7c6f4f checking other tests functions 2025-03-05 23:57:58 -05:00
thibhero
0f919e8397 new files for integration_spec.rb for testball3 and 4 2025-03-05 21:32:48 -05:00
thibhero
0b9374b7ac modifying integration_test.rb to work with other dependencies 2025-03-05 21:29:02 -05:00
Sean Molenaar
fc319f6793 feat: add tests for completion stanzas 2025-03-05 20:12:18 +01:00
Rylan Polster
f874603a21 Add implicit macOS dependency to casks without explicit depends_on stanza 2025-02-17 14:30:44 +01:00
Mike McQuaid
8adc188992
Import brew alias and brew unalias commands
Import these from the homebrew/aliases tap and deprecate that tap.

This required a little messing around with class/module/constant names
to get `brew tests` and `brew typecheck` to play nicely.

I added also added Sorbet type signatures and integration tests.
2025-02-07 14:31:50 +00:00
apainintheneck
839198d21e Remove JSON v3 formula logic 2025-02-05 23:36:57 -08:00
Douglas Eichelberger
f5d2d30f5b Add test for concurrent fetching 2025-02-04 13:02:50 -08:00
Bo Anderson
fed5321969
Rename aarch64_linux tag to arm64_linux 2025-02-01 13:03:58 +01:00
Rylan Polster
c023b70e8f
Mirror real installation directory structure for tests 2025-01-23 03:11:59 -05:00
Issy Long
6ada9a9665
Add clarifying comments to rubocop:disables
- Needed for PR 18842 that adds a `DisableComment` RuboCop to ensure that all RuboCop disables have comments.
2025-01-12 16:59:07 +00:00