brew-stuff / homebrew-emacs

Various Emacs formulae for the Homebrew package manager
Other
62 stars 14 forks source link

Calling 'depends_on :emacs' is deprecated #721

Closed asf-stripe closed 6 years ago

asf-stripe commented 6 years ago

Homebrew as it is today has started complaining about some formulas in dunn/homebrew-emacs:

Warning: Calling 'depends_on :emacs' is deprecated!
Use 'depends_on "emacs"' instead.
/usr/local/Homebrew/Library/Taps/dunn/homebrew-emacs/Formula/tablist.rb:10:in `<class:Tablist>'
Please report this to the dunn/emacs tap!

Warning: Calling 'depends_on :emacs' is deprecated!
Use 'depends_on "emacs"' instead.
/usr/local/Homebrew/Library/Taps/dunn/homebrew-emacs/Formula/let-alist.rb:9:in `<class:LetAlist>'
Please report this to the dunn/emacs tap!

Warning: Calling 'depends_on :emacs' is deprecated!
Use 'depends_on "emacs"' instead.
/usr/local/Homebrew/Library/Taps/dunn/homebrew-emacs/Formula/tern.rb:12:in `<class:Tern>'
Please report this to the dunn/emacs tap!

Warning: Calling 'depends_on :emacs' is deprecated!
Use 'depends_on "emacs"' instead.
/usr/local/Homebrew/Library/Taps/dunn/homebrew-emacs/Formula/pdf-tools.rb:10:in `<class:PdfTools>'
Please report this to the dunn/emacs tap!

This is breaking brew upgrade when formulae from dunn/homebrew-emacs (or even homebrew/emacs) are installed:

Error: no implicit conversion of Symbol into String
Please report this bug:
  https://docs.brew.sh/Troubleshooting.html
/usr/local/Homebrew/Library/Homebrew/formulary.rb:363:in `extname'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:363:in `loader_for'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:280:in `factory'
/usr/local/Homebrew/Library/Homebrew/dependency.rb:33:in `to_formula'
/usr/local/Homebrew/Library/Homebrew/dependency.rb:96:in `block in expand'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/delegate.rb:341:in `each'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/delegate.rb:341:in `block in delegating_block'
/usr/local/Homebrew/Library/Homebrew/dependency.rb:83:in `expand'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1478:in `recursive_dependencies'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1490:in `runtime_dependencies'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:419:in `runtime_requirements'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:432:in `expand_requirements'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:376:in `compute_dependencies'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:133:in `verify_deps_exist'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:126:in `prelude'
/usr/local/Homebrew/Library/Homebrew/cmd/upgrade.rb:141:in `upgrade_formula'
/usr/local/Homebrew/Library/Homebrew/cmd/upgrade.rb:93:in `block in upgrade'
/usr/local/Homebrew/Library/Homebrew/cmd/upgrade.rb:90:in `each'
/usr/local/Homebrew/Library/Homebrew/cmd/upgrade.rb:90:in `upgrade'
/usr/local/Homebrew/Library/Homebrew/brew.rb:100:in `<main>'

I guess they have really started deprecating that symbol form.

dunn commented 6 years ago

I saw that when it was merged, but I did think I would have more time to update these formulae. I'll try to get to it tonight, unless someone beats me to the punch.

Of course we could reimplement the EmacsRequirement in this tap, if it's important enough to provide the option to use a non-Homebrew version of Emacs. (The requirement actually started here, then was moved into the core.)

dunn commented 6 years ago

Feel free to test https://github.com/dunn/homebrew-emacs/pull/722 locally; otherwise I'll merge when green.

dunn commented 6 years ago

Sorry for the delay on this; tests failed then I lost most of the weekend to a migraine.