emacs-lsp / dap-mode

Emacs :heart: Debug Adapter Protocol
https://emacs-lsp.github.io/dap-mode
GNU General Public License v3.0
1.31k stars 182 forks source link

void-function make-treemacs-theme #309

Closed shackra closed 4 years ago

shackra commented 4 years ago

Was updating my packages and discovered this error in dap-mode.

Debugger entered--Lisp error: (void-function make-treemacs-theme)
  make-treemacs-theme(:name "Default" :path "/home/jorge/.emacs.d/straight/build/treemacs/icons/default" :gui-icons #<hash-table equal 0/300 0x1590cea93629> :tui-icons #<hash-table equal 0/300 0x1590cea93649>)
  byte-code("\303\304\305\306\307$\303\304\305\306\307$\310\311\312\313\314\10\315\"\316\6\7\317\6\10&\10\320\321\2\"\210\211\31\211\322H\314\1\323\"\324\325\326!\2045\0\324..." [treemacs-dir treemacs--current-theme treemacs--icon-size make-hash-table :size 300 :test equal make-treemacs-theme :name "Default" :path f-join "icons/default" :gui-icons :tui-icons add-to-list treemacs--themes 2 "vsc/root-closed.png" "" image-type-available-p png s-ends-with\? "root.png" round 0.909 1.1818 imagemagick create-image nil :ascent center :width :height copy-sequence (:background "unspecified-bg") (:background "unspecified-bg") propertize " " display img-selected img-unselected 3 4 get-text-property 0 treemacs--icon-symbols root (lambda (def-tmp-var) (defvar treemacs-icon-root def-tmp-var)) ...] 20)
  require(treemacs-icons)
  byte-code("\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\300\310!\210\300\311!\210\300\312!\210\300\313!\210\300\314!\210\300\315..." [require dash treemacs-macros treemacs-customization treemacs-logging treemacs-themes treemacs-icons treemacs-faces treemacs-visuals treemacs-rendering treemacs-core-utils treemacs-scope treemacs-follow-mode treemacs-filewatch-mode treemacs-mode treemacs-interface treemacs-mouse-interface treemacs-persistence treemacs-tags treemacs-tag-follow-mode treemacs-async treemacs-compatibility treemacs-workspaces treemacs-fringe-indicator treemacs-header-line treemacs-extensions] 2)
  require(treemacs)
  byte-code("\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\207" [require treemacs s f treemacs-extensions treemacs-icons lsp-mode] 2)
  require(lsp-treemacs)
  byte-code("\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\300\310!\210\300\311!\210\312\313\314\315\316DD\317\320\321\322\323&\7..." [require dap-mode wid-edit dash bui comint compile gdb-mi lsp-treemacs dap-ui-repl custom-declare-variable dap-ui-stack-frames-loaded funcall function #f(compiled-function () #<bytecode 0x1e0000171e91>) "Stack frames loaded." :type hook :group dap-ui dap-ui-breakpoints-ui-list-displayed-hook #f(compiled-function () #<bytecode 0x1e0000171e91>) "List of functions to run when breakpoints list is ..." custom-declare-face dap-ui-compile-errline ((t (:inherit compilation-error))) "Face used for marking the line on which an error o..." dap-ui-sessions-active-session-face ((t :weight bold)) "Face used for marking current session in sessions ..." dap-ui-sessions-terminated-face ((t :inherit shadow)) "Face used for marking terminated session." dap-ui-sessions-terminated-active-face ((t :inherit shadow :weight bold)) dap-ui-sessions-running-face ((t)) dap-ui-locals-scope-face ((t :inherit font-lock-function-name-face :weight bold :underline t)) "Face used for scopes in locals view." dap-ui-locals-variable-leaf-face ((t :inherit font-lock-builtin-face :italic t)) "Face used for variables that does not have nested ..." dap-ui-locals-variable-face ((t :inherit font-lock-builtin-face :weight bold)) dap-ui-sessions-thread-face ((t)) "Face used for threads in sessions view." dap-ui-sessions-thread-active-face ((t :weight bold)) ...] 8)
  (dap-ui-mode 1)
  (progn (dap-mode 1) (dap-ui-mode 1) (require 'dap-firefox) (dap-firefox-setup) (require 'dap-chrome) (dap-chrome-setup) (require 'dap-python) t)
  (condition-case err (progn (dap-mode 1) (dap-ui-mode 1) (require 'dap-firefox) (dap-firefox-setup) (require 'dap-chrome) (dap-chrome-setup) (require 'dap-python) t) ((debug error) (funcall use-package--warning59 :config err)))
  (if (not (require 'dap-mode nil t)) (display-warning 'use-package (format "Cannot load %s" 'dap-mode) :error) (condition-case err (progn (dap-mode 1) (dap-ui-mode 1) (require 'dap-firefox) (dap-firefox-setup) (require 'dap-chrome) (dap-chrome-setup) (require 'dap-python) t) ((debug error) (funcall use-package--warning59 :config err))))
  (condition-case err (if (not (require 'dap-mode nil t)) (display-warning 'use-package (format "Cannot load %s" 'dap-mode) :error) (condition-case err (progn (dap-mode 1) (dap-ui-mode 1) (require 'dap-firefox) (dap-firefox-setup) (require 'dap-chrome) (dap-chrome-setup) (require 'dap-python) t) ((debug error) (funcall use-package--warning59 :config err)))) ((debug error) (funcall use-package--warning59 :catch err)))
  eval-buffer(#<buffer  *load*-87502> nil "/home/jorge/.emacs.d/README.el" nil t)  ; Reading at buffer position 29386
  load-with-code-conversion("/home/jorge/.emacs.d/README.el" "/home/jorge/.emacs.d/README.el" nil nil)
  load("/home/jorge/.emacs.d/README.el" nil nil t)
  load-file("~/.emacs.d/README.el")
  (progn (load-file elfile) (message "Tiempo de inicialización %.2fs" (float-time (time-subtract (current-time) my-start-time))))
  (let ((orgfile (concat user-emacs-directory "README.org")) (elfile (concat user-emacs-directory "README.el"))) (if (or (not (file-exists-p elfile)) (file-newer-than-file-p orgfile elfile)) (progn (my-tangle-config-org orgfile elfile))) (progn (load-file elfile) (message "Tiempo de inicialización %.2fs" (float-time (time-subtract (current-time) my-start-time)))))
  eval-buffer(#<buffer  *load*> nil "/home/jorge/.emacs.d/init.el" nil t)  ; Reading at buffer position 3740
  load-with-code-conversion("/home/jorge/.emacs.d/init.el" "/home/jorge/.emacs.d/init.el" t t)
  load("/home/jorge/.emacs.d/init" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode 0xf03d8d1acb638fb>) #f(compiled-function () #<bytecode 0x81a386fa1b19353>) t)
  command-line()
  normal-top-level()

treemacs has no make-treemacs-theme, but it does have treemacs-theme. In any case, I'm not sure what's going wrong that make-treemacs-theme is void. I have dap-mode at commit f52fa4327147bccb7c93300d5f522e2fdcff1a70 currently.

yyoncho commented 4 years ago

This is caused by lsp-treemacs byte-compiled against old treemacs.

shackra commented 4 years ago

so, using something like byte-force-recompile should do the trick or deleting the .elc is still required?

El vie., 26 de jun. de 2020 a la(s) 12:51, Ivan Yonchovski ( notifications@github.com) escribió:

This is caused by lsp-treemacs byte-compiled against old treemacs.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/emacs-lsp/dap-mode/issues/309#issuecomment-650339955, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIBT4G7QWRYCY6OTAWGXKTRYTU2LANCNFSM4OJSLYDA .

yyoncho commented 4 years ago

I guess it might fix the issue.

shackra commented 4 years ago

indeed combining both approaches fixed the issue.

kriechers commented 4 years ago

I do have the same problem after updating treemacs. what exactly do you mean by "combining both approaches"? And how do you "byte-force-recompile" something? - sorry, I am still learning... And which .elc must be deleted? The treemacs.elc in the .emacs.d/elpa/treemacs directory?

yyoncho commented 4 years ago

sorry, I am still learning...

I recommend you, in this case, to delete elpa dir and download the latest of everything. package.el is a bit unreliable when it updates packages in running emacs.

kriechers commented 4 years ago

thanks for your reply. In fact deleting all .elc files in the treemacs directory and byte-force-recomping the directory worked and I can use treemacs again. Hope I didn't mess anything up.

aidin36 commented 3 years ago

Deleting lsp-treemacs package and re-installing it might be easier for some people (like me!).

Thanks guys for this question and solutions. Saved my day!