emacs-tree-sitter / elisp-tree-sitter

Emacs Lisp bindings for tree-sitter
https://emacs-tree-sitter.github.io
MIT License
822 stars 74 forks source link

Install broken for melpa-stable? #177

Closed rolandwalker closed 3 years ago

rolandwalker commented 3 years ago

Pygn-mode CI:

Is failing like this:

Run "$HOME/.cask/bin/cask" install
Loading package information... done
Package operations: 7 installs, 0 removals
…
  - Installing [ 4/7] tree-sitter-langs (0.10.4)... downloading
  - Installing [ 4/7] tree-sitter-langs (0.10.4)... done
  - Installing [ 5/7] tree-sitter (0.15.2)... already present
  - Installing [ 6/7] emacs (26.1)... already present
  - Installing [ 7/7] tsc (0.15.2)... already present
/home/runner/.cask/bin/cask emacs -Q --batch --eval             \
    "(progn                                \
      (setq byte-compile-error-on-warn t)  \
      (batch-byte-compile))" *.el
tree-sitter-langs: Installing grammar bundle v0.10.6-alpha (was vnil)
Contacting host: github.com:443
[tree-sitter-langs] Running (tar -xvzf tree-sitter-grammars-linux-0.10.6-alpha.tar.gz) in /home/runner/work/pygn-mode/pygn-mode/.cask/26.3/elpa/tree-sitter-langs-0.10.6alpha/bin/
Eager macro-expansion failure: (error "Error calling (tar -xvzf tree-sitter-grammars-linux-0.10.6-alpha.tar.gz), exit code is 2")

I don't know Cask very well, but apparently it is installing tree-sitter-langs v0.10.6-alpha because that's the latest tag (and there's no way to pin Cask to an earlier version). Then it's attempting to install v0.10.6-alpha artifacts which don't exist. The Caskfile is using melpa-stable as the source.

Is there a way to override the version attempted for the grammar bundle install? If not, would you accept a PR to add an override via getenv?

ubolonton commented 3 years ago

I don't know Cask very well, but apparently it is installing tree-sitter-langs v0.10.6-alpha because that's the latest tag (and there's no way to pin Cask to an earlier version). Then it's attempting to install v0.10.6-alpha artifacts which don't exist.

I entirely forgot about melpa-stable... The above tag will have binaries as soon as I fix the release pipeline. I'll also change the MELPA recipe to restrict it to a subset of tags.

The Caskfile is using melpa-stable as the source.

I think melpa-stable is discouraged in general. There's even a proposal to abolish it. Maybe it's better to change the Caskfile to use melpa? (In my own experience, melpa-stable got broken more frequently than melpa when I was still using it.)

Is there a way to override the version attempted for the grammar bundle install? If not, would you accept a PR to add an override via getenv?

There's no way to override that at the moment. I think changing tree-sitter-langs--bundle-version to a defvar is cleaner than getenv. However, it wouldn't help in this case, since cask doesn't have pre-install hooks.

ubolonton commented 3 years ago

The release pipeline is working now, so the pygn CI pipeline should work if you re-run it.

rolandwalker commented 3 years ago

Thank you!