- With `brew contributions`, this will output a list of stats
(across the specified time period, or all time) for people in the
"maintainers" team on GitHub.
- Add a `--user` flag for getting stats for a specific user (either
username, name or email address).
- This assumes that their Git committer details are the same as their name is
set to on GitHub.
- Show an error message if trying to generate a CSV for the full maintainer
list, since I haven't worked out how to best show all of that info yet (or
even how best to show only the totals across everything for every user) in
that format.
- This gives users of this command a `--csv` option to pass to... you guessed
it, generate a CSV that's `pbcopy`able elsewhere, for more granular
breakdowns of where a person contributed.
- Inspiration was taken from the mockup in
https://github.com/Homebrew/brew/issues/13642#issuecomment-1254535251
but without the extra dependency of the TerminalTable gem.
- Always print a condensed "total contributions" sentence.
Output:
```
$ brew contributions issyl0
The user issyl0 has made 1201 contributions in all time.
$ brew contributions issyl0 --csv
user,repo,commits,coauthorships,signoffs
issyl0,brew,331,13,0
issyl0,core,473,24,326
issyl0,cask,4,0,0
issyl0,aliases,0,0,0
issyl0,autoupdate,1,0,0
issyl0,bundle,14,2,0
issyl0,command-not-found,1,0,0
issyl0,test-bot,3,0,0
issyl0,services,9,0,0
issyl0,cask-drivers,0,0,0
issyl0,cask-fonts,0,0,0
issyl0,cask-versions,0,0,0
```
- For the command `brew install --cask racket`, a user was reporting the
behaviour where despite `--cask` in the command, they were getting
output about the `racket` formula having been renamed:
```
$ brew install --cask racket
Warning: Use minimal-racket instead of deprecated racket
==> Downloading https://mirror.racket-lang.org/installers/8.7/racket-8.7-x86_64-macosx-cs.
==> Installing Cask racket
[...]
racket was successfully installed!
```
- The "instead of deprecated ..." messaging comes from the `TapLoader`
class `formula_name_path` method, so _something_ must be assuming
that everything is initially a formula before _later_ learning from
further args parsing that there's a `--cask` qualifier to scope to
only casks.
- There are always `@formula_options` and args parsing is recursive,
going through each option, so we check that the original `argv` items
include a `--cask` and skip calling the `formulae` method if that's
the case.
- After this change, the "formula renames" words no longer show up.
```
$ brew install --cask racket
==> Downloading https://mirror.racket-lang.org/installers/8.7/racket-8.7-aarch64-macosx-cs.dmg
==> Installing Cask racket
[...]
racket was successfully installed!
```
This ability was removed around a month
ago but needs to be added back in.
Developers want to be able to use the
`bump` and `audit` commands when on Linux.
This is especially useful for CI.
1. Validate options before constraint violations. This allows
us to error out when --cask is passed on Linux before getting
a constraint violation when --cask and --formula are set.
2. Skip printing the help page when --cask is passed on Linux.
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.
- I got these with hash syntax because I couldn't figure out Sorbet, but
there's `args.rbi` to add the CLI args methods to. Nice!
- In doing this I realised that `--repositories` is required again, we
no longer infer `--repositories=all` from no `--repositories` passed
as we did in a previous version of this.
When casks are unreadable (e.g. have invalid syntax, the cask file
cannot be found) then it's not been possible to uninstall them, list
them or perform any operation which iterates through all casks.
Handle these various cases by falling back to creating a `Cask::Cask`
object using just the name/token and latest installed version on disk.
This provides enough functionality to be able to verbosely list these
casks, not error on listing and, most importantly, uninstall/reinstall
them.
Fixes https://github.com/Homebrew/homebrew-cask/issues/62223
There was a previous discussion about making `brew linkage --test` fail
for unrequested dependencies (#9172). I'm not sure what the outcome of
that was, but it still seems like a good idea to try to help us find
cases of opportunistic linkage as they happen rather than when they
cause CI failures in another PR sometime later.
Let's do this by adding a `--strict` flag to `brew linkage --test`. My
intention is for `brew linkage --test --strict` failures to be warnings
rather than errors in CI, which should mitigate some of the concerns
about doing this that were raised in #9172.