148 Commits

Author SHA1 Message Date
Eric Knibbe
f5c5d26173
cmd/dev-cmd: fetch HOMEBREW_EVAL_ALL for --eval-all 2025-07-03 12:59:12 -04:00
Mike McQuaid
d2f9677cde
cmd/deps: add warning when not using runtime dependencies.
This should provide clarify as to why the output may differ from a
formula's declared dependencies.
2025-06-10 15:55:39 +01:00
Douglas Eichelberger
0037b1f626 Enable strict typing in DependenciesHelpers 2025-02-16 12:24:22 -08:00
Eric Knibbe
99de228fc2
docs: various manpage grammar fixes 2025-02-05 13:38:39 +01:00
Thierry Moisan
d5e94f2082
deps command: add --include-implicit flag 2024-12-24 15:28:47 -05:00
Issy Long
45978435e7
rubocop: Use Sorbet/StrictSigil as it's better than comments
- Previously I thought that comments were fine to discourage people from
  wasting their time trying to bump things that used `undef` that Sorbet
  didn't support. But RuboCop is better at this since it'll complain if
  the comments are unnecessary.

- Suggested in https://github.com/Homebrew/brew/pull/18018#issuecomment-2283369501.

- I've gone for a mixture of `rubocop:disable` for the files that can't
  be `typed: strict` (use of undef, required before everything else, etc)
  and `rubocop:todo` for everything else that should be tried to make
  strictly typed. There's no functional difference between the two as
  `rubocop:todo` is `rubocop:disable` with a different name.

- And I entirely disabled the cop for the docs/ directory since
  `typed: strict` isn't going to gain us anything for some Markdown
  linting config files.

- This means that now it's easier to track what needs to be done rather
  than relying on checklists of files in our big Sorbet issue:

```shell
$ git grep 'typed: true # rubocop:todo Sorbet/StrictSigil' | wc -l
    268
```

- And this is confirmed working for new files:

```shell
$ git status
On branch use-rubocop-for-sorbet-strict-sigils
Untracked files:
  (use "git add <file>..." to include in what will be committed)
        Library/Homebrew/bad.rb
        Library/Homebrew/good.rb

nothing added to commit but untracked files present (use "git add" to track)

$ brew style
Offenses:

bad.rb:1:1: C: Sorbet/StrictSigil: Sorbet sigil should be at least strict got true.
^^^^^^^^^^^^^

1340 files inspected, 1 offense detected
```
2024-08-12 15:24:27 +01:00
Michael Cho
77a16c2e15
cmd/deps: add --os and --arch
Signed-off-by: Michael Cho <michael@michaelcho.dev>
2024-04-21 17:56:59 -04:00
Douglas Eichelberger
65f8420232 Make things private 2024-03-30 16:43:11 -07:00
Douglas Eichelberger
84222ec006 Port Homebrew::Cmd::Deps 2024-03-29 18:53:07 -07:00
Mike McQuaid
ea2892f8ee
brew.rb: handle missing args. 2024-03-07 16:20:20 +00:00
Patrick Linnane
3fdba532a2
various: fix miscellaneous typos
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2024-01-12 10:56:49 -08:00
apainintheneck
b79778229c Resolve Cask::Cask.all todo
Now it takes the :eval_all parameter that means we can remove
ARGV handling inside Cask::Cask.all.
2023-12-21 21:55:16 -08:00
Eric Knibbe
8e01227add
cmd/deps: show deps for head spec with --HEAD
Plus a few man page fixes
2023-10-13 00:29:09 -04:00
Eric Knibbe
c493b5e680
cmd+dev-cmd: fixes for output formatting 2023-09-11 02:29:57 -04:00
Eric Knibbe
beafe82096
cmd/deps: explain runtime dependencies mode 2023-09-09 12:11:12 -04:00
hyuraku
adc2a2fea1 remove ARGV from Formula#all 2023-09-02 19:35:22 +09:00
Mike McQuaid
9863d555a8
cmd/deps: fix documentation and handling of formula_options.
https://github.com/Homebrew/brew/pull/15892#issuecomment-1698659908
2023-08-30 08:46:59 +01:00
apainintheneck
b2b8f0ea86 cmd/uses & cmd/deps: update help/man pages
- add clarification about precedence of command options
- reword some options for readability
- clarify the defaults in `brew deps`
2023-08-28 22:14:26 -07:00
apainintheneck
e314a43754 dependency_helpers: include required & use public_send
- Use .required? instead of .tags.empty?
- use .public_send
- modify .reject_ignores to be .select_includes
  - checks ignores first now
- Don't use runtime deps with --missing in `brew deps` command
2023-08-25 00:25:14 -07:00
Mike McQuaid
7da934f7e2
Deprecate/disable/delete code.
The next release after this is merged will be 4.1.0.

Co-authored-by: Markus Reiter <me@reitermark.us>
2023-07-06 16:56:20 +01:00
Bo Anderson
71d51faa55
Introduce tag for implicit dependencies 2023-07-04 13:40:58 +01:00
Robin Ury
dddec94fd7
Change: --skip-installed to --missing 2023-05-17 14:57:26 -05:00
Robin Ury
6aa9a0e57b
Add brew deps --skip-installed arg 2023-05-17 13:53:19 -05:00
Douglas Eichelberger
24cf6076e8 brew style --fix 2023-04-24 20:42:39 -07:00
Douglas Eichelberger
1943132cf6 Move i18n out of global 2023-03-11 17:27:53 -08:00
Issy Long
e9d994622e
rubocop: Drop "f" from Naming/MethodParameterName allowlist
- This either stands for "file" but more often than not "formula".
2023-03-11 00:17:27 +00:00
Issy Long
a3211f4d7f
rubocop: Drop "d" from Naming/MethodParameterName allowlist 2023-03-08 14:42:57 +00:00
Douglas Eichelberger
d56e2884aa Enable typing in cmd/ 2023-03-06 15:01:08 -08:00
Mike McQuaid
6b4363092d
Revert "Merge pull request #14548 from Homebrew/revert-14382-deprecate-disable-remove"
This reverts commit 932d2cf3b77c9439a57b6a43577fc8d3b6399a62, reversing
changes made to f4e60482791d2ff628efadfdbf0d14d9237d2d29.
2023-02-07 19:25:51 +01:00
Mike McQuaid
6882ac17e7
Revert "Add deprecations and disables" 2023-02-07 15:13:19 +01:00
Mike McQuaid
59c03cb2a6
Add deprecations and disables
Do the usual dance:
- commented `odeprecated` to `odeprecated`
- `odeprecated` to `odisabled`
- `odisabled` removed
2023-02-03 10:48:43 +00:00
Mike McQuaid
e2759fbdff
Deprecate reading all formulae through commands
We added the `--all` flag (now renamed to `--eval-all`) for various
commands for this behaviour so let's start deprecating this.

Also, introduce a `HOMEBREW_EVAL_ALL` environment variable to use the
existing, less secure, behaviour by default and avoid passing
`--eval-all` everywhere.
2022-09-05 13:57:22 +01:00
EricFromCanada
197f915323
cmd/deps: drop --installed requirement for --formula/--cask
Fixes #13592.
2022-08-31 14:20:11 -04:00
Mike McQuaid
fd432aa1db
cmd/deps: improve switch names.
The previous `-n` and `--1` made both the code and the help harder to
read and follow.

Co-authored-by: Eric Knibbe <enk3@outlook.com>
Co-Authored-By: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
2022-08-31 17:21:44 +01:00
Mike McQuaid
a5f7fc814e
cmd/deps: return failing exit code on circular dependencies.
This makes more sense but will also be useful in `brew test-bot`.
2022-08-30 12:21:02 +00:00
Mike McQuaid
2d5eab2e1c
brew style --fix 2022-06-30 08:56:21 +01:00
hyuraku
0f546b0b3d cmd/deps: repair dot_code 2022-03-19 16:21:01 +09:00
Mike McQuaid
3a709d36b2
Start process to remove Enumerable from Formula and Cask::Cask.
This is the first step to address
https://github.com/Homebrew/brew/issues/11292.
2022-01-03 14:59:10 +00:00
Mike McQuaid
510bc25db6
brew style -fix 2021-12-29 13:07:39 +00:00
fn ⌃ ⌥
87e9a495d1 deps: add --graph and --dot switches 2021-11-16 08:50:39 -08:00
fn ⌃ ⌥
a188215d69 deps: minor refactoring 2021-11-16 08:45:59 -08:00
Bo Anderson
ae2d0fb0f8
Fix Cask handling in brew deps and brew uses.
Fixes #10906.
2021-03-22 22:26:45 +00:00
EricFromCanada
2ae4f11963 reorder command flags 2021-01-26 15:36:44 -05:00
Rylan Polster
d1f3e39b7b
Update commands to generate usage banner 2021-01-18 21:20:11 -05:00
Dawid Dziurla
332372469f
cmd: indicate multiple named args in usage banner 2021-01-15 13:04:00 +01:00
Rylan Polster
da811373d3 Add named_args DSL for commands 2021-01-13 17:09:42 -05:00
hyuraku
4238ee8300 cmd/deps: refactor 2020-12-29 21:06:32 +09:00
hyuraku
e2ce4ab1b6 add flags to deps --installed 2020-12-04 10:11:17 +09:00
Mike McQuaid
c23db73e36
Revert "add two flag to deps --installed" 2020-12-03 19:39:32 +00:00
hyuraku
33fccb46ca
add two flag to deps --installed 2020-12-03 16:54:17 +00:00