64 Commits
Author SHA1 Message Date
Rylan Polster 2e6b6ab3a2 Fix style 2021-12-24 21:15:21 -05:00
Carlo Cabrera 601bf83fee linkage: add --strict flag to detect opportunistic linkage
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.
2021-11-19 18:14:38 +08:00
Connor Mann 2bfdbc6b39 Rename missed to_keg 2021-05-19 12:59:53 -04:00
Connor Mann d46881c5e2 Rename to_kegs to to_keg 2021-05-18 09:52:19 -04: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
Markus Reiter 5be4c9b5e0 Upgrade typed sigils. 2020-11-25 17:04:19 +01: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
Seeker 5def0701ba formula: rename opt_or_installed_prefix_keg to any_installed_keg 2020-09-01 09:39:20 -07:00
William Ma fa7bd3bff6 args: Migrate usage of args loading methods to args.named 2020-08-23 09:02:20 -04:00
Markus Reiter d4c2ffd705 Refactor CLI::Parser. 2020-07-31 15:07:17 +02:00
Mike McQuaid e3ac94fc5d dev-cmd: use more and cleanup new args APIs. 2020-03-05 09:40:15 +00:00
Zach Auten fd429d0d75 Moved kegs from ARGV to args.rb 2019-11-09 11:56:47 -05: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 b4303cd983 manpages: fix command & option descriptions 2019-08-20 09:03:33 -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 bbea109926 dev-cmd: remove --help headers and tweak docs. 2019-01-30 21:39:28 +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 ddf057f3dd dev-cmd/: edit help text and descriptions. 2018-10-19 13:12:11 -04:00
Gautham Goli a03d2e0cd1 man: Correct option synopsis 2018-10-03 19:49:46 +05:30
Gautham Goli f60582ca48 man: Remove [] from command synopsis 2018-10-03 19:49:45 +05:30
Gautham Goli 446b1cb9e3 man: Seperate global options into a section 2018-10-03 19:49:45 +05:30
Gautham Goli e0e876cf37 man: Make command heading H3 2018-10-03 19:49:44 +05:30
Gautham Goli 4f58f2db99 man: Generate dev cmd manpages 2018-10-03 19:49:41 +05:30
Gautham Goli b6c456b681 Extract out arg parsing method to <cmd>_args method 2018-10-03 19:19:04 +05:30
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
Steven Peters b387c09d0d linkage: test all kegs if none are specified 2018-08-03 12:07:45 -07:00
Mike McQuaid 6f5c8b8509 linkage: enable cache by default.
This has not been causing any issues in CI or for `master` users so
let's now enable it by default for everyone.
2018-06-29 19:57:39 +01:00
Gautham Goli 39a6f7f83f linkage: Use Parser to parse args 2018-06-02 20:45:50 +05:30
Mike McQuaid 44f5d3ec79 Refactor cache store code. 2018-05-22 14:46:14 +01:00
Andrew R. McBurney 010207b982 Changed cache usage behavior.
1. Running `brew linkage some_package` does not set the cache.
2. Running `brew linkage --cached some_package` when `DatabaseCache.empty?` returns `true` should build the cache.
3. Running `brew linkage --cached some_package` when `DatabaseCache.empty?` returns `false` should use the cache.
2018-05-21 17:36:30 -04:00
Andrew R. McBurney e93e8f3266 Lazily load db of type DBM instance variable for DatabaseCache so the corresponding database file isn't created in the .use block for a DatabaseCache. 2018-05-18 16:37:01 -04:00
Andrew R. McBurney cd6f89ca76 Made DatabaseCache.new private, and changes instances in code that call it to use DatabaseCache.use instead. 2018-05-18 10:06:30 -04:00
AndrewMcBurney 916247b920 Merge remote-tracking branch 'origin/master' into cache-optimization 2018-04-24 16:49:51 -04:00
Mike McQuaid 4a03145c1c linkage: fix --test exit code.
Ensure that a non-zero exit code is set both for missing random dylibs
and random missing dependencies.

Additionally, while we are here, drastically trim down the public
interface for this class to the bare minimum and allow getting the
output from `display_test_output` as a variable.

Fixes issue mentioned by @ilovezfs in:
https://github.com/Homebrew/brew/pull/3940#issuecomment-383794520
2018-04-24 09:52:51 +01:00
AndrewMcBurney bc76a8afcb Changed default behavior of brew linkage command to build cache instead of using cached output. Cached output may be printed with --cached flag. 2018-03-14 16:36:56 -04:00
AndrewMcBurney 831fcfa5dd Merge remote-tracking branch 'origin/master' into cache-optimization 2018-03-06 11:46:23 -05:00
Shaun Jackman 97932c1abf Move linkage_checker from os/mac to generic 2018-02-28 11:18:27 -08:00
AndrewMcBurney d7765dd223 Separated os/mac/cache_store.rb into cache_store.rb and os/mac/linkage_cache_store.rb. 2018-02-28 10:39:15 -05:00
AndrewMcBurney 14256faa47 Added flag to flush_cache in LinkageChecker. Format ruby hash as JSON string before storing in dbm. 2018-02-27 13:05:19 -05:00
AndrewMcBurney 4bc6459ed7 Removed redundant documentation, use database_cache as a block, and use symbolic keys over string keys in function calls. 2018-02-25 12:14:11 -05:00
AndrewMcBurney 69b590012d Berkeley db cache optimization for brew linkage command. 2018-02-12 16:31:41 -05:00
EricFromCanada 1d2b4ed321 docs: add more missing option descriptions
and improve wording or formatting where necessary.
2018-02-01 16:06:17 -05:00
EricFromCanada afc539f86e Update brew's man page formatting and grammar
Also update command specifications to match descriptions.
2017-02-25 17:37:57 -05:00
Markus Reiter 0ab750bf24 Use module_function for commands. 2016-10-02 00:24:47 +02:00
Mike McQuaid ebdb879fe4 Add --help to all developer commands.
Also, flag those that we never want to be in a manpage.
2016-09-08 09:05:00 +01:00