emacs-lsp/lsp-dart

Treemacs functions not working

migueldeoleiros opened this issue · 2 comments

Describe the bug
When I run any of the functions that should show a treemacs interface I get the next error:

treemacs--do-expand-extension-node: Args out of range: #s(treemacs-extension lsp-treemacs-generic-node #[0 "" [treemacs-lsp-treemacs-generic-node-closed] 1 ""] #[0 "" [treemacs-lsp-treemacs-generic-node-open] 1 ""] #[512 "�\"" [lsp-treemacs--generic-icon nil] 5 "

(fn &optional BTN ITEM)"] #[512 "�\"" [lsp-treemacs--generic-icon t] 5 "

(fn &optional BTN ITEM)"] #[768 "��\"�\"�!�\0���!!!;\06\0p�����\"\"%\"�;\0��!!" [plist-get :children :children-async functionp lsp-treemacs-filter-if-needed make-byte-code 257 "!!�\0rq�!!)" vconcat vector ...] 17 "

(fn &optional BTN ITEM CALLBACK)"] #[512 "�\"" [plist-get :key] 5 "

(fn &optional BTN ITEM)"] #[512 "�\"" [plist-get :label] 5 "

(fn &optional BTN ITEM)"] #[512 "" [nil] 3 "

(fn &optional BTN ITEM)"] ...), 14

Version
Arch Linux
[LSP Dart] 1.24.2 at 2024.02.13 @ Emacs 29.2
[Dart SDK] Dart SDK version: 3.2.6 (stable) (Wed Jan 24 13:41:58 2024 +0000) on "linux_x64

To Reproduce
The recommended init.el:

(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)
(package-initialize)

(setq package-selected-packages 
  '(dart-mode lsp-mode lsp-dart lsp-treemacs flycheck company
    ;; Optional packages
    lsp-ui company hover))

(when (cl-find-if-not #'package-installed-p package-selected-packages)
  (package-refresh-contents)
  (mapc #'package-install package-selected-packages))

(add-hook 'dart-mode-hook 'lsp)

(setq gc-cons-threshold (* 100 1024 1024)
      read-process-output-max (* 1024 1024))

and run a funciton like M-x lsp-dart-show-outline

Expected behavior
Treemacs should show up instead of an error

@migueldeoleiros I can't repro this with latest master of lsp-treemacs, treemacs and lsp-dart could you check if you have latest of them please?

Thank you, it seems I had a miss match in some of the dependencies (treemacs). Solved it by doing a clean install of all of them.
I should have tried it before, M-x package-upgrade-all didn't do it for some reason.