Homebrew / brew

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

odeprecated: blows up audit #604

Closed ilovezfs closed 8 years ago

ilovezfs commented 8 years ago

Starting from a clean brew installation

iMac-TMP:~ joe$ brew tap homebrew/science
==> Tapping homebrew/science
Cloning into '/usr/local/Library/Taps/homebrew/homebrew-science'...
remote: Counting objects: 609, done.
remote: Compressing objects: 100% (607/607), done.
remote: Total 609 (delta 1), reused 65 (delta 0), pack-reused 0
Receiving objects: 100% (609/609), 525.55 KiB | 689.00 KiB/s, done.
Resolving deltas: 100% (1/1), done.
Checking connectivity... done.
Warning: Calling MacOS.clang_version is deprecated!
Use DevelopmentTools.clang_version instead.
/usr/local/Library/Taps/homebrew/homebrew-science/octave.rb:23:in `<class:Octave>'

Tapped 596 formulae (628 files, 1.7M)
iMac-TMP:~ joe$ brew audit --strict analysis
homebrew/science/analysis:
  * Formula should have a desc (Description).
  * Use `assert_match` instead of `assert ...include?`
Error: 2 problems in 1 formula
iMac-TMP:~ joe$ brew tap --full homebrew/science
==> Unshallowing homebrew/science
remote: Counting objects: 18230, done.
remote: Compressing objects: 100% (7693/7693), done.
remote: Total 18230 (delta 11501), reused 17241 (delta 10512), pack-reused 0
Receiving objects: 100% (18230/18230), 4.79 MiB | 1.28 MiB/s, done.
Resolving deltas: 100% (11501/11501), completed with 555 local objects.
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
From https://github.com/Homebrew/homebrew-science
 * [new tag]         2014-01    -> 2014-01
 * [new tag]         2014-02    -> 2014-02
 * [new tag]         2014-03    -> 2014-03
 * [new tag]         2014-04    -> 2014-04
 * [new tag]         2014-05    -> 2014-05
 * [new tag]         2014-06    -> 2014-06
 * [new tag]         2014-07    -> 2014-07
 * [new tag]         2014-08    -> 2014-08
 * [new tag]         2014-09    -> 2014-09
 * [new tag]         2014-10    -> 2014-10
 * [new tag]         2014-11    -> 2014-11
 * [new tag]         2014-12    -> 2014-12
 * [new tag]         2015-01    -> 2015-01
 * [new tag]         2015-02    -> 2015-02
 * [new tag]         2015-03    -> 2015-03
 * [new tag]         2015-04    -> 2015-04
 * [new tag]         2015-05    -> 2015-05
 * [new tag]         2015-06    -> 2015-06
iMac-TMP:~ joe$ brew audit --strict analysis
Warning: Calling Formula.sha1 is deprecated!
Use Formula.sha256 instead.
/usr/local/Library/Taps/homebrew/homebrew-science/analysis.rb:6:in `<class:Analysis>'

Warning: Calling SoftwareSpec#sha1 is deprecated!
Use SoftwareSpec#sha256 instead.
/usr/local/Library/Homebrew/compat/sha1.rb:4:in `sha1'

Warning: Calling Resource#sha1 is deprecated!
Use Resource#sha256 instead.
/usr/local/Library/Homebrew/compat/sha1.rb:11:in `sha1'

Warning: Calling Formula.sha1 is deprecated!
Use Formula.sha256 instead.
/usr/local/Library/Taps/homebrew/homebrew-science/analysis.rb:6:in `<class:Analysis>'

Warning: Calling SoftwareSpec#sha1 is deprecated!
Use SoftwareSpec#sha256 instead.
/usr/local/Library/Homebrew/compat/sha1.rb:4:in `sha1'

Warning: Calling Resource#sha1 is deprecated!
Use Resource#sha256 instead.
/usr/local/Library/Homebrew/compat/sha1.rb:11:in `sha1'

Warning: Calling Formula.sha1 is deprecated!
Use Formula.sha256 instead.
/usr/local/Library/Taps/homebrew/homebrew-science/analysis.rb:6:in `<class:Analysis>'

Warning: Calling SoftwareSpec#sha1 is deprecated!
Use SoftwareSpec#sha256 instead.
/usr/local/Library/Homebrew/compat/sha1.rb:4:in `sha1'

Warning: Calling Resource#sha1 is deprecated!
Use Resource#sha256 instead.
/usr/local/Library/Homebrew/compat/sha1.rb:11:in `sha1'

Warning: Calling Formula.sha1 is deprecated!
Use Formula.sha256 instead.
/usr/local/Library/Taps/homebrew/homebrew-science/analysis.rb:6:in `<class:Analysis>'

Warning: Calling SoftwareSpec#sha1 is deprecated!
Use SoftwareSpec#sha256 instead.
/usr/local/Library/Homebrew/compat/sha1.rb:4:in `sha1'

Warning: Calling Resource#sha1 is deprecated!
Use Resource#sha256 instead.
/usr/local/Library/Homebrew/compat/sha1.rb:11:in `sha1'

Warning: Calling Formula.sha1 is deprecated!
Use Formula.sha256 instead.
/usr/local/Library/Taps/homebrew/homebrew-science/analysis.rb:6:in `<class:Analysis>'

Warning: Calling SoftwareSpec#sha1 is deprecated!
Use SoftwareSpec#sha256 instead.
/usr/local/Library/Homebrew/compat/sha1.rb:4:in `sha1'

Warning: Calling Resource#sha1 is deprecated!
Use Resource#sha256 instead.
/usr/local/Library/Homebrew/compat/sha1.rb:11:in `sha1'

homebrew/science/analysis:
  * Formula should have a desc (Description).
  * Use `assert_match` instead of `assert ...include?`
Error: 2 problems in 1 formula
iMac-TMP:~ joe$ export HOMEBREW_DEVELOPER=1
iMac-TMP:~ joe$ brew audit --strict analysis
Error: Calling Formula.sha1 is deprecated!
Use Formula.sha256 instead.
/usr/local/Library/Taps/homebrew/homebrew-science/analysis.rb:6:in `<class:Analysis>'
Please report this bug:
    https://git.io/brew-troubleshooting
/usr/local/Library/Homebrew/utils.rb:139:in `odeprecated'
/usr/local/Library/Homebrew/compat/sha1.rb:3:in `sha1'
/usr/local/Library/Taps/homebrew/homebrew-science/analysis.rb:6:in `<class:Analysis>'
/usr/local/Library/Taps/homebrew/homebrew-science/analysis.rb:3:in `load_formula'
/usr/local/Library/Homebrew/formulary.rb:25:in `module_eval'
/usr/local/Library/Homebrew/formulary.rb:25:in `load_formula'
/usr/local/Library/Homebrew/formulary.rb:204:in `klass'
/usr/local/Library/Homebrew/formulary.rb:78:in `get_formula'
/usr/local/Library/Homebrew/formulary.rb:255:in `from_contents'
/usr/local/Library/Homebrew/formula_versions.rb:37:in `block in formula_at_revision'
/usr/local/Library/Homebrew/utils.rb:481:in `nostdout'
/usr/local/Library/Homebrew/formula_versions.rb:37:in `formula_at_revision'
/usr/local/Library/Homebrew/formula_versions.rb:63:in `block in revision_map'
/usr/local/Library/Homebrew/formula_versions.rb:24:in `block (2 levels) in rev_list'
/usr/local/Library/Homebrew/utils/popen.rb:18:in `block in popen'
/usr/local/Library/Homebrew/utils/popen.rb:15:in `popen'
/usr/local/Library/Homebrew/utils/popen.rb:15:in `popen'
/usr/local/Library/Homebrew/utils/popen.rb:3:in `popen_read'
/usr/local/Library/Homebrew/formula_versions.rb:23:in `block in rev_list'
/usr/local/Library/Homebrew/extend/pathname.rb:328:in `block in cd'
/usr/local/Library/Homebrew/extend/pathname.rb:328:in `chdir'
/usr/local/Library/Homebrew/extend/pathname.rb:328:in `cd'
/usr/local/Library/Homebrew/formula_versions.rb:21:in `rev_list'
/usr/local/Library/Homebrew/formula_versions.rb:62:in `revision_map'
/usr/local/Library/Homebrew/cmd/audit.rb:623:in `audit_revision'
/usr/local/Library/Homebrew/cmd/audit.rb:1001:in `audit'
/usr/local/Library/Homebrew/cmd/audit.rb:69:in `block in audit'
/usr/local/Library/Homebrew/cmd/audit.rb:65:in `each'
/usr/local/Library/Homebrew/cmd/audit.rb:65:in `audit'
/usr/local/Library/Homebrew/brew.rb:87:in `<main>'

CC @MikeMcQuaid

ilovezfs commented 8 years ago

Also broke brew cat and brew livecheck when HOMEBREW_DEVELOPER is set

Josephs-MacBook-Pro:~ joe$ brew cat octave
Error: Calling MacOS.clang_version is deprecated!
Use DevelopmentTools.clang_version instead.
/usr/local/Library/Taps/homebrew/homebrew-science/octave.rb:23:in `<class:Octave>'
Please report this bug:
    https://git.io/brew-troubleshooting
/usr/local/Library/Homebrew/utils.rb:139:in `odeprecated'
/usr/local/Library/Homebrew/compat/macos.rb:126:in `clang_version'
/usr/local/Library/Taps/homebrew/homebrew-science/octave.rb:23:in `<class:Octave>'
/usr/local/Library/Taps/homebrew/homebrew-science/octave.rb:1:in `load_formula'
/usr/local/Library/Homebrew/formulary.rb:25:in `module_eval'
/usr/local/Library/Homebrew/formulary.rb:25:in `load_formula'
/usr/local/Library/Homebrew/formulary.rb:42:in `load_formula_from_path'
/usr/local/Library/Homebrew/formulary.rb:91:in `load_file'
/usr/local/Library/Homebrew/formulary.rb:82:in `klass'
/usr/local/Library/Homebrew/formulary.rb:78:in `get_formula'
/usr/local/Library/Homebrew/formulary.rb:215:in `factory'
/usr/local/Library/Homebrew/formulary.rb:371:in `find_with_priority'
/usr/local/Library/Homebrew/extend/ARGV.rb:20:in `block in formulae'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in `map'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in `formulae'
/usr/local/Library/Homebrew/cmd/cat.rb:9:in `cat'
/usr/local/Library/Homebrew/brew.rb:87:in `<main>'
Josephs-MacBook-Pro:~ joe$ brew livecheck octave
Error: Calling MacOS.clang_version is deprecated!
Use DevelopmentTools.clang_version instead.
/usr/local/Library/Taps/homebrew/homebrew-science/octave.rb:23:in `<class:Octave>'
/usr/local/Library/Homebrew/utils.rb:139:in `odeprecated'
/usr/local/Library/Homebrew/compat/macos.rb:126:in `clang_version'
/usr/local/Library/Taps/homebrew/homebrew-science/octave.rb:23:in `<class:Octave>'
/usr/local/Library/Taps/homebrew/homebrew-science/octave.rb:1:in `load_formula'
/usr/local/Library/Taps/youtux/homebrew-livecheck/livecheck/extend/formulary.rb:9:in `module_eval'
/usr/local/Library/Taps/youtux/homebrew-livecheck/livecheck/extend/formulary.rb:9:in `load_formula'
/usr/local/Library/Homebrew/formulary.rb:42:in `load_formula_from_path'
/usr/local/Library/Homebrew/formulary.rb:91:in `load_file'
/usr/local/Library/Homebrew/formulary.rb:82:in `klass'
/usr/local/Library/Homebrew/formulary.rb:78:in `get_formula'
/usr/local/Library/Homebrew/formulary.rb:215:in `factory'
/usr/local/Library/Homebrew/formulary.rb:371:in `find_with_priority'
/usr/local/Library/Homebrew/extend/ARGV.rb:20:in `block in formulae'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in `map'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in `formulae'
/usr/local/Library/Taps/youtux/homebrew-livecheck/cmd/brew-livecheck.rb:107:in `<top (required)>'
/usr/local/Cellar/ruby/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Cellar/ruby/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Library/Homebrew/brew.rb:22:in `require?'
/usr/local/Library/Homebrew/brew.rb:93:in `<main>'
ilovezfs commented 8 years ago

And CI is toast: http://bot.brew.sh/job/Homebrew%20Core%20Pull%20Requests/5573/version=el_capitan/console

ilovezfs commented 8 years ago

And brew tap

/usr/local/Library/Taps/homebrew/homebrew-science/octave.rb:23:in `<class:Octave>'
Error: Cannot tap homebrew/science: invalid syntax in tap!
ilovezfs commented 8 years ago

Closed via https://github.com/Homebrew/brew/commit/19a77c816ebb66301b7a74fea513245043ba5aae and https://github.com/Homebrew/homebrew-science/pull/3905

MikeMcQuaid commented 8 years ago

Thanks for the quick fix. FWIW: everything will break with HOMEBREW_DEVELOPER set as a way to get these things fixed.

ilovezfs commented 8 years ago

@MikeMcQuaid You're welcome. That makes sense. Only qualm I have about that is unsetting HOMEBREW_DEVELOPER has consequences for how brew update behaves that can potentially be even more disruptive, so it may be useful to have a more surgical override than just un-setting HOMEBREW_DEVELOPER.