Skip to content
This repository has been archived by the owner on Apr 25, 2022. It is now read-only.

brew tm install results in “Error: wrong number of arguments” #6

Open
2 tasks
claui opened this issue Sep 18, 2017 · 1 comment
Open
2 tasks

brew tm install results in “Error: wrong number of arguments” #6

claui opened this issue Sep 18, 2017 · 1 comment

Comments

@claui
Copy link
Owner

claui commented Sep 18, 2017

It seems that a few days ago, parts of the Homebrew core have been refactored in a way that seems to break homebrew-textmate:

$ brew tm install 6502-assembler.rb
[…]
==> Installing Cask tm-6502-assembler
Error: wrong number of arguments (2 for 1)

Breakage like this is to be expected because Homebrew’s infrastructure currently is not designed to allow for external commands (like brew tm) to introduce new artifact types or stanzas. With the custom tmbundle stanza being a crucial feature of brew tm, I had to find another way to get this done; I ultimately managed to implement it with only a few lines of code while at the same time depending on as few Homebrew-specific implementation details as possible (i. e., Hbc::Artifact and Hbc::DSL).

Unfortunately, Homebrew’s recent PR (see above) has refactored exactly those two classes and many more.

To fix this, I think we need figure out the following things:

  • What has happened to the Hbc::Artifact::Base::me? method? (If I recall correctly, HBC used to call this to figure out which handler classes are responsible.)

  • In Hbc::DSL, what needs to be added to #artifacts[:tmbundle] to gain back the functionality?

@reitermarkus Can you help shed light on this?

@reitermarkus
Copy link

I am quite into TextMate myself as you can see here: https://github.com/reitermarkus/homebrew-tap/tree/master/Casks

Off the top of my head: Hbc::Artifact::Base -> Hbc::Artifact::Abstract

Anything else you'll have to figure out yourself, since this API is as private as it gets. 😉

You could however make it more resistant to change without even using the internal classes with something like

  def tmbundle(bundle)
    artifact bundle, target: "#{tmbundledir}/#{bundle}"
  end

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants