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 861 forks source link

Emacs 29.1 Warnings #4116

Closed WillAyd closed 3 months ago

WillAyd commented 11 months ago

Thank you for the bug report

Bug description

After snap upgraded my Emacs to 29.1 I started to see all of the following warnings appear using lsp:

⛔ Warning (comp): lsp-mode.el:3583:28: Warning: reference to free variable ‘lsp-inlay-hint-enable’
⛔ Warning (comp): lsp-mode.el:4123:18: Warning: reference to free variable ‘lsp-inlay-hint-enable’
⛔ Warning (comp): lsp-mode.el:8534:33: Warning: Non-symbol arguments to cl-defgeneric: (process process)
⛔ Warning (comp): lsp-mode.el:8537:35: Warning: Non-symbol arguments to cl-defgeneric: (process process)
⛔ Warning (comp): lsp-mode.el:8539:37: Warning: Non-symbol arguments to cl-defgeneric: (process process)
⛔ Warning (comp): lsp-mode.el:8541:35: Warning: Non-symbol arguments to cl-defgeneric: (process process)
⛔ Warning (comp): lsp-mode.el:8545:35: Warning: Non-symbol arguments to cl-defgeneric: (process process)

Steps to reproduce

Install latest version of lsp-mode onto an Emacs 29.1 application

Expected behavior

No warnings

Which Language Server did you use?

N/A

OS

Linux

Error callstack

No response

Anything else?

No response

lorenzohess commented 9 months ago

I get this warning as well (copied from messages buffer): ~/.emacs.d/.local/straight/build-29.1/lsp-mode/lsp-mode.el: Warning: Non-symbol arguments to cl-defgeneric: (process process) [5 times].

I'm using Doom Emacs with the following config:

generated  Sep 17, 2023 18:31:15
system     Debian GNU/Linux 11 (bullseye) Linux 6.1.42-1.qubes.fc32.x86_64 x86_64 x
emacs      29.1 ~/.emacs.d/
doom       3.0.0-pre PROFILE=_@0 HEAD -> master 25602409b 2023-09-07 20:22:58 +0200
           ~/.doom.d/
shell      /bin/bash
features   CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
           LIBSELINUX LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG
           SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XINPUT2
           XPM GTK3 ZLIB
traits     gui daemon server-running envvar-file
modules    :config use-package :completion company (vertico +icons) :ui doom
           doom-dashboard (emoji +unicode) hl-todo (ligatures +extra) (modeline
           +light) nav-flash ophints (treemacs +lsp) (vc-gutter +pretty)
           vi-tilde-fringe window-select zen :editor (evil +everywhere) file-templates
           (format +onsave) snippets word-wrap :emacs (dired +ranger +icons) electric
           (ibuffer +icons) undo vc :term eshell vterm :checkers syntax (spell
           +aspell) grammar :tools biblio editorconfig (eval +overlay) (lookup
           +docsets +dictionary +offline) (lsp +peek) magit pdf rgb tree-sitter :os
           tty :lang data (emacs-lisp +lsp) (json +lsp) (latex +latexmk +fold +lsp)
           (lua +lsp +tree-sitter) markdown (org +lsp +pandoc +pretty) plantuml
           (python +lsp +pyright) (sh +lsp) (yaml +lsp) :app calendar :config literate
           (default +bindings +smartparens)
packages   (org-pretty-table :recipe (:host github :repo Fuco1/org-pretty-table) :pin
           7bd68b420d3402826fea16ee5099d04aa9879b78) (org-pandoc-import :recipe (:host
           github :repo tecosaur/org-pandoc-import :files (*.el filters
           preprocessors))) (org-auto-tangle) (vlf) (org-screenshot) (doom-modeline
           :pin 918730eff72e)
erusyd commented 9 months ago

I change cl-defgeneric to cl-defmethod and the warnings disappear.

worikgh commented 8 months ago

I change cl-defgeneric to cl-defmethod and the warnings disappear.

What do you mean? I am having this problem too

Emacs version: 29.1

erusyd commented 8 months ago

Find lsp-mode.el (my is ~/.emacs.d/straight/build/lsp-mode/lsp-mode.el), change corresponding cl-defgeneric to cl-defmethod (line 8539 to line 8550): 2023-10-15_08-17

worikgh commented 8 months ago

My problems were fixed by updating lsp-mode

jcs090218 commented 3 months ago

This should be fixed a long time ago. If not, please open a new issue! :)