67 Commits

Author SHA1 Message Date
Douglas Eichelberger
6d716a7d69 Missed one 2024-04-01 12:09:20 -07:00
Douglas Eichelberger
c50fb2dbd2 Remove redundant cli/parser requires 2024-03-29 18:53:07 -07:00
Douglas Eichelberger
827e943803 Port Homebrew::DevCmd::Test 2024-03-22 09:33:28 -07:00
Mike McQuaid
ea2892f8ee
brew.rb: handle missing args. 2024-03-07 16:20:20 +00:00
Michael Cho
fed4e78e23
test: prune test deps of dependencies 2024-02-21 15:03:46 -05: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
Bo Anderson
3b1c171184
Further split up Gemfile into groups 2023-09-27 17:33:44 +01:00
apainintheneck
85bd4c7e1f utils/backtrace: scrub sorbet-runtime from backtrace
Ever since we started using this at runtime it's been polluting
the backtrace output. This makes it harder to debug errors and
increases the amount of info users have to paste into the box
when filing an issue.

This is a very direct approach. Essentially, we strip out
everything related to the `sorbet-runtime` gem whenever the top
line in the backtrace is unrelated to sorbet-runtime.

The hope is that this will allow errors related to sorbet to
be diagnosed easily while also reducing the backtrace size
for all other types of errors.

Sometimes it is useful to see the full backtrace though.
For those cases, we include the full backtrace when
`--verbose` is passed in and print a warning that the
Sorbet lines have been removed from the backtrace the
first time they are removed.

Note: This requires gems to be set up so that the call to
`Gem.paths.home` works correctly. For that reason, it must
be included after `utils/gems` which is included in
`standalone/load_path` already.
2023-09-21 21:07:22 -07:00
Bo Anderson
e2e80d77a3
dev-cmd/test: use localised no-api scoping 2023-06-22 01:57:35 +01:00
Douglas Eichelberger
24cf6076e8 brew style --fix 2023-04-24 20:42:39 -07: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
Carlo Cabrera
a1c1bf73ec
dev-cmd/test: set RUST_BACKTRACE when retrying
Occasionally, a new version of Rust will cause failures in dependents.
See, for example, Homebrew/homebrew-core#107818.

This change will allow us to get a fuller backtrace in CI, which will
also make it easier to submit bug reports upstream.

Without this change, recovering a full backtrace requires installing the
new version of Rust and rebuilding the failing formula from source. Both
these steps can be skipped if we set `RUST_BACKTRACE` when retrying a
failing test.
2022-08-15 18:27:32 +08:00
Bo Anderson
861dea9ada
Bump various type strictnesses 2021-09-11 01:00:23 +01:00
Bo Anderson
8e98ce69f3
Stricter handling of CLI args 2021-03-18 16:41:57 +00:00
Bo Anderson
769a6cd1f5
Don't touch PATH, GEM_HOME and GEM_PATH when testing formula 2021-03-10 17:08:57 +00:00
Bo Anderson
d911596af9
dev-cmd/test: output stacktrace to stderr 2021-02-26 18:23:48 +00:00
Bo Anderson
6cd1e5e384
Avoid passing around a massive $LOAD_PATH.
Portable Ruby crashes if the $LOAD_PATH gets too big.
2021-02-26 18:23:48 +00:00
Bo Anderson
bb4e74042a
formula_assertions: use minitest
We are migrating away from using system gems, and we already have minitest in our dependency tree, so we might as well use it.
2021-02-26 18:23:07 +00:00
Rylan Polster
d1f3e39b7b
Update commands to generate usage banner 2021-01-18 21:20:11 -05:00
Dawid Dziurla
cf654da251
dev-cmd: indicate multiple named args in usage banner 2021-01-15 13:04:07 +01:00
Rylan Polster
da811373d3 Add named_args DSL for commands 2021-01-13 17:09:42 -05:00
souleater7
e50e3e4b22 Delete references to devel 2021-01-01 10:16:31 -08:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Mike McQuaid
2e5272d04c Deprecate/disable code for Homebrew 2.5.0.
Do the usual "disable deprecations" and "uncomment pending deprecations"
dance and delete/deprecate/disable relevant/related code.
2020-09-03 10:34:22 +01:00
William Ma
fa7bd3bff6 args: Migrate usage of args loading methods to args.named 2020-08-23 09:02:20 -04:00
Dawid Dziurla
c8c2e38bcb
Consistently use HOMEBREW_RUBY_WARNINGS when calling ruby
Adding this in `dev-cmd/ruby.rb` allows us to suppress warnings like:
```
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/language/python.rb:8: warning: Insecure world writable dir /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/scm in PATH, mode 040777
```
2020-08-20 14:59:58 +02:00
Markus Reiter
cd402358b0 Pass args correctly in brew test. 2020-07-31 19:45:18 +02:00
Markus Reiter
d4c2ffd705 Refactor CLI::Parser. 2020-07-31 15:07:17 +02:00
Mike McQuaid
92a39bc49e
test: add flag to retry.
This should allow better handling flaky tests.
2020-07-29 12:00:45 +01:00
Mike McQuaid
40ec8e69cc
Cleanup Sandbox code
Remove unused code and methods.
2020-05-02 13:45:04 +01:00
Alexander Bayandin
bfcba0f5f0 Library/Homebrew: add free_port test helper
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
2020-03-31 00:00:11 +01:00
Mike McQuaid
e3ac94fc5d
dev-cmd: use more and cleanup new args APIs. 2020-03-05 09:40:15 +00:00
Gautham Goli
de9295cc7a
Merge pull request #6939 from Homebrew/argv-cleanup-8
ARGV: Replaces usages of ARGV.force? with Homebrew.args.force?
2020-01-15 21:25:36 +05:30
Gautham Goli
161c3fb6a4 ARGV: Replaces usages of ARGV.force? with Homebrew.args.force? 2020-01-15 21:09:31 +05:30
Gautham Goli
959b88266d
ARGV: Replace usages of ARGV.resolved_formulae with Homebrew.args 2020-01-02 13:56:19 +00:00
Mike McQuaid
5dd8ead51a
Rename Formula#installed? to Formula#latest_version_installed?
This naming has always been a bit weird and confusing so let's change
it and provide a `compat` fallback for later deprecation.
2019-12-03 11:42:42 +00:00
Gautham Goli
393c8dfbf1 ARGV: Replace options_only and flags_only with Homebrew.args counterparts 2019-09-23 12:39:22 +05:30
Mike McQuaid
963cc556d4
Revert "argv: move options_only to cli/args" 2019-09-13 09:34:43 +01:00
Gautham Goli
4586632855 argv: move options_only to cli/args 2019-09-07 21:32:50 +05:30
EricFromCanada
8a8359cdd4 manpages: sentence rewording for readability
Use active voice when applicable, better verbs & adjectives, preposition usage, proper tense, etc.
2019-08-20 09:05:45 -04:00
Mike McQuaid
c4f72312ce
Fixup brew style failures. 2019-04-30 09:19:18 +01:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid
e40b171127
Rename cli_parser to cli/parser. 2019-04-17 22:16:50 +09:00
Mike McQuaid
aa44509be9
Test dev-cmd *_args methods
Also, add a few missing invocations.
2019-03-27 13:35:42 +00:00
Mike McQuaid
bbea109926
dev-cmd: remove --help headers and tweak docs. 2019-01-30 21:39:28 +00:00
Mike McQuaid
867b155479
Add missing conflicts to command options. 2019-01-29 19:39:41 +00:00
EricFromCanada
388781f6a7 dev-cmd/: remove colons from command specs.
These aren't needed when converting Parser-based help text to man page or Markdown formats.
Includes regenerated docs.
2018-10-19 13:12:55 -04:00
EricFromCanada
63b3d400e0 dev-cmd/: add Parser-based help text for remaining commands.
`brew ruby` now accepts only `-e`, verbose, and debug arguments.
2018-10-19 13:12:55 -04:00
Markus Reiter
b7ea9e1830 Allow access to lock directory inside tests. 2018-10-17 14:23:02 +02:00