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

straight.el stuck at building tsc #61

Closed dwuggh closed 3 years ago

dwuggh commented 3 years ago

with recent commits, emacs stuck at building tree-sitter -> building tsc. Old version works fine(without tsc)

my config is same as doc:

(straight-register-package
 '(tsc :host github
       :repo "ubolonton/emacs-tree-sitter"
       :files ("core/*.el")))
;; Base framework, syntax highlighting.
(straight-use-package
 '(tree-sitter :host github
               :repo "ubolonton/emacs-tree-sitter"
               :files ("lisp/*.el")))
;; Language bundle.
(straight-use-package
 '(tree-sitter-langs :host github
                     :repo "ubolonton/emacs-tree-sitter"
                     :files ("langs/*.el" "langs/queries")))
ubolonton commented 3 years ago

Emacs will try to download the dynamic module from GitHub when installing tsc. One possibility is a temporary network issue.

It could also be an issue with straight. Maybe you can try (straight-pull-package-and-deps "tree-sitter"), or clearing straight's cache. This minimal config works for me https://gist.github.com/ubolonton/651788f3ae3d26cc58c2cbcd9494574d.

shackra commented 3 years ago

well, I cannot build either:

straight--convert-recipe: Could not find package tsc in recipe repositories: (org-elpa melpa gnu-elpa-mirror emacsmirror-mirror)

it seems like we need to register a new recipe for "tsc".

shackra commented 3 years ago

okay, tsc refers to files in https://github.com/ubolonton/emacs-tree-sitter/tree/master/core. this is the Rust part of the project and I believe this package should be available somewhere (i.e.: Melpa) so Straight can fetch it and do whatever it needs to do in order to build emacs-tree-sitter.

shackra commented 3 years ago

I also have this:

;; new package
(use-package tsc
  :straight (tsc :host github
                 :repo "ubolonton/emacs-tree-sitter"
                 :files ("core/*.el")))

(use-package tree-sitter
  :straight (tree-sitter :host github
                         :repo "ubolonton/emacs-tree-sitter"
                         :files ("lisp/*.el" "src" "Cargo.toml" "Cargo.lock"))
  :hook ((after-init . global-tree-sitter-mode)
         ((go-mode python-mode js-mode typescript-mode rust-mode) . tree-sitter-hl-mode)))

(use-package tree-sitter-langs
  :straight (tree-sitter-langs :host github
                               :repo "ubolonton/emacs-tree-sitter"
                               :files ("langs/*.el" "langs/queries")))

and now it works :)

dwuggh commented 3 years ago

Emacs will try to download the dynamic module from GitHub when installing tsc. One possibility is a temporary network issue.

It could also be an issue with straight. Maybe you can try (straight-pull-package-and-deps "tree-sitter"), or clearing straight's cache. This minimal config works for me https://gist.github.com/ubolonton/651788f3ae3d26cc58c2cbcd9494574d.

Thanks, this was indeed a network issue.