emacs-lsp / lsp-mode

Emacs client/library for the Language Server Protocol
https://emacs-lsp.github.io/lsp-mode
GNU General Public License v3.0
4.72k stars 860 forks source link

lsp--path-to-uri: Symbol’s function definition is void: -compose #4457

Open siccegge opened 1 month ago

siccegge commented 1 month ago

Thank you for the bug report

Bug description

lsp does not load

Steps to reproduce

emacs abstract.tex

M-x lsp

My understanding is lsp doesn't get far enough for this to matter but:

(use-package lsp-ltex
  :ensure t
  :hook (text-mode . (lambda ()
                       (require 'lsp-ltex)
                       (lsp)))  ; or lsp-deferred
  :init
  (setq lsp-ltex-version "16.0.0")
  (setq lsp-ltex-languagetool-http-server-uri "https://api.languagetoolplus.com/")
  (setq lsp-ltex-languagetool-org-username "some@thing")
  (setq lsp-ltex-languagetool-org-api-key "secret"))

Expected behavior

lsp and lsp-ltex loads and works

Which Language Server did you use?

lsp-mode-9.0.0 lsp-ltex-0.2.1 ltex-ls-16.0.0 emacs-29.3 debian bookworm

OS

Linux

Error callstack

from lsp-start-plain

Debugger entered--Lisp error: (void-function -compose)
  (-compose #'lsp--client-path->uri-fn #'lsp--workspace-client)
  (-keep (-compose #'lsp--client-path->uri-fn #'lsp--workspace-client) (lsp-workspaces))
  (cl-first (-keep (-compose #'lsp--client-path->uri-fn #'lsp--workspace-client) (lsp-workspaces)))
  (and t (cl-first (-keep (-compose #'lsp--client-path->uri-fn #'lsp--workspace-client) (lsp-workspaces))))
  (let* ((uri-fn (and t (cl-first (-keep (-compose #'lsp--client-path->uri-fn #'lsp--workspace-client) (lsp-workspaces)))))) (if uri-fn (funcall uri-fn path) (lsp--path-to-uri-1 path)))
  lsp--path-to-uri("/home/christoph/.emacs.d/index.sqlite")
  (closure (t) nil "" (lsp--path-to-uri (f-join user-emacs-directory "index.sqlite")))()
  funcall((closure (t) nil "" (lsp--path-to-uri (f-join user-emacs-directory "index.sqlite"))))
  eval((funcall #'(closure (t) nil "" (lsp--path-to-uri (f-join user-emacs-directory "index.sqlite")))))
  custom-initialize-reset(lsp-serenata-index-database-uri (funcall #'(closure (t) nil "" (lsp--path-to-uri (f-join user-emacs-directory "index.sqlite")))))
  custom-declare-variable(lsp-serenata-index-database-uri (funcall #'(closure (t) nil "" (lsp--path-to-uri (f-join user-emacs-directory "index.sqlite")))) "The location to store the index database.\nNote tha..." :group lsp-serenata :type file)
  load-with-code-conversion("/tmp/lsp-tmp-elpafBKOKd/lsp-mode-20240514.1430/lsp..." "/tmp/lsp-tmp-elpafBKOKd/lsp-mode-20240514.1430/lsp..." t t)
  require(lsp-php nil t)
  (if (featurep package) nil (require package nil t))
  (closure (tramp-ssh-controlmaster-options tramp-use-ssh-controlmaster-options view-inhibit-help-message lsp-help-mode-abbrev-table lsp-help-mode-syntax-table eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) (package) (if (featurep package) nil (require package nil t)))(lsp-php)
  mapc((closure (tramp-ssh-controlmaster-options tramp-use-ssh-controlmaster-options view-inhibit-help-message lsp-help-mode-abbrev-table lsp-help-mode-syntax-table eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) (package) (if (featurep package) nil (require package nil t))) (ccls lsp-actionscript lsp-ada lsp-angular lsp-ansible lsp-asm lsp-astro lsp-autotools lsp-awk lsp-bash lsp-beancount lsp-bufls lsp-clangd lsp-clojure lsp-cmake lsp-cobol lsp-credo lsp-crystal lsp-csharp lsp-css lsp-cucumber lsp-cypher lsp-d lsp-dart lsp-dhall lsp-docker lsp-dockerfile lsp-elixir lsp-elm lsp-emmet lsp-erlang lsp-eslint lsp-fortran lsp-fsharp lsp-gdscript lsp-gleam lsp-glsl lsp-go lsp-golangci-lint lsp-grammarly lsp-graphql lsp-groovy lsp-hack lsp-haskell lsp-haxe lsp-idris lsp-java lsp-javascript lsp-jq lsp-json ...))
  seq-do((closure (tramp-ssh-controlmaster-options tramp-use-ssh-controlmaster-options view-inhibit-help-message lsp-help-mode-abbrev-table lsp-help-mode-syntax-table eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) (package) (if (featurep package) nil (require package nil t))) (ccls lsp-actionscript lsp-ada lsp-angular lsp-ansible lsp-asm lsp-astro lsp-autotools lsp-awk lsp-bash lsp-beancount lsp-bufls lsp-clangd lsp-clojure lsp-cmake lsp-cobol lsp-credo lsp-crystal lsp-csharp lsp-css lsp-cucumber lsp-cypher lsp-d lsp-dart lsp-dhall lsp-docker lsp-dockerfile lsp-elixir lsp-elm lsp-emmet lsp-erlang lsp-eslint lsp-fortran lsp-fsharp lsp-gdscript lsp-gleam lsp-glsl lsp-go lsp-golangci-lint lsp-grammarly lsp-graphql lsp-groovy lsp-hack lsp-haskell lsp-haxe lsp-idris lsp-java lsp-javascript lsp-jq lsp-json ...))
  (progn (seq-do #'(lambda (package) (if (featurep package) nil (require package nil t))) lsp-client-packages) (setq lsp--client-packages-required t))
  (if (and lsp-auto-configure (not lsp--client-packages-required)) (progn (seq-do #'(lambda (package) (if (featurep package) nil (require package nil t))) lsp-client-packages) (setq lsp--client-packages-required t)))
  lsp--require-packages()
  lsp(nil)
  funcall-interactively(lsp nil)
  command-execute(lsp record)
  execute-extended-command(nil "lsp" "lsp")
  funcall-interactively(execute-extended-command nil "lsp" "lsp")
  command-execute(execute-extended-command)


### Anything else?

_No response_
siccegge commented 1 month ago

I guess the start-plain melpa packages are

ace-window-20220911.358    dap-mode-20240514.1617      lsp-dart-20240520.1834       lsp-treemacs-20240406.2141  s-20220902.1511
archives           dart-mode-20231002.1138     lsp-docker-20240419.1428     lsp-ui-20240514.1943    scala-mode-20240113.1743
async-20240323.1912    haskell-mode-20240116.1718  lsp-haskell-20231011.1723    origami-20200331.1019   spinner-1.7.4
avy-20230420.404       helm-20240521.633           lsp-java-20240501.1928       pfuture-20220913.1401   spinner-1.7.4.signed
bui-20210108.1141      helm-core-20240518.1434     lsp-mode-20240514.1430       php-mode-20240118.1458  treemacs-20240518.932
cfrs-20220129.1149     helm-lsp-20210419.2014      lsp-origami-20230815.704     popup-20240101.830      typescript-mode-20240507.617
clojure-mode-20240516.525  ht-20230703.558         lsp-pyright-20240416.610     posframe-20240507.148   wfnames-20240418.1005
company-20240428.2258      hydra-20220910.1206         lsp-python-ms-20230731.1458  request-20230127.417    yasnippet-20240406.1314

and not the melpa-stable versions (which fails the exact same way in my "normal" emacs vs the start-plain one

yyoncho commented 1 month ago

I guess the start-plain melpa packages are

ace-window-20220911.358    dap-mode-20240514.1617      lsp-dart-20240520.1834     lsp-treemacs-20240406.2141  s-20220902.1511
archives         dart-mode-20231002.1138     lsp-docker-20240419.1428     lsp-ui-20240514.1943    scala-mode-20240113.1743
async-20240323.1912      haskell-mode-20240116.1718  lsp-haskell-20231011.1723    origami-20200331.1019   spinner-1.7.4
avy-20230420.404     helm-20240521.633           lsp-java-20240501.1928       pfuture-20220913.1401   spinner-1.7.4.signed
bui-20210108.1141    helm-core-20240518.1434     lsp-mode-20240514.1430       php-mode-20240118.1458  treemacs-20240518.932
cfrs-20220129.1149       helm-lsp-20210419.2014      lsp-origami-20230815.704     popup-20240101.830      typescript-mode-20240507.617
clojure-mode-20240516.525  ht-20230703.558           lsp-pyright-20240416.610     posframe-20240507.148   wfnames-20240418.1005
company-20240428.2258    hydra-20220910.1206         lsp-python-ms-20230731.1458  request-20230127.417    yasnippet-20240406.1314

and not the melpa-stable versions (which fails the exact same way in my "normal" emacs vs the start-plain one

I don't see dash package in that list...

siccegge commented 1 month ago

Right. It's at stable.melpa's 2.19.1