124 Commits

Author SHA1 Message Date
Mike McQuaid
b6116c5a03
deps: use Formulary factory cache. 2019-11-06 10:21:28 +00:00
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
EricFromCanada
ee314617f7 manpages: update command usage strings 2019-08-20 08:55:54 -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
EricFromCanada
f97f7b615e deps: allow passing both --installed & --include-requirements
And update docs.
2019-03-14 21:00:21 -04:00
EricFromCanada
23c62b8b83 deps: fix --1 and --annotate options 2019-03-07 16:39:42 -05:00
Mike McQuaid
d64429a736
rubocop: enable Style/IfUnlessModifier. 2019-02-21 12:55:49 +00:00
Mike McQuaid
6cb7a00f2d
cmd: remove --help headers and tweak docs. 2019-01-30 21:39:28 +00:00
Mike McQuaid
51a260cf1c
deps: accept formula options.
Also, cleanup usage of `<formula>`.

As requested in comments of #5587.
2019-01-30 13:18:02 +00:00
Mike McQuaid
867b155479
Add missing conflicts to command options. 2019-01-29 19:39:41 +00:00
Gautham Goli
7b6d1f774d
deps: Use CLI::Parser to parse args 2019-01-23 08:34:24 +05:30
Bryce Glover
fc40e2fa40 brew deps: Fix typo in --include-optional output.
This was missing its closing square bracket.
2018-11-12 17:56:06 -05:00
Mike McQuaid
737b84b54b
brew style --fix fixes. 2018-11-02 17:29:23 +00:00
Markus Reiter
e9b9ea49a1 Update to RuboCop 0.59.1. 2018-09-17 03:45:59 +02:00
Mike McQuaid
80d75bc0d8
Homebrew/.rubocop: tweak rules.
Adjust the rules based on the current codebase. Remove various enable,
disables and default values that are unnecessary. Add more comments
explaining why. Make minor changes needed to enable a few more rules.
2018-09-02 20:15:09 +01:00
Mike McQuaid
74d6d39e45 deps: use Formula#runtime_dependencies. 2018-03-27 14:52:48 +01:00
Mike McQuaid
592bafe24e Refactor dependencies usage
Reuse more code to avoid errors due to duplication.
2018-03-24 16:55:16 +00:00
Mike McQuaid
1dfeff7274 deps: don't display recursive test dependencies.
You only care about the test dependencies for the specific formula you
are testing right now.
2018-03-14 15:41:20 +00:00
Mike McQuaid
924c4af3de dep*: fix more :test dependency resolution. 2018-03-08 09:46:53 +00:00
Mike McQuaid
d32fc4508f deps: fix test? typo. 2018-03-08 08:36:01 +00:00
Mike McQuaid
fea9bc1e42 Allow :test dependencies.
These specify that they are needed by the test block. This can be
combined with `:build` to ensure that this formula isn't uninstalled
by `brew test-bot` when running `test do` blocks on our CI.
2018-03-05 10:36:39 +00:00
Mike McQuaid
b70b5429d0 Deprecate default_formula Requirement DSL
This has been a nightmare in terms of the complexity to our dependency
system and the whack-a-mole required on bugs. If a Requirement resolves
to a Formula it should just use `depends_on "formula"` instead. This
matches the effective behaviour all users of bottles (the vast majority
of users and installs) and what we're doing in Homebrew/homebrew-core.
2018-01-14 13:27:43 +00:00
Dominyk Tiller
c9684c3727
deps: pass explicit sort to handle APFS 2017-10-14 06:42:53 +01:00
Andrew Janke
bb85581df0 brew deps: add --include-requirements 2017-08-11 16:43:37 -04:00
Mike McQuaid
7a38bab333 Fixup all RuboCop warnings. 2017-05-29 18:43:18 +01:00
Alyssa Ross
9e97eadccb rubocop: trailing comma in multiline method calls
Discussed in
https://github.com/Homebrew/brew/pull/1987/files#r100693581.

This was originally ommitted because it wasn't compatible with Ruby 1.8.
(See https://github.com/Homebrew/legacy-homebrew/pull/48144#r49928971).
2017-02-12 15:11:38 +00:00
Andrew Janke
62d48b4f9d brew deps --tree: fix gap in line between reqs and deps 2017-01-12 16:08:41 -05:00
Andrew Janke
0097dbe4ee brew deps: support --full-name in --installed, --all, and --tree modes 2016-12-27 23:41:16 -05:00
Markus Reiter
0ab750bf24 Use module_function for commands. 2016-10-02 00:24:47 +02:00
Mike McQuaid
3982950e61 rubocop --auto-correct all hash-rocket usage. 2016-09-17 16:14:13 +01:00
Mike McQuaid
6f3039fcd3 cmd/deps: avoid some full-name code repetition. 2016-08-30 18:49:27 +01:00
Steven Peters
7ddd3977d8 cmd/deps.rb add --full-name option
Add --full-name option to brew deps command,
which displays the full name of dependencies.
2016-08-28 00:30:30 -07:00
ilovezfs
6367508454 deps should respect skip-recommended
For example, `brew deps libass --skip-recommended` shouldn't print
harfbuzz because, even though libass builds with harfbuzz when harfbuzz
is not skipped, we asked to skip recommended, of which harfbuzz is one.

The corresponding change is made for `brew uses` as well.

Thanks to Xu Cheng for contributing the code. Any errors are mine.

Closes #129.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
2016-06-11 01:26:28 -07:00
Martin Afanasjew
6fdcab5abc deps: split and clarify documentation
`brew deps` has three different modes of operation that were not easy to
infer from the existing documentation. Split the help text into three
parts to make this clearer. This also improves on the confusion when
options were silently ignored because they don't apply to a certain mode
of operation. Those are:

1. List the shared dependencies (either intersection or union) of
   explicitly named formulae with options for traversal depth/order.

2. Output separate trees of explicitly listed or all installed formulae.

3. List all available/installed formulae and their direct dependencies
   with one line per formula formatted as `<formula>: <dependencies>`.

Closes #137.

Closes #179.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-05-03 17:19:18 +02:00
Xu Cheng
7ba9eabc14 uses/deps: default to skip optional/build deps.
Also add options to include optional/build deps and an option
to skip recommended deps.

Closes Homebrew/legacy-homebrew#50066.
2016-04-16 21:47:47 +08:00
Max Nordlund
fa1fd70a37 Add all the top level comments 2016-04-10 22:59:25 +02:00
Alexis Hildebrandt
a9b380539c brew-deps: improved --tree formatting
Use proper BOX DRAWINGS LIGHT VERTICAL unicode character.

Closes Homebrew/homebrew#46158.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-11-19 10:20:40 +01:00
Xu Cheng
d6a50f1e76 deps: remove duplicated entires
Fixes Homebrew/homebrew#43955

Closes Homebrew/homebrew#43966.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-09-16 19:57:37 +08:00
BrewTestBot
13d544e11e Core files style updates.
Closes Homebrew/homebrew#42354.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-03 13:22:35 +01:00
Alex Dunn
d2c1a182d5 cmd/deps: --tree shows required dependencies only
Until we figure out how to allow --tree to show optional dependencies in
a way that fits on a normal screen, this helps to explain the
discrepancy between `brew deps` and `brew deps --tree`.

Closes Homebrew/homebrew#41841.
Closes Homebrew/homebrew#41947.
2015-07-21 09:44:15 -07:00
Misty De Meo
90af721152 deps: Array#keep_if isn't defined in 1.8.7
Fixes Homebrew/homebrew#41365.
2015-07-04 18:26:08 -07:00
Baptiste Fontaine
919698fdde brew deps --installed support for formulae
Closes Homebrew/homebrew#40233.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-06-03 00:35:26 +02:00
Baptiste Fontaine
9e6934d00c brew-deps: improved --tree formatting
Closes Homebrew/homebrew#40018.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-05-29 19:26:27 +02:00
Xu Cheng
06133a8ae8 deps: use Formula#full_name 2015-05-29 17:02:22 +08:00
Xu Cheng
8b57871220 uses/deps: fix for recursive deps/reqs
Closes Homebrew/homebrew#39906.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-05-20 16:29:15 +08:00
Mike McQuaid
a09641a581 deps: allow skipping build, optional deps. 2015-03-23 13:30:54 +00:00
Jack Nagel
10a1952d2c Only "extend self" once on the Homebrew module 2014-06-19 13:10:36 -05:00
tduehr
c101919a2e Add brew deps --union
The default behavior of `brew deps foo bar` is to return the
intersection of the deps of foo and bar. This option returns the union.

Closes Homebrew/homebrew#27480.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-05-06 21:06:23 -05:00