Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File mode specification error: (void-variable get-root) #295

Closed
edmz opened this issue Feb 23, 2018 · 9 comments
Closed

File mode specification error: (void-variable get-root) #295

edmz opened this issue Feb 23, 2018 · 9 comments
Labels

Comments

@edmz
Copy link

edmz commented Feb 23, 2018

Using latest lsp-mode from Melpa, running Emacs pretest 26.0.91.

I get said error while the language mode hook tries to run the enable function, in my case its #'lsp-elixir-enable and also with ruby.

@casouri
Copy link

casouri commented Feb 26, 2018

Same issue here on python. Emacs 26 and latest Melpa build.

@arejensen
Copy link

Does #296 work for you?

@casouri
Copy link

casouri commented Feb 26, 2018

Maybe I did something wrong? It didn't fix it for me.

I made according changes in lsp-mode.el, recompiled it and regenerated autoloads.

@twlz0ne
Copy link
Contributor

twlz0ne commented Feb 27, 2018

Same here

Debugger entered--Lisp error: (void-variable get-root)
  (lsp--enable-stdio-client 'lsp-go :language-id "go" :language-id-fn nil :root-directory-fn get-root :command '("go-langserver" "-mode=stdio") :command-fn nil :ignore-regexps '("^langserver-go: reading on stdin, writing on stdout$") :ignore-messages nil :extra-init-params nil :initialize-fn nil)
  lsp-go-enable()
  run-hooks(change-major-mode-after-body-hook prog-mode-hook go-mode-hook)
  apply(run-hooks (change-major-mode-after-body-hook prog-mode-hook go-mode-hook))
  run-mode-hooks(go-mode-hook)
  go-mode()
  set-auto-mode-0(go-mode nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil t)
  find-file-noselect-1(#<buffer main.go> "~/.scratch/go/src/hello-world/main.go" nil nil "~/Dropbox/scratch/go/src/hello-world/main.go" (129722387 16777220))
  find-file-noselect("~/.scratch/go/src/hello-world/main.go" nil nil t)
  find-file("~/.scratch/go/src/hello-world/main.go" t)
  find-alternate-file("~/.scratch/go/src/hello-world/main.go" t)
  funcall-interactively(find-alternate-file "~/.scratch/go/src/hello-world/main.go" t)
  call-interactively(find-alternate-file nil nil)
  command-execute(find-alternate-file)
  • Emacs 26.0.91 / 27.0.50
  • lsp-mode-20180224.246

@vibhavp
Copy link
Member

vibhavp commented Feb 27, 2018

Cannot reproduce this here. Have you tried re-compiling/re-installing both the language client package and lsp-mode?

@edmz
Copy link
Author

edmz commented Feb 27, 2018 via email

@twlz0ne
Copy link
Contributor

twlz0ne commented Feb 27, 2018

@vibhavp This issue recurs on my computer 100%.

Here is the test code: https://gist.github.com/twlz0ne/38f9f972574abcb860ee06c33398ee97

Just 1)Download 2)Run.

@fleimgruber
Copy link

fleimgruber commented Feb 28, 2018

FWIW, experienced this in syl20bnr/spacemacs#10391. Fixed it as in #296 plus

re-compiling/re-installing both the language client package and lsp-mode

@vv111y
Copy link

vv111y commented Mar 7, 2018

Not working in spacemacs, my backtrace and config info is here syl20bnr/spacemacs#10449

I removed python and lsp layers and then reinstalled (this removes and reinstalls all relevant packages). No change. No compile errors either.

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

No branches or pull requests

7 participants