Homebrew / brew

🍺 The missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
41.36k stars 9.73k forks source link

New, overly verbose --verbose output during `install` #4576

Closed chdiza closed 6 years ago

chdiza commented 6 years ago

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

Somewhere between Homebrew 1.7.0 and 1.7.1, verbose output became so absurdly verbose that it must be an oversight. (I have HOMEBREW_VERBOSE set at all times, but I still think this is a bug.)

To illustrate, here is the difference between the beginning of the output of brew install markdown --verbose on the 1.7.0 tag of HB versus that of the 1.7.1 tag of HB.

On 1.7.0:

/usr/bin/sandbox-exec -f /Users/chdiza/.tmp/tmpdir/homebrew20180730-64872-2qflp7.sb nice /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -W0 -I /usr/local/hb/Library/Homebrew:/usr/local/hb/Library/Homebrew/cask/lib -- /usr/local/hb/Library/Homebrew/build.rb /usr/local/hb/Library/Taps/homebrew/homebrew-core/Formula/markdown.rb --verbose
==> Downloading https://daringfireball.net/projects/downloads/Markdown_1.0.1.zip

On 1.7.1:

/usr/bin/sandbox-exec -f /Users/chdiza/.tmp/tmpdir/homebrew20180730-63670-waciwx.sb nice /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -W0 -I /Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib:/Library/Ruby/Gems/2.3.0/gems/json-2.1.0/lib:/Library/Ruby/Gems/2.3.0/extensions/universal-darwin-17/2.3.0/json-2.1.0:/Library/Ruby/Site/2.3.0:/Library/Ruby/Site/2.3.0/x86_64-darwin17:/Library/Ruby/Site/2.3.0/universal-darwin17:/Library/Ruby/Site:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby/2.3.0:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby/2.3.0/x86_64-darwin17:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby/2.3.0/universal-darwin17:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/x86_64-darwin17:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin17:/usr/local/hb/Library/Homebrew/cask/lib:/usr/local/hb/Library/Homebrew -- /usr/local/hb/Library/Homebrew/build.rb /usr/local/hb/Library/Taps/homebrew/homebrew-core/Formula/markdown.rb --verbose
==> Downloading https://daringfireball.net/projects/downloads/Markdown_1.0.1.zip

It seems to me that the extra stuff there is entirely unnecessary. Just for clarity, the following stuff is the extra new stuff that's displayed:

/Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib
/Library/Ruby/Gems/2.3.0/gems/json-2.1.0/lib
/Library/Ruby/Gems/2.3.0/extensions/universal-darwin-17/2.3.0/json-2.1.0
/Library/Ruby/Site/2.3.0
/Library/Ruby/Site/2.3.0/x86_64-darwin17
/Library/Ruby/Site/2.3.0/universal-darwin17
/Library/Ruby/Site
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby/2.3.0
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby/2.3.0/x86_64-darwin17
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby/2.3.0/universal-darwin17
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/x86_64-darwin17
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin17

I don't see the point, and especially not when you consider that all of this gets repeated at the end of a successful install. (It really makes it visually tough to parse what happened at the end of the install.)

Doctor says that (aside from setting HOMEBREW_VERBOSE) I'm ready to brew.

$ brew --config
HOMEBREW_VERSION: 1.7.1-62-gddbefee
ORIGIN: https://github.com/Homebrew/brew
HEAD: ddbefee44a8c3a154ccb5b36d0efb7b8e4eb7bd6
Last commit: 8 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 299fc3de1d9bcc4f04c303f0a0cec9921e4e2e8c
Core tap last commit: 5 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local/hb
HOMEBREW_CACHE: /stuff/brache
HOMEBREW_TEMP: /Users/chdiza/.tmp/tmpdir
HOMEBREW_BUILD_FROM_SOURCE: 1
HOMEBREW_DEV_CMD_RUN: 1
HOMEBREW_LOGS: /Users/chdiza/Library/Homebrew
HOMEBREW_NO_ANALYTICS: 1
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_EMOJI: 1
HOMEBREW_NO_GITHUB_API: 1
HOMEBREW_VERBOSE: 1
CPU: quad-core 64-bit ivybridge
Homebrew Ruby: 2.3.7 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 9.1 build 902
Git: 2.18.0 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: N/A
macOS: 10.13.6-x86_64
CLT: 9.4.1.0.1.1528165917
Xcode: 9.4.1
XQuartz: N/A
chdiza commented 6 years ago

Bisection reveals the first bad commit:

5841b992ac6283a0520986143709019bc46e8924 is the first bad commit
commit 5841b992ac6283a0520986143709019bc46e8924
Author: Markus Reiter <me@reitermark.us>
Date:   Tue Jul 17 14:23:33 2018 +0200

    Refactor `$LOAD_PATH`.
reitermarkus commented 6 years ago

Closing this, since the current handling of $LOAD_PATH is much simpler than it was before, and it's not worth special casing the verbose output just for this.

chdiza commented 6 years ago

Surely the extra output can be reduced to the following instead of eliminated entirely:

/Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib
/Library/Ruby/Gems/2.3.0/gems/json-2.1.0/lib
/Library/Ruby/Gems/2.3.0/extensions/universal-darwin-17/2.3.0/json-2.1.0
/Library/Ruby/Site
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0