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

Cannot install eglot #551

Closed
david-vicente opened this issue Jul 30, 2020 · 7 comments
Closed

Cannot install eglot #551

david-vicente opened this issue Jul 30, 2020 · 7 comments

Comments

@david-vicente
Copy link

david-vicente commented Jul 30, 2020

Directions to reproduce

Starting with a clean init file

(require 'package)
(setq package-enable-at-startup nil)

(setq straight-repository-branch "develop")
(defvar bootstrap-version)
(let ((bootstrap-file
       (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
      (bootstrap-version 5))
  (unless (file-exists-p bootstrap-file)
    (with-current-buffer
        (url-retrieve-synchronously
         "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
         'silent 'inhibit-cookies)
      (goto-char (point-max))
      (eval-print-last-sexp)))
  (load bootstrap-file nil 'nomessage))

(straight-use-package 'use-package)

(eval-when-compile
  (require 'use-package))


(use-package eglot
  :straight t
  :defer t
)

Error (emacs --debug-init)

Debugger entered--Lisp error: (void-variable tab-prefix-map)
  (define-key tab-prefix-map "p" (function project-other-tab-command))
  eval((define-key tab-prefix-map "p" (function project-other-tab-command)))
  straight--activate-package-autoloads((:type git :host github :repo "emacs-straight/project" :files ("*" (:exclude ".git")) :package "project" :local-repo "project"))
  #f(compiled-function () #<bytecode 0x15befe1>)()
  straight--transaction-exec(use-package-\(:type\ git\ :host\ github\ :repo\ \"emacs-straight/project\"\ :files\ \(\"*\"\ \(:exclude\ \"\.git\"\)\)\ :package\ \"project\"\ :local-repo\ \"project\"\)-nil-nil :now #f(compiled-function () #<bytecode 0x15befe1>))
  straight-use-package(project nil nil "Building eglot")
  straight--build-package((:type git :flavor melpa :host github :repo "joaotavora/eglot" :package "eglot" :local-repo "eglot") nil)
  #f(compiled-function () #<bytecode 0x170e205>)()
  straight--transaction-exec(use-package-\(:type\ git\ :flavor\ melpa\ :host\ github\ :repo\ \"joaotavora/eglot\"\ :package\ \"eglot\"\ :local-repo\ \"eglot\"\)-nil-nil :now #f(compiled-function () #<bytecode 0x170e205>))
  straight-use-package(eglot)
  eval-buffer(#<buffer  *load*> nil "/home/myuser/.emacs.d/init.el" nil t)  ; Reading at buffer position 723
  load-with-code-conversion("/home/myuser/.emacs.d/init.el" "/home/myuser/.emacs.d/init.el" t t)
  load("/home/myuser/.emacs.d/init" t t)
  #f(compiled-function () #<bytecode 0x1e26a1>)()
  command-line()
  normal-top-level()

Version information

  • Emacs version: 26.3
  • Operating system: Manjaro Linux 20.0.3
@raxod502
Copy link
Member

Try running M-x straight-pull-package RET project RET. Perhaps there is a bug in that version of the dependency project.

@david-vicente
Copy link
Author

david-vicente commented Jul 30, 2020

I tried that command and after that evaluating

(use-package eglot
  :straight t
)

and got this

Debugger entered--Lisp error: (void-variable tab-prefix-map)
  (define-key tab-prefix-map "p" (function project-other-tab-command))
  eval((define-key tab-prefix-map "p" (function project-other-tab-command)))
  straight--activate-package-autoloads((:type git :host github :repo "emacs-straight/project" :files ("*" (:exclude ".git")) :package "project" :local-repo "project"))
  #f(compiled-function () #<bytecode 0x128489d>)()
  straight--transaction-exec(use-package-\(:type\ git\ :host\ github\ :repo\ \"emacs-straight/project\"\ :files\ \(\"*\"\ \(:exclude\ \"\.git\"\)\)\ :package\ \"project\"\ :local-repo\ \"project\"\)-nil-nil :now #f(compiled-function () #<bytecode 0x128489d>))
  straight-use-package(project nil nil "Building eglot")
  straight--build-package((:type git :flavor melpa :host github :repo "joaotavora/eglot" :package "eglot" :local-repo "eglot") nil)
  #f(compiled-function () #<bytecode 0x11e45c9>)()
  straight--transaction-exec(use-package-\(:type\ git\ :flavor\ melpa\ :host\ github\ :repo\ \"joaotavora/eglot\"\ :package\ \"eglot\"\ :local-repo\ \"eglot\"\)-nil-nil :now #f(compiled-function () #<bytecode 0x11e45c9>))
  straight-use-package(eglot)
  (progn (straight-use-package (quote eglot)) (defvar use-package--warning5 (function (lambda (keyword err) (let ((msg (format "%s/%s: %s" ... keyword ...))) (display-warning (quote use-package) msg :error))))) (condition-case err (if (not (require (quote eglot) nil t)) (display-warning (quote use-package) (format "Cannot load %s" (quote eglot)) :error)) ((debug error) (funcall use-package--warning5 :catch err))))
  eval((progn (straight-use-package (quote eglot)) (defvar use-package--warning5 (function (lambda (keyword err) (let ((msg ...)) (display-warning (quote use-package) msg :error))))) (condition-case err (if (not (require (quote eglot) nil t)) (display-warning (quote use-package) (format "Cannot load %s" (quote eglot)) :error)) ((debug error) (funcall use-package--warning5 :catch err)))) nil)
  elisp--eval-last-sexp(nil)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)

@VitaliLiashchuk
Copy link

I experience same issue on OSX. Any thoughts about that? Maybe some workaround?

@raxod502
Copy link
Member

raxod502 commented Aug 1, 2020

This is a bug in Emacs, introduced by https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=b63c5a7efc89c23230f53a346e29e72a9b4faafc, which causes project.el to depend on a later version of Emacs than 26.3 despite the following comment:

;; Package-Requires: ((emacs "26.3"))

;; This is a GNU ELPA :core package.  Avoid using functionality that
;; not compatible with the version of Emacs recorded above.

You should be able to work around the problem by adding project to straight-built-in-pseudo-packages before loading anything that declares a dependency on project.

@gcentauri
Copy link

Just chiming in to say I experienced this as well, but it works with the newly released Emacs 27.1

Would recommend upgrading if you want to use eglot or lsp anyway since it adds the native json code

@david-vicente
Copy link
Author

Stopped happening since I upgraded to 27.1

@raxod502
Copy link
Member

This thread is being closed automatically by Tidier because it is labeled with "waiting on response" and has not seen any activity for 90 days. But don't worry—if you have any information that might advance the discussion, leave a comment and I will be happy to reopen the thread :)

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

No branches or pull requests

4 participants