emacs-lsp/lsp-dart

Error starting daemon on recent Emacs master

amake opened this issue · 10 comments

Describe the bug
Starting lsp-dart (M-x lsp in a Dart file) results in the following error on recent Emacs master branch.

Backtrace
Debugger entered--Lisp error: (wrong-type-argument processp #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_24>)
  set-process-filter(#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_24> lsp-dart-flutter-daemon--process-filter)
  #f(compiled-function (cl--cnm conn slots) #<bytecode -0x4e00d8a1f323028>)(#f(compiled-function (&rest args) #<bytecode -0x9d63745b80d86cc>) #<lsp-dart-flutter-daemon-connection lsp-dart-flutter-daemon-connection-1fe7613f400a> (:name "LSP Dart - Flutter daemon" :process #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_24>))
  apply(#f(compiled-function (cl--cnm conn slots) #<bytecode -0x4e00d8a1f323028>) #f(compiled-function (&rest args) #<bytecode -0x9d63745b80d86cc>) (#<lsp-dart-flutter-daemon-connection lsp-dart-flutter-daemon-connection-1fe7613f400a> (:name "LSP Dart - Flutter daemon" :process #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_24>)))
  #f(compiled-function (conn slots) "CONN." #<bytecode -0x5881aaa8e84c992>)(#<lsp-dart-flutter-daemon-connection lsp-dart-flutter-daemon-connection-1fe7613f400a> (:name "LSP Dart - Flutter daemon" :process #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_24>))
  apply(#f(compiled-function (conn slots) "CONN." #<bytecode -0x5881aaa8e84c992>) (#<lsp-dart-flutter-daemon-connection lsp-dart-flutter-daemon-connection-1fe7613f400a> (:name "LSP Dart - Flutter daemon" :process #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_24>)))
  #f(compiled-function (&rest args) #<bytecode 0xa57cffb22139680>)(#<lsp-dart-flutter-daemon-connection lsp-dart-flutter-daemon-connection-1fe7613f400a> (:name "LSP Dart - Flutter daemon" :process #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_24>))
  apply(#f(compiled-function (&rest args) #<bytecode 0xa57cffb22139680>) #<lsp-dart-flutter-daemon-connection lsp-dart-flutter-daemon-connection-1fe7613f400a> (:name "LSP Dart - Flutter daemon" :process #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_24>))
  initialize-instance(#<lsp-dart-flutter-daemon-connection lsp-dart-flutter-daemon-connection-1fe7613f400a> (:name "LSP Dart - Flutter daemon" :process #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_24>))
  #f(compiled-function (class &rest slots) "Default constructor for CLASS `eieio-default-superclass'.\nSLOTS are the initialization slots used by `initialize-instance'.\nThis static method is called when an object is constructed.\nIt allocates the vector used to represent an EIEIO object, and then\ncalls `initialize-instance' on that object." #<bytecode -0x1a1481ff1bcb9009>)(lsp-dart-flutter-daemon-connection :name "LSP Dart - Flutter daemon" :process #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_24>)
  apply(#f(compiled-function (class &rest slots) "Default constructor for CLASS `eieio-default-superclass'.\nSLOTS are the initialization slots used by `initialize-instance'.\nThis static method is called when an object is constructed.\nIt allocates the vector used to represent an EIEIO object, and then\ncalls `initialize-instance' on that object." #<bytecode -0x1a1481ff1bcb9009>) lsp-dart-flutter-daemon-connection (:name "LSP Dart - Flutter daemon" :process #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_24>))
  make-instance(lsp-dart-flutter-daemon-connection :name "LSP Dart - Flutter daemon" :process #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_24>)
  lsp-dart-flutter-daemon-connection(:name "LSP Dart - Flutter daemon" :process #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_24>)
  lsp-dart-flutter-daemon-start()
  lsp-dart--activate-features()
  lsp--text-document-did-open()
  lsp--open-in-workspace(#s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 10/10 0x1fe765358117 ...> :registered-server-capabilities (#s(lsp--registered-capability :id "16" :method "textDocument/prepareTypeHierarchy" :options #<hash-table equal 1/1 0x1fe755d13e31 ...>) #s(lsp--registered-capability :id "15" :method "textDocument/typeDefinition" :options #<hash-table equal 1/1 0x1fe755d13d71 ...>) #s(lsp--registered-capability :id "14" :method "textDocument/signatureHelp" :options #<hash-table equal 3/3 0x1fe755d13c81 ...>) #s(lsp--registered-capability :id "13" :method "textDocument/selectionRange" :options #<hash-table equal 1/1 0x1fe755d13aab ...>) #s(lsp--registered-capability :id "12" :method "textDocument/rename" :options #<hash-table equal 2/2 0x1fe755d139cd ...>) #s(lsp--registered-capability :id "11" :method "textDocument/references" :options #<hash-table equal 1/1 0x1fe755d1390d ...>) #s(lsp--registered-capability :id "10" :method "textDocument/implementation" :options #<hash-table equal 1/1 0x1fe755d11f57 ...>) #s(lsp--registered-capability :id "9" :method "textDocument/hover" :options #<hash-table equal 1/1 0x1fe755d11e97 ...>) #s(lsp--registered-capability :id "8" :method "textDocument/formatting" :options #<hash-table equal 1/1 0x1fe755d11dd7 ...>) #s(lsp--registered-capability :id "7" :method "textDocument/rangeFormatting" :options #<hash-table equal 1/1 0x1fe755d100e7 ...>) #s(lsp--registered-capability :id "6" :method "textDocument/onTypeFormatting" :options #<hash-table equal 3/3 0x1fe755d0fff7 ...>) #s(lsp--registered-capability :id "5" :method "textDocument/foldingRange" :options #<hash-table equal 1/1 0x1fe755d0ff37 ...>) #s(lsp--registered-capability :id "4" :method "textDocument/documentLink" :options #<hash-table equal 2/2 0x1fe755d0fe59 ...>) #s(lsp--registered-capability :id "3" :method "textDocument/definition" :options #<hash-table equal 1/1 0x1fe755d0fd99 ...>) #s(lsp--registered-capability :id "2" :method "textDocument/completion" :options #<hash-table equal 2/2 0x1fe755d0d4f7 ...>) #s(lsp--registered-capability :id "1" :method "textDocument/completion" :options #<hash-table equal 4/4 0x1fe755d0d3d9 ...>) #s(lsp--registered-capability :id "0" :method "textDocument/codeAction" :options #<hash-table equal 2/2 0x1fe755d0d2ed ...>)) :root "/Users/amake/Code/orgro" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect #f(compiled-function (filter sentinel name environment-fn workspace) #<bytecode 0x1888106083939b16>) :test? #f(compiled-function () #<bytecode -0x1fdaae002c41a8b7>)) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 4/65 0x1fe765349d81 ...> :request-handlers #<hash-table equal 0/65 0x1fe76534a057 ...> :response-handlers #<hash-table eql 0/65 0x1fe76534a437 ...> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1fe76534a629 ...> :action-handlers #<hash-table equal 0/65 0x1fe76534a8ff ...> :major-modes nil :activation-fn #f(compiled-function (filename &optional _) #<bytecode 0x811b206a1160224>) :priority 1 :server-id dart_analysis_server :multi-root nil :initialization-options ((onlyAnalyzeProjectsWithOpenFiles) (suggestFromUnimportedLibraries . t) (closingLabels . t) (outline . t) (flutterOutline . t)) :semantic-tokens-faces-overrides nil :custom-capabilities ((experimental (snippetTextEdit . t))) :library-folders-fn #f(compiled-function (workspace) #<bytecode -0x460373459fd1e78>) :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn lsp-dart--activate-features :async-request-handlers #<hash-table equal 0/65 0x1fe76534ac37 ...> :download-server-fn nil :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc #<process dart_analysis_server> :cmd-proc #<process dart_analysis_server> :buffers (#<buffer document.dart>) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1fe7656daad1 ...> :watches #<hash-table equal 0/65 0x1fe7656a8ab7 ...> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1fe7656a8eb7 ...> :work-done-tokens #<hash-table equal 0/65 0x1fe7656aa2b7 ...>))
  lsp--find-workspace(#s(lsp-session :folders ("/Users/amake/Code/aaron_app_test" "/Users/amake/Code/dart-pg" "/Users/amake/Code/amk_test3" "/Users/amake/Code/petit_lisp" "/Users/amake/Code/dart-petitparser-examples" "/Users/amake/Code/tinylisp_dart" "/Users/amake/Code/video2pod" "/Users/amake/Code/dart-highlighting" "/Users/amake/Code/succulents_reminders" "/Users/amake/Code/flutter-packages" "/Users/amake/Code/npmsigtest" "/Users/amake/Code/zkpwgen" "/Users/amake/Code/tex_bug_test" "/Users/amake/Code/committed" "/Users/amake/Code/Dash-User-Contributions" "/Users/amake/Code/UniversalDetector2" "/Users/amake/Code/CodePointCoverage" "/Users/amake/Code/nengobot" "/Users/amake/Code/imgxplode" "/Users/amake/Code/macports-webapp" "/Users/amake/Code/aaron-ninja-site" "/Users/amake/Code/dart_uchardet" "/Users/amake/Code/omegat" "/Users/amake/Code/puttools-py" "/Users/amake/Code/my-app" "/Users/amake/Code/flutter_font_loading" "/Users/amake/Code/flutter_english_emoji_mojibake" "/Users/amake/Desktop" "/Users/amake/Code/unikovcode" "/Users/amake/Code/script_detector_2" "/Users/amake/Code/twtrgrep" "/Users/amake/Code/flutter_mac_test" "/Users/amake/Code/test_app" "/Users/amake/Code/TinyLisp" "/Users/amake/dotfiles" "/Users/amake/Code/flutter_cached_network_image" "/Users/amake/Code/omegat-website" "/Users/amake/Code/srx-languagetool-ruby" "/Users/amake/Code/srx-ruby" "/Users/amake/Code/kaching" "/Users/amake/Code/router_remote2" "/Users/amake/Code/go2port" "/Users/amake/Code/kanjiringbot" "/Users/amake/Code/UniversalDetector" "/Users/amake/Code/flutter_charset_detector" "/Users/amake/Code/charset_converter" "/Users/amake/Code/fdroiddata" "/Users/amake/.pub-cache/hosted/pub.dartlang.org/petitparser-2.4.0" "/Users/amake/Code/Iosevka" "/Users/amake/Code/regexgen-ruby" ...) :folders-blocklist ("/Users/amake/Downloads/") :server-id->folders #<hash-table equal 3/65 0x1fe755dbefb7 ...> :folder->servers #<hash-table equal 1/65 0x1fe755dbf2b1 ...> :metadata #<hash-table equal 1/65 0x1fe755dbf4df ...>) #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect #f(compiled-function (filter sentinel name environment-fn workspace) #<bytecode 0x1888106083939b16>) :test? #f(compiled-function () #<bytecode -0x1fdaae002c41a8b7>)) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 4/65 0x1fe765349d81 ...> :request-handlers #<hash-table equal 0/65 0x1fe76534a057 ...> :response-handlers #<hash-table eql 0/65 0x1fe76534a437 ...> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1fe76534a629 ...> :action-handlers #<hash-table equal 0/65 0x1fe76534a8ff ...> :major-modes nil :activation-fn #f(compiled-function (filename &optional _) #<bytecode 0x811b206a1160224>) :priority 1 :server-id dart_analysis_server :multi-root nil :initialization-options ((onlyAnalyzeProjectsWithOpenFiles) (suggestFromUnimportedLibraries . t) (closingLabels . t) (outline . t) (flutterOutline . t)) :semantic-tokens-faces-overrides nil :custom-capabilities ((experimental (snippetTextEdit . t))) :library-folders-fn #f(compiled-function (workspace) #<bytecode -0x460373459fd1e78>) :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn lsp-dart--activate-features :async-request-handlers #<hash-table equal 0/65 0x1fe76534ac37 ...> :download-server-fn nil :download-in-progress? nil :buffers nil :synchronize-sections nil) "/Users/amake/Code/orgro")
  #f(compiled-function (client) #<bytecode 0xe2d4263fcdcf58c>)(#s(lsp--client :language-id nil :add-on? nil :new-connection (:connect #f(compiled-function (filter sentinel name environment-fn workspace) #<bytecode 0x1888106083939b16>) :test? #f(compiled-function () #<bytecode -0x1fdaae002c41a8b7>)) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 4/65 0x1fe765349d81 ...> :request-handlers #<hash-table equal 0/65 0x1fe76534a057 ...> :response-handlers #<hash-table eql 0/65 0x1fe76534a437 ...> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1fe76534a629 ...> :action-handlers #<hash-table equal 0/65 0x1fe76534a8ff ...> :major-modes nil :activation-fn #f(compiled-function (filename &optional _) #<bytecode 0x811b206a1160224>) :priority 1 :server-id dart_analysis_server :multi-root nil :initialization-options ((onlyAnalyzeProjectsWithOpenFiles) (suggestFromUnimportedLibraries . t) (closingLabels . t) (outline . t) (flutterOutline . t)) :semantic-tokens-faces-overrides nil :custom-capabilities ((experimental (snippetTextEdit . t))) :library-folders-fn #f(compiled-function (workspace) #<bytecode -0x460373459fd1e78>) :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn lsp-dart--activate-features :async-request-handlers #<hash-table equal 0/65 0x1fe76534ac37 ...> :download-server-fn nil :download-in-progress? nil :buffers nil :synchronize-sections nil))
  -map(#f(compiled-function (client) #<bytecode 0xe2d4263fcdcf58c>) (#s(lsp--client :language-id nil :add-on? nil :new-connection (:connect #f(compiled-function (filter sentinel name environment-fn workspace) #<bytecode 0x1888106083939b16>) :test? #f(compiled-function () #<bytecode -0x1fdaae002c41a8b7>)) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 4/65 0x1fe765349d81 ...> :request-handlers #<hash-table equal 0/65 0x1fe76534a057 ...> :response-handlers #<hash-table eql 0/65 0x1fe76534a437 ...> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1fe76534a629 ...> :action-handlers #<hash-table equal 0/65 0x1fe76534a8ff ...> :major-modes nil :activation-fn #f(compiled-function (filename &optional _) #<bytecode 0x811b206a1160224>) :priority 1 :server-id dart_analysis_server :multi-root nil :initialization-options ((onlyAnalyzeProjectsWithOpenFiles) (suggestFromUnimportedLibraries . t) (closingLabels . t) (outline . t) (flutterOutline . t)) :semantic-tokens-faces-overrides nil :custom-capabilities ((experimental (snippetTextEdit . t))) :library-folders-fn #f(compiled-function (workspace) #<bytecode -0x460373459fd1e78>) :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn lsp-dart--activate-features :async-request-handlers #<hash-table equal 0/65 0x1fe76534ac37 ...> :download-server-fn nil :download-in-progress? nil :buffers nil :synchronize-sections nil)))
  lsp--ensure-lsp-servers(#s(lsp-session :folders ("/Users/amake/Code/aaron_app_test" "/Users/amake/Code/dart-pg" "/Users/amake/Code/amk_test3" "/Users/amake/Code/petit_lisp" "/Users/amake/Code/dart-petitparser-examples" "/Users/amake/Code/tinylisp_dart" "/Users/amake/Code/video2pod" "/Users/amake/Code/dart-highlighting" "/Users/amake/Code/succulents_reminders" "/Users/amake/Code/flutter-packages" "/Users/amake/Code/npmsigtest" "/Users/amake/Code/zkpwgen" "/Users/amake/Code/tex_bug_test" "/Users/amake/Code/committed" "/Users/amake/Code/Dash-User-Contributions" "/Users/amake/Code/UniversalDetector2" "/Users/amake/Code/CodePointCoverage" "/Users/amake/Code/nengobot" "/Users/amake/Code/imgxplode" "/Users/amake/Code/macports-webapp" "/Users/amake/Code/aaron-ninja-site" "/Users/amake/Code/dart_uchardet" "/Users/amake/Code/omegat" "/Users/amake/Code/puttools-py" "/Users/amake/Code/my-app" "/Users/amake/Code/flutter_font_loading" "/Users/amake/Code/flutter_english_emoji_mojibake" "/Users/amake/Desktop" "/Users/amake/Code/unikovcode" "/Users/amake/Code/script_detector_2" "/Users/amake/Code/twtrgrep" "/Users/amake/Code/flutter_mac_test" "/Users/amake/Code/test_app" "/Users/amake/Code/TinyLisp" "/Users/amake/dotfiles" "/Users/amake/Code/flutter_cached_network_image" "/Users/amake/Code/omegat-website" "/Users/amake/Code/srx-languagetool-ruby" "/Users/amake/Code/srx-ruby" "/Users/amake/Code/kaching" "/Users/amake/Code/router_remote2" "/Users/amake/Code/go2port" "/Users/amake/Code/kanjiringbot" "/Users/amake/Code/UniversalDetector" "/Users/amake/Code/flutter_charset_detector" "/Users/amake/Code/charset_converter" "/Users/amake/Code/fdroiddata" "/Users/amake/.pub-cache/hosted/pub.dartlang.org/petitparser-2.4.0" "/Users/amake/Code/Iosevka" "/Users/amake/Code/regexgen-ruby" ...) :folders-blocklist ("/Users/amake/Downloads/") :server-id->folders #<hash-table equal 3/65 0x1fe755dbefb7 ...> :folder->servers #<hash-table equal 1/65 0x1fe755dbf2b1 ...> :metadata #<hash-table equal 1/65 0x1fe755dbf4df ...>) (#s(lsp--client :language-id nil :add-on? nil :new-connection (:connect #f(compiled-function (filter sentinel name environment-fn workspace) #<bytecode 0x1888106083939b16>) :test? #f(compiled-function () #<bytecode -0x1fdaae002c41a8b7>)) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 4/65 0x1fe765349d81 ...> :request-handlers #<hash-table equal 0/65 0x1fe76534a057 ...> :response-handlers #<hash-table eql 0/65 0x1fe76534a437 ...> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1fe76534a629 ...> :action-handlers #<hash-table equal 0/65 0x1fe76534a8ff ...> :major-modes nil :activation-fn #f(compiled-function (filename &optional _) #<bytecode 0x811b206a1160224>) :priority 1 :server-id dart_analysis_server :multi-root nil :initialization-options ((onlyAnalyzeProjectsWithOpenFiles) (suggestFromUnimportedLibraries . t) (closingLabels . t) (outline . t) (flutterOutline . t)) :semantic-tokens-faces-overrides nil :custom-capabilities ((experimental (snippetTextEdit . t))) :library-folders-fn #f(compiled-function (workspace) #<bytecode -0x460373459fd1e78>) :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn lsp-dart--activate-features :async-request-handlers #<hash-table equal 0/65 0x1fe76534ac37 ...> :download-server-fn nil :download-in-progress? nil :buffers nil :synchronize-sections nil)) "/Users/amake/Code/orgro" nil)
  lsp--try-project-root-workspaces(nil nil)
  #<subr lsp>(nil)
  magit--lsp--disable-when-visiting-blob(#<subr lsp> nil)
  apply(magit--lsp--disable-when-visiting-blob #<subr lsp> nil)
  lsp(nil)
  funcall-interactively(lsp nil)
  command-execute(lsp record)
  counsel-M-x-action("lsp")
  ivy-call()
  ivy-read("M-x " [zls lsp-erlang-ls-server-start-fun lsp-ui-imenu-window-fix-width vls-tramp dumb-jump-project lsp-pwsh-help-completion lsp-treemacs-cycle-severity lsp-ui-doc-hide lsp-xmlls-tramp-after-open-hook vc-sccs-log-view-mode-hook :maxLength lsp-dart-dap-flutter-structured-errors lsp-rust-analyzer-injected-modifier-face newdir treemacs-icon-icon-refresh rainbow-colorize-ansi hs-hide-comments-when-hiding-all allout-abbreviate-flattened-numbering js--find-newline-backward eslint-tramp eglot--CompletionParams lsp-perlnavigator erc-networks--warn-on-connect C-i treemacs--button-symbol-switch copilot-login soap-port-type-p kotlin-language-server lsp-java-completion-lazy-resolve-text-edit-enabled ada-cd-command python-syntax--context-compiler-macro gdb-thread-number lsp-elixir-suggest-specs verilog-auto-assign-modport mhtml--submode-keymap WatchKind lsp:set-rename-params-uri? lsp-pyls-plugins-flake8-hang-closing lsp-ui-find-workspace-symbol treemacs--get-label-of lsp-typescript-format-insert-space-after-opening-and-before-closing-nonempty-brackets lsp-lua-hint-enable lsp-headerline--face-for-symbol gud-target-name lsp:set-file-operation-pattern-options? lsp-inlay-hint-face core-accessing-symbol lsp-rust-analyzer-trait-modifier todo-sort posframe-poshandler-frame-bottom-left-corner ...] :predicate #f(compiled-function (sym) #<bytecode 0x1b6532ed9dd7831d>) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x)
  counsel-M-x()
  funcall-interactively(counsel-M-x)
  command-execute(counsel-M-x)

Specifically, as best I can understand, this commit changed the initialize-instance method of jsonrpc-process-connection to be :after, meaning it is not run before the lsp-dart initialize-instance method. Then when the latter calls jsonrpc--process it gets the original lambda argument to :process rather than the actual process object.

I don't understand EIEIO well enough to know what is the appropriate fix.

Also, I appreciate that you may not want to address this issue at this time, since Emacs 30 is not yet released and presumably upstream code will continue to evolve. In that case, consider this a warning that breaking changes may be coming, and if possible I would appreciate a pointer of how I can advise or otherwise hack my way around this locally.

Note
Before logging the bug please make sure that the issue is reproducible with latest melpa packages.

To Reproduce

  1. On Emacs 30 (after emacs-mirror/emacs@e0b9944), run M-x lsp in a buffer visiting a Dart file

Expected behavior
LSP starts normally

Version
1.24.2

Redefining initialize-instance as below seems to work (I had some confusion due to a stale .elc file), and I imagine would be backwards-compatible, but I have not tested it:

(cl-defmethod initialize-instance :after ((conn lsp-dart-flutter-daemon-connection) _slots)
  "CONN."
  (let ((proc (jsonrpc--process conn)))
    (when proc
      (set-process-filter proc #'lsp-dart-flutter-daemon--process-filter))))

I'm using 29.2 and before that 29.1 and I started getting a similar error after upgrading packages (using Doom emacs) and upgrading Flutter (which upgrades Dart).

Backtrace ```elisp Debugger entered--Lisp error: (wrong-type-argument processp (closure (t) nil (make-process :name lsp-dart-flutter-daemon-name :command (append (lsp-dart-flutter-command) '("daemon")) :coding 'utf-8-emacs-unix :connection-type 'pipe :buffer lsp-dart-flutter-daemon-buffer-name :stderr (get-buffer-create (format "*%s stderr*" lsp-dart-flutter-daemon-name))))) set-process-filter((closure (t) nil (make-process :name lsp-dart-flutter-daemon-name :command (append (lsp-dart-flutter-command) '("daemon")) :coding 'utf-8-emacs-unix :connection-type 'pipe :buffer lsp-dart-flutter-daemon-buffer-name :stderr (get-buffer-create (format "*%s stderr*" lsp-dart-flutter-daemon-name)))) lsp-dart-flutter-daemon--process-filter) (progn (set-process-filter proc #'lsp-dart-flutter-daemon--process-filter)) (if proc (progn (set-process-filter proc #'lsp-dart-flutter-daemon--process-filter))) (let ((proc (jsonrpc--process conn))) (if proc (progn (set-process-filter proc #'lsp-dart-flutter-daemon--process-filter)))) (progn (funcall cl--cnm) (let ((proc (jsonrpc--process conn))) (if proc (progn (set-process-filter proc #'lsp-dart-flutter-daemon--process-filter))))) (progn (progn (funcall cl--cnm) (let ((proc (jsonrpc--process conn))) (if proc (progn (set-process-filter proc #'lsp-dart-flutter-daemon--process-filter)))))) (closure ((cl--cnm closure ((cl--args # (:name "LSP Dart - Flutter daemon" :process (closure ... nil ...))) (cl--nm . #f(compiled-function (this &optional args) "Construct the new object THIS based on ARGS.\nARGS is a property list where odd numbered elements are tags, and\neven numbered elements are the values to store in the tagged slot.\nIf you overload the `initialize-instance', there you will need to\ncall `shared-initialize' yourself, or you can call `call-next-method'\nto have this constructor called automatically. If these steps are\nnot taken, then new objects of your class will not have their values\ndynamically set from ARGS." #))) (&rest args) (apply cl--nm (or args cl--args)))) (cl--cnm conn _slots) (progn (progn (funcall cl--cnm) (let ((proc (jsonrpc--process conn))) (if proc (progn (set-process-filter proc ...)))))))((closure ((cl--args # (:name "LSP Dart - Flutter daemon" :process (closure (t) nil (make-process :name lsp-dart-flutter-daemon-name :command (append ... ...) :coding 'utf-8-emacs-unix :connection-type 'pipe :buffer lsp-dart-flutter-daemon-buffer-name :stderr (get-buffer-create ...))))) (cl--nm . #f(compiled-function (this &optional args) "Construct the new object THIS based on ARGS.\nARGS is a property list where odd numbered elements are tags, and\neven numbered elements are the values to store in the tagged slot.\nIf you overload the `initialize-instance', there you will need to\ncall `shared-initialize' yourself, or you can call `call-next-method'\nto have this constructor called automatically. If these steps are\nnot taken, then new objects of your class will not have their values\ndynamically set from ARGS." #))) (&rest args) (apply cl--nm (or args cl--args))) # (:name "LSP Dart - Flutter daemon" :process (closure (t) nil (make-process :name lsp-dart-flutter-daemon-name :command (append (lsp-dart-flutter-command) '("daemon")) :coding 'utf-8-emacs-unix :connection-type 'pipe :buffer lsp-dart-flutter-daemon-buffer-name :stderr (get-buffer-create (format "*%s stderr*" lsp-dart-flutter-daemon-name)))))) apply((closure ((cl--cnm closure ((cl--args # (:name "LSP Dart - Flutter daemon" :process (closure ... nil ...))) (cl--nm . #f(compiled-function (this &optional args) "Construct the new object THIS based on ARGS.\nARGS is a property list where odd numbered elements are tags, and\neven numbered elements are the values to store in the tagged slot.\nIf you overload the `initialize-instance', there you will need to\ncall `shared-initialize' yourself, or you can call `call-next-method'\nto have this constructor called automatically. If these steps are\nnot taken, then new objects of your class will not have their values\ndynamically set from ARGS." #))) (&rest args) (apply cl--nm (or args cl--args)))) (cl--cnm conn _slots) (progn (progn (funcall cl--cnm) (let ((proc (jsonrpc--process conn))) (if proc (progn (set-process-filter proc ...))))))) (closure ((cl--args # (:name "LSP Dart - Flutter daemon" :process (closure (t) nil (make-process :name lsp-dart-flutter-daemon-name :command (append ... ...) :coding 'utf-8-emacs-unix :connection-type 'pipe :buffer lsp-dart-flutter-daemon-buffer-name :stderr (get-buffer-create ...))))) (cl--nm . #f(compiled-function (this &optional args) "Construct the new object THIS based on ARGS.\nARGS is a property list where odd numbered elements are tags, and\neven numbered elements are the values to store in the tagged slot.\nIf you overload the `initialize-instance', there you will need to\ncall `shared-initialize' yourself, or you can call `call-next-method'\nto have this constructor called automatically. If these steps are\nnot taken, then new objects of your class will not have their values\ndynamically set from ARGS." #))) (&rest args) (apply cl--nm (or args cl--args))) (# (:name "LSP Dart - Flutter daemon" :process (closure (t) nil (make-process :name lsp-dart-flutter-daemon-name :command (append (lsp-dart-flutter-command) '("daemon")) :coding 'utf-8-emacs-unix :connection-type 'pipe :buffer lsp-dart-flutter-daemon-buffer-name :stderr (get-buffer-create (format "*%s stderr*" lsp-dart-flutter-daemon-name))))))) (let ((cl--cnm #'(lambda (&rest args) (apply cl--nm (or args cl--args))))) (apply #'(lambda (cl--cnm conn _slots) (progn (progn (funcall cl--cnm) (let (...) (if proc ...))))) cl--cnm cl--args)) (closure ((cl--nm . #f(compiled-function (this &optional args) "Construct the new object THIS based on ARGS.\nARGS is a property list where odd numbered elements are tags, and\neven numbered elements are the values to store in the tagged slot.\nIf you overload the `initialize-instance', there you will need to\ncall `shared-initialize' yourself, or you can call `call-next-method'\nto have this constructor called automatically. If these steps are\nnot taken, then new objects of your class will not have their values\ndynamically set from ARGS." #))) (&rest cl--args) "CONN.\n\n(fn CONN SLOTS)" (let ((cl--cnm #'(lambda (&rest args) (apply cl--nm ...)))) (apply #'(lambda (cl--cnm conn _slots) (progn (progn ... ...))) cl--cnm cl--args)))(# (:name "LSP Dart - Flutter daemon" :process (closure (t) nil (make-process :name lsp-dart-flutter-daemon-name :command (append (lsp-dart-flutter-command) '("daemon")) :coding 'utf-8-emacs-unix :connection-type 'pipe :buffer lsp-dart-flutter-daemon-buffer-name :stderr (get-buffer-create (format "*%s stderr*" lsp-dart-flutter-daemon-name)))))) apply((closure ((cl--nm . #f(compiled-function (this &optional args) "Construct the new object THIS based on ARGS.\nARGS is a property list where odd numbered elements are tags, and\neven numbered elements are the values to store in the tagged slot.\nIf you overload the `initialize-instance', there you will need to\ncall `shared-initialize' yourself, or you can call `call-next-method'\nto have this constructor called automatically. If these steps are\nnot taken, then new objects of your class will not have their values\ndynamically set from ARGS." #))) (&rest cl--args) "CONN.\n\n(fn CONN SLOTS)" (let ((cl--cnm #'(lambda (&rest args) (apply cl--nm ...)))) (apply #'(lambda (cl--cnm conn _slots) (progn (progn ... ...))) cl--cnm cl--args))) (# (:name "LSP Dart - Flutter daemon" :process (closure (t) nil (make-process :name lsp-dart-flutter-daemon-name :command (append (lsp-dart-flutter-command) '("daemon")) :coding 'utf-8-emacs-unix :connection-type 'pipe :buffer lsp-dart-flutter-daemon-buffer-name :stderr (get-buffer-create (format "*%s stderr*" lsp-dart-flutter-daemon-name))))))) #f(compiled-function (&rest args) #)(# (:name "LSP Dart - Flutter daemon" :process (closure (t) nil (make-process :name lsp-dart-flutter-daemon-name :command (append (lsp-dart-flutter-command) '("daemon")) :coding 'utf-8-emacs-unix :connection-type 'pipe :buffer lsp-dart-flutter-daemon-buffer-name :stderr (get-buffer-create (format "*%s stderr*" lsp-dart-flutter-daemon-name)))))) apply(#f(compiled-function (&rest args) #) # (:name "LSP Dart - Flutter daemon" :process (closure (t) nil (make-process :name lsp-dart-flutter-daemon-name :command (append (lsp-dart-flutter-command) '("daemon")) :coding 'utf-8-emacs-unix :connection-type 'pipe :buffer lsp-dart-flutter-daemon-buffer-name :stderr (get-buffer-create (format "*%s stderr*" lsp-dart-flutter-daemon-name)))))) initialize-instance(# (:name "LSP Dart - Flutter daemon" :process (closure (t) nil (make-process :name lsp-dart-flutter-daemon-name :command (append (lsp-dart-flutter-command) '("daemon")) :coding 'utf-8-emacs-unix :connection-type 'pipe :buffer lsp-dart-flutter-daemon-buffer-name :stderr (get-buffer-create (format "*%s stderr*" lsp-dart-flutter-daemon-name)))))) #f(compiled-function (class &rest slots) "Default constructor for CLASS `eieio-default-superclass'.\nSLOTS are the initialization slots used by `initialize-instance'.\nThis static method is called when an object is constructed.\nIt allocates the vector used to represent an EIEIO object, and then\ncalls `initialize-instance' on that object." #)(lsp-dart-flutter-daemon-connection :name "LSP Dart - Flutter daemon" :process (closure (t) nil (make-process :name lsp-dart-flutter-daemon-name :command (append (lsp-dart-flutter-command) '("daemon")) :coding 'utf-8-emacs-unix :connection-type 'pipe :buffer lsp-dart-flutter-daemon-buffer-name :stderr (get-buffer-create (format "*%s stderr*" lsp-dart-flutter-daemon-name))))) apply(#f(compiled-function (class &rest slots) "Default constructor for CLASS `eieio-default-superclass'.\nSLOTS are the initialization slots used by `initialize-instance'.\nThis static method is called when an object is constructed.\nIt allocates the vector used to represent an EIEIO object, and then\ncalls `initialize-instance' on that object." #) lsp-dart-flutter-daemon-connection (:name "LSP Dart - Flutter daemon" :process (closure (t) nil (make-process :name lsp-dart-flutter-daemon-name :command (append (lsp-dart-flutter-command) '("daemon")) :coding 'utf-8-emacs-unix :connection-type 'pipe :buffer lsp-dart-flutter-daemon-buffer-name :stderr (get-buffer-create (format "*%s stderr*" lsp-dart-flutter-daemon-name)))))) make-instance(lsp-dart-flutter-daemon-connection :name "LSP Dart - Flutter daemon" :process (closure (t) nil (make-process :name lsp-dart-flutter-daemon-name :command (append (lsp-dart-flutter-command) '("daemon")) :coding 'utf-8-emacs-unix :connection-type 'pipe :buffer lsp-dart-flutter-daemon-buffer-name :stderr (get-buffer-create (format "*%s stderr*" lsp-dart-flutter-daemon-name))))) apply(make-instance lsp-dart-flutter-daemon-connection (:name "LSP Dart - Flutter daemon" :process (closure (t) nil (make-process :name lsp-dart-flutter-daemon-name :command (append (lsp-dart-flutter-command) '("daemon")) :coding 'utf-8-emacs-unix :connection-type 'pipe :buffer lsp-dart-flutter-daemon-buffer-name :stderr (get-buffer-create (format "*%s stderr*" lsp-dart-flutter-daemon-name)))))) lsp-dart-flutter-daemon-connection(:name "LSP Dart - Flutter daemon" :process (closure (t) nil (make-process :name lsp-dart-flutter-daemon-name :command (append (lsp-dart-flutter-command) '("daemon")) :coding 'utf-8-emacs-unix :connection-type 'pipe :buffer lsp-dart-flutter-daemon-buffer-name :stderr (get-buffer-create (format "*%s stderr*" lsp-dart-flutter-daemon-name))))) (let ((conn (lsp-dart-flutter-daemon-connection :name lsp-dart-flutter-daemon-name :process #'(lambda nil (make-process :name lsp-dart-flutter-daemon-name :command (append ... ...) :coding 'utf-8-emacs-unix :connection-type 'pipe :buffer lsp-dart-flutter-daemon-buffer-name :stderr (get-buffer-create ...)))))) (setq lsp-dart-flutter-daemon--conn conn)) (if (lsp-dart-flutter-daemon--running-p) nil (let ((conn (lsp-dart-flutter-daemon-connection :name lsp-dart-flutter-daemon-name :process #'(lambda nil (make-process :name lsp-dart-flutter-daemon-name :command ... :coding ... :connection-type ... :buffer lsp-dart-flutter-daemon-buffer-name :stderr ...))))) (setq lsp-dart-flutter-daemon--conn conn))) lsp-dart-flutter-daemon-start() (progn (lsp-dart-flutter-daemon-start)) (if (lsp-dart-flutter-project-p) (progn (lsp-dart-flutter-daemon-start))) lsp-dart--activate-features() lsp--text-document-did-open() lsp--open-in-workspace(#s(lsp--workspace :ewoc nil :server-capabilities # :registered-server-capabilities (#s(lsp--registered-capability :id "14" :method "textDocument/prepareTypeHierarchy" :options #) #s(lsp--registered-capability :id "13" :method "textDocument/typeDefinition" :options #) #s(lsp--registered-capability :id "12" :method "textDocument/signatureHelp" :options #) #s(lsp--registered-capability :id "11" :method "textDocument/selectionRange" :options #) #s(lsp--registered-capability :id "10" :method "textDocument/rename" :options #) #s(lsp--registered-capability :id "9" :method "textDocument/references" :options #) #s(lsp--registered-capability :id "8" :method "textDocument/implementation" :options #) #s(lsp--registered-capability :id "7" :method "textDocument/hover" :options #) #s(lsp--registered-capability :id "6" :method "textDocument/formatting" :options #) #s(lsp--registered-capability :id "5" :method "textDocument/rangeFormatting" :options #) #s(lsp--registered-capability :id "4" :method "textDocument/onTypeFormatting" :options #) #s(lsp--registered-capability :id "3" :method "textDocument/definition" :options #) #s(lsp--registered-capability :id "2" :method "textDocument/completion" :options #) #s(lsp--registered-capability :id "1" :method "textDocument/completion" :options #) #s(lsp--registered-capability :id "0" :method "textDocument/codeAction" :options #)) :root "/my_project_path" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect #f(compiled-function (filter sentinel name environment-fn workspace) #) :test? #f(compiled-function () #)) :ignore-regexps nil :ignore-messages nil :notification-handlers # :request-handlers # :response-handlers # :prefix-function nil :uri-handlers # :action-handlers # :major-modes nil :activation-fn (closure (t) (filename &optional _) (or (derived-mode-p 'dart-mode) (string= (f-filename filename) "pubspec.yaml"))) :priority 1 :server-id dart_analysis_server :multi-root nil :initialization-options ((onlyAnalyzeProjectsWithOpenFiles) (suggestFromUnimportedLibraries . t) (closingLabels . t) (outline . t) (flutterOutline . t)) :semantic-tokens-faces-overrides nil :custom-capabilities ((experimental (snippetTextEdit . t))) :library-folders-fn (closure (t) (_workspace) (lsp-dart--library-folders)) :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn lsp-dart--activate-features :async-request-handlers # :download-server-fn nil :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc # :cmd-proc # :buffers (#> # # # #) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata # :watches # :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics # :work-done-tokens #)) lsp--find-workspace(#s(lsp-session :folders ("/my_project_path") :folders-blocklist ("/Users/me/Library/Caches/pypoetry/virtualenv...") :server-id->folders # :folder->servers # :metadata #) #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect #f(compiled-function (filter sentinel name environment-fn workspace) #) :test? #f(compiled-function () #)) :ignore-regexps nil :ignore-messages nil :notification-handlers # :request-handlers # :response-handlers # :prefix-function nil :uri-handlers # :action-handlers # :major-modes nil :activation-fn (closure (t) (filename &optional _) (or (derived-mode-p 'dart-mode) (string= (f-filename filename) "pubspec.yaml"))) :priority 1 :server-id dart_analysis_server :multi-root nil :initialization-options ((onlyAnalyzeProjectsWithOpenFiles) (suggestFromUnimportedLibraries . t) (closingLabels . t) (outline . t) (flutterOutline . t)) :semantic-tokens-faces-overrides nil :custom-capabilities ((experimental (snippetTextEdit . t))) :library-folders-fn (closure (t) (_workspace) (lsp-dart--library-folders)) :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn lsp-dart--activate-features :async-request-handlers # :download-server-fn nil :download-in-progress? nil :buffers nil :synchronize-sections nil) "/Users/me/workspace/roomly/app/roomly") #f(compiled-function (client) #)(#s(lsp--client :language-id nil :add-on? nil :new-connection (:connect #f(compiled-function (filter sentinel name environment-fn workspace) #) :test? #f(compiled-function () #)) :ignore-regexps nil :ignore-messages nil :notification-handlers # :request-handlers # :response-handlers # :prefix-function nil :uri-handlers # :action-handlers # :major-modes nil :activation-fn (closure (t) (filename &optional _) (or (derived-mode-p 'dart-mode) (string= (f-filename filename) "pubspec.yaml"))) :priority 1 :server-id dart_analysis_server :multi-root nil :initialization-options ((onlyAnalyzeProjectsWithOpenFiles) (suggestFromUnimportedLibraries . t) (closingLabels . t) (outline . t) (flutterOutline . t)) :semantic-tokens-faces-overrides nil :custom-capabilities ((experimental (snippetTextEdit . t))) :library-folders-fn (closure (t) (_workspace) (lsp-dart--library-folders)) :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn lsp-dart--activate-features :async-request-handlers # :download-server-fn nil :download-in-progress? nil :buffers nil :synchronize-sections nil)) -map(#f(compiled-function (client) #) (#s(lsp--client :language-id nil :add-on? nil :new-connection (:connect #f(compiled-function (filter sentinel name environment-fn workspace) #) :test? #f(compiled-function () #)) :ignore-regexps nil :ignore-messages nil :notification-handlers # :request-handlers # :response-handlers # :prefix-function nil :uri-handlers # :action-handlers # :major-modes nil :activation-fn (closure (t) (filename &optional _) (or (derived-mode-p 'dart-mode) (string= (f-filename filename) "pubspec.yaml"))) :priority 1 :server-id dart_analysis_server :multi-root nil :initialization-options ((onlyAnalyzeProjectsWithOpenFiles) (suggestFromUnimportedLibraries . t) (closingLabels . t) (outline . t) (flutterOutline . t)) :semantic-tokens-faces-overrides nil :custom-capabilities ((experimental (snippetTextEdit . t))) :library-folders-fn (closure (t) (_workspace) (lsp-dart--library-folders)) :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn lsp-dart--activate-features :async-request-handlers # :download-server-fn nil :download-in-progress? nil :buffers nil :synchronize-sections nil))) lsp--ensure-lsp-servers(#s(lsp-session :folders ("/my_project_path") :folders-blocklist ("/Users/me/Library/Caches/pypoetry/virtualenv...") :server-id->folders # :folder->servers # :metadata #) (#s(lsp--client :language-id nil :add-on? nil :new-connection (:connect #f(compiled-function (filter sentinel name environment-fn workspace) #) :test? #f(compiled-function () #)) :ignore-regexps nil :ignore-messages nil :notification-handlers # :request-handlers # :response-handlers # :prefix-function nil :uri-handlers # :action-handlers # :major-modes nil :activation-fn (closure (t) (filename &optional _) (or (derived-mode-p 'dart-mode) (string= (f-filename filename) "pubspec.yaml"))) :priority 1 :server-id dart_analysis_server :multi-root nil :initialization-options ((onlyAnalyzeProjectsWithOpenFiles) (suggestFromUnimportedLibraries . t) (closingLabels . t) (outline . t) (flutterOutline . t)) :semantic-tokens-faces-overrides nil :custom-capabilities ((experimental (snippetTextEdit . t))) :library-folders-fn (closure (t) (_workspace) (lsp-dart--library-folders)) :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn lsp-dart--activate-features :async-request-handlers # :download-server-fn nil :download-in-progress? nil :buffers nil :synchronize-sections nil)) "/Users/me/workspace/roomly/app/roomly" nil) lsp--try-project-root-workspaces(nil nil) lsp(nil) funcall-interactively(lsp nil) command-execute(lsp record) execute-extended-command(nil "lsp" nil) funcall-interactively(execute-extended-command nil "lsp" nil) command-execute(execute-extended-command) ```

I tried your solution and it's not working.

Getting the same error (also with Doom Emacs),
tried the solution posted above but didn't work (but admittedly my lisp-fu is really minimal).
But if I try "lsp-plain-start" the error goes away and lap-dart works normally which makes me think that there is something wrong on my part

I thought the workaround was working as written for me, but I just realized I had left it applied directly to the installed copy of lsp-dart instead of in my config.

I don't know enough about EIEIO to know if you can effectively override an init function like this. At the very least the timing at which the patch is applied would be very important.

Getting the same error (also with Doom Emacs), tried the solution posted above but didn't work (but admittedly my lisp-fu is really minimal). But if I try "lsp-plain-start" the error goes away and lap-dart works normally which makes me think that there is something wrong on my part

What version of Emacs are you using?

As I said, I'm now inclined towards a breaking change in the installed packages and/or Dart Analysis Server because things were working just fine with Emacs 29.1

Using doom Emacs, as well.
My emacs version:

GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.39, cairo version 1.18.0) of 2024-01-04

This seems to do the trick for me:

(use-package! lsp-dart
  :config
  (cl-defmethod initialize-instance ((conn lsp-dart-flutter-daemon-connection) _slots)
    "CONN."
    (cl-call-next-method)
    (let* ((proc2 (jsonrpc--process conn))
           (proc (if (functionp proc2)
                     (if (zerop (cdr (func-arity proc2)))
                         (funcall proc2)
                       (funcall proc2 conn))
                   proc2)))
      (when proc
        (set-process-filter proc #'lsp-dart-flutter-daemon--process-filter))))
  )

Getting the same error (also with Doom Emacs), tried the solution posted above but didn't work (but admittedly my lisp-fu is really minimal). But if I try "lsp-plain-start" the error goes away and lap-dart works normally which makes me think that there is something wrong on my part

What version of Emacs are you using?

As I said, I'm now inclined towards a breaking change in the installed packages and/or Dart Analysis Server because things were working just fine with Emacs 29.1

Emacs 29.2 (but don't remember when I upgraded from 29.1): I think that it's more probable that lsp-dart broke after a doom upgrade (didn't touch the dart/flutter toolchain) but didn't have time to investigate.

Tried @laynor workaround and it seems to work, thanks!

@laynor thanks for the code snippet, feel free to open a PR if we can both support older emacs and the new one

I'll take a look at @amake suggestion too and try to fix it, will do that on weekend building emacs from master

Folks, sorry for the late, fixed on 1.24.3, thanks for the patience and testing!