Alexander-Miller / treemacs

GNU General Public License v3.0
2.05k stars 151 forks source link

lsp native compilation broken #1073

Closed wyuenho closed 7 months ago

wyuenho commented 7 months ago

2f77c9828116767f1be5cfdd3f82d2bed7ceea93 seems to have broken native compilation of lsp-mode.

lsp-mode has a bunch of files requiring treemacs-treelib directly without requiring treemacs-mouse-interface directly or indrectly, but treemacs-define-doubleclick-action depends on treemacs-mouse-interface, which may not be available when the macro expands during compilation, even if that function is autoloaded, because it's not required by treemacs.el.

*Async-native-compile-log*

/Users/wyuenho/.emacs.d/elpa/lsp-treemacs-20230811.611/lsp-treemacs.el: Error: Symbol's function definition is void treemacs-define-doubleclick-action
/Users/wyuenho/.emacs.d/elpa/lsp-metals-20231017.911/lsp-metals-treeview.el: Error: Symbol's function definition is void treemacs-define-doubleclick-action
/Users/wyuenho/.emacs.d/elpa/lsp-metals-20231017.911/lsp-metals.el: Error: Symbol's function definition is void treemacs-define-doubleclick-action
/Users/wyuenho/.emacs.d/elpa/lsp-java-20230922.1154/dap-java.el: Error: Symbol's function definition is void treemacs-define-doubleclick-action
/Users/wyuenho/.emacs.d/elpa/lsp-java-20230922.1154/lsp-java.el: Error: Symbol's function definition is void treemacs-define-doubleclick-action

The simplest way to fix this problem seems to just require treemac-mouse-interface in the treemacs-do-define-extension-type macro, but that seems nasty. I'm not sure how best to refactor this hair ball.