GNU bug report logs -
#53843
27.2; unknown function used in flymake
Previous Next
Reported by: Nicolas Martyanoff <khaelin <at> gmail.com>
Date: Mon, 7 Feb 2022 12:55:02 UTC
Severity: normal
Found in version 27.2
Done: Robert Pluim <rpluim <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 53843 in the body.
You can then email your comments to 53843 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#53843
; Package
emacs
.
(Mon, 07 Feb 2022 12:55:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Nicolas Martyanoff <khaelin <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 07 Feb 2022 12:55:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi,
Using eglot with python-mode (with pyright) causes regular errors
involving flymake caused by calls to an unknown "string-replace"
function:
Debugger entered--Lisp error: (void-function string-replace)
string-replace("%" "%%" "resource.py")
flymake--log-1(:warning flymake "Invalid region line=%s col=%s" 35 40)
flymake-diag-region(#<buffer resource.py> 35 40)
#f(compiled-function (arg1 arg2 &rest rest) "Handle notification publishDiagnostics." #<bytecode 0x157aa550be09>)(#<eglot-lsp-server eglot-lsp-server-157aa616aea0> textDocument/publishDiagnostics :uri "[REMOVED]" :version 227 :diagnostics [(:range (:start (:line 16 :character 5) :end (:line 16 :character 25)) :message "Import \"eventline.api_object\" could not be resolve..." :severity 1 :code "reportMissingImports" :source "Pyright" :codeDescription (:href "https://github.com/microsoft/pyright/blob/main/doc...")) (:range (:start (:line 34 :character 40) :end (:line 34 :character 52)) :message "\"ResourceSpec\" is not defined" :severity 1 :code "reportUndefinedVariable" :source "Pyright" :codeDescription (:href "https://github.com/microsoft/pyright/blob/main/doc..."))])
apply(#f(compiled-function (arg1 arg2 &rest rest) "Handle notification publishDiagnostics." #<bytecode 0x157aa550be09>) #<eglot-lsp-server eglot-lsp-server-157aa616aea0> textDocument/publishDiagnostics (:uri "[REMOVED]" :version 227 :diagnostics [(:range (:start (:line 16 :character 5) :end (:line 16 :character 25)) :message "Import \"eventline.api_object\" could not be resolve..." :severity 1 :code "reportMissingImports" :source "Pyright" :codeDescription (:href "https://github.com/microsoft/pyright/blob/main/doc...")) (:range (:start (:line 34 :character 40) :end (:line 34 :character 52)) :message "\"ResourceSpec\" is not defined" :severity 1 :code "reportUndefinedVariable" :source "Pyright" :codeDescription (:href "https://github.com/microsoft/pyright/blob/main/doc..."))]))
eglot-handle-notification(#<eglot-lsp-server eglot-lsp-server-157aa616aea0> textDocument/publishDiagnostics :uri "[REMOVED]" :version 227 :diagnostics [(:range (:start (:line 16 :character 5) :end (:line 16 :character 25)) :message "Import \"eventline.api_object\" could not be resolve..." :severity 1 :code "reportMissingImports" :source "Pyright" :codeDescription (:href "https://github.com/microsoft/pyright/blob/main/doc...")) (:range (:start (:line 34 :character 40) :end (:line 34 :character 52)) :message "\"ResourceSpec\" is not defined" :severity 1 :code "reportUndefinedVariable" :source "Pyright" :codeDescription (:href "https://github.com/microsoft/pyright/blob/main/doc..."))])
apply(eglot-handle-notification #<eglot-lsp-server eglot-lsp-server-157aa616aea0> textDocument/publishDiagnostics (:uri "[REMOVED]" :version 227 :diagnostics [(:range (:start (:line 16 :character 5) :end (:line 16 :character 25)) :message "Import \"eventline.api_object\" could not be resolve..." :severity 1 :code "reportMissingImports" :source "Pyright" :codeDescription (:href "https://github.com/microsoft/pyright/blob/main/doc...")) (:range (:start (:line 34 :character 40) :end (:line 34 :character 52)) :message "\"ResourceSpec\" is not defined" :severity 1 :code "reportUndefinedVariable" :source "Pyright" :codeDescription (:href "https://github.com/microsoft/pyright/blob/main/doc..."))]))
#f(compiled-function (server method params) #<bytecode 0x157aa616ae7d>)(#<eglot-lsp-server eglot-lsp-server-157aa616aea0> textDocument/publishDiagnostics (:uri "[REMOVED]" :version 227 :diagnostics [(:range (:start (:line 16 :character 5) :end (:line 16 :character 25)) :message "Import \"eventline.api_object\" could not be resolve..." :severity 1 :code "reportMissingImports" :source "Pyright" :codeDescription (:href "https://github.com/microsoft/pyright/blob/main/doc...")) (:range (:start (:line 34 :character 40) :end (:line 34 :character 52)) :message "\"ResourceSpec\" is not defined" :severity 1 :code "reportUndefinedVariable" :source "Pyright" :codeDescription (:href "https://github.com/microsoft/pyright/blob/main/doc..."))]))
jsonrpc-connection-receive(#<eglot-lsp-server eglot-lsp-server-157aa616aea0> (:jsonrpc "2.0" :method "textDocument/publishDiagnostics" :params (:uri "[REMOVED]" :version 227 :diagnostics [(:range (:start (:line 16 :character 5) :end (:line 16 :character 25)) :message "Import \"eventline.api_object\" could not be resolve..." :severity 1 :code "reportMissingImports" :source "Pyright" :codeDescription (:href "https://github.com/microsoft/pyright/blob/main/doc...")) (:range (:start (:line 34 :character 40) :end (:line 34 :character 52)) :message "\"ResourceSpec\" is not defined" :severity 1 :code "reportUndefinedVariable" :source "Pyright" :codeDescription (:href "https://github.com/microsoft/pyright/blob/main/doc..."))])))
jsonrpc--process-filter(#<process EGLOT (eventline/python-mode)<1>> "Content-Length: 477\15\n\15\n{\"jsonrpc\":\"2.0\",\"method\":\"...")
I cannot find any mention to a string-replace elisp function, is that an
error in flymake or is there a missing dependency?
Regards,
--
Nicolas Martyanoff
http://snowsyn.net
khaelin <at> gmail.com
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#53843
; Package
emacs
.
(Mon, 07 Feb 2022 14:26:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 53843 <at> debbugs.gnu.org (full text, mbox):
>>>>> On Mon, 07 Feb 2022 13:54:23 +0100, Nicolas Martyanoff <khaelin <at> gmail.com> said:
Nicolas> Hi,
Nicolas> Using eglot with python-mode (with pyright) causes regular errors
Nicolas> involving flymake caused by calls to an unknown "string-replace"
Nicolas> function:
`string-replace' was added in emacs-28, so it looks like your flymake
package needs adjusting. (the version shipped with emacs-28 has ;;
Package-Requires: ((emacs "28.1") (eldoc "1.1.0") (project "0.7.1")))
Robert
--
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#53843
; Package
emacs
.
(Mon, 07 Feb 2022 14:51:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 53843 <at> debbugs.gnu.org (full text, mbox):
Robert Pluim <rpluim <at> gmail.com> writes:
>>>>>> On Mon, 07 Feb 2022 13:54:23 +0100, Nicolas Martyanoff <khaelin <at> gmail.com> said:
>
> Nicolas> Hi,
>
> Nicolas> Using eglot with python-mode (with pyright) causes regular errors
> Nicolas> involving flymake caused by calls to an unknown "string-replace"
> Nicolas> function:
>
> `string-replace' was added in emacs-28, so it looks like your flymake
> package needs adjusting. (the version shipped with emacs-28 has ;;
> Package-Requires: ((emacs "28.1") (eldoc "1.1.0") (project "0.7.1")))
I am using eglot which references a flymake copy from
https://github.com/emacs-straight/flymake.
The author of eglot told me to report the bug here, but I guess the
problem comes from eglot (which requires 26.1+) using a copy of flymake
which requires (28.1+).
I do not understand why emacs loads this copy of flymake without
signaling an error given the constraint in Package-Requires, or why is
eglot using a copy of flymake altogether, but these problems are
unrelated to string-replace.
Thank you for the information anyway!
Regards,
--
Nicolas Martyanoff
http://snowsyn.net
khaelin <at> gmail.com
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#53843
; Package
emacs
.
(Mon, 07 Feb 2022 15:06:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 53843 <at> debbugs.gnu.org (full text, mbox):
>>>>> On Mon, 07 Feb 2022 15:50:03 +0100, Nicolas Martyanoff <khaelin <at> gmail.com> said:
Nicolas> Robert Pluim <rpluim <at> gmail.com> writes:
>>>>>>> On Mon, 07 Feb 2022 13:54:23 +0100, Nicolas Martyanoff <khaelin <at> gmail.com> said:
>>
Nicolas> Hi,
>>
Nicolas> Using eglot with python-mode (with pyright) causes regular errors
Nicolas> involving flymake caused by calls to an unknown "string-replace"
Nicolas> function:
>>
>> `string-replace' was added in emacs-28, so it looks like your flymake
>> package needs adjusting. (the version shipped with emacs-28 has ;;
>> Package-Requires: ((emacs "28.1") (eldoc "1.1.0") (project "0.7.1")))
Nicolas> I am using eglot which references a flymake copy from
Nicolas> https://github.com/emacs-straight/flymake.
Hmm, is that the canonical upstream? I donʼt think so.
Nicolas> The author of eglot told me to report the bug here, but I guess the
Nicolas> problem comes from eglot (which requires 26.1+) using a copy of flymake
Nicolas> which requires (28.1+).
Nicolas> I do not understand why emacs loads this copy of flymake without
Nicolas> signaling an error given the constraint in Package-Requires, or why is
Nicolas> eglot using a copy of flymake altogether, but these problems are
Nicolas> unrelated to string-replace.
I think Package-Requires is used by package.el to prevent you
*installing* incompatible versions of packages, not running them.
As a workaround you could copy the definition of `string-replace' from
emacs-28's subr.el.
Robert
--
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#53843
; Package
emacs
.
(Mon, 07 Feb 2022 15:29:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 53843 <at> debbugs.gnu.org (full text, mbox):
Robert Pluim <rpluim <at> gmail.com> writes:
>>>>>> On Mon, 07 Feb 2022 15:50:03 +0100, Nicolas Martyanoff <khaelin <at> gmail.com> said:
>
> Nicolas> Robert Pluim <rpluim <at> gmail.com> writes:
> >>>>>>> On Mon, 07 Feb 2022 13:54:23 +0100, Nicolas Martyanoff <khaelin <at> gmail.com> said:
> >>
> Nicolas> Hi,
> >>
> Nicolas> Using eglot with python-mode (with pyright) causes regular errors
> Nicolas> involving flymake caused by calls to an unknown "string-replace"
> Nicolas> function:
> >>
> >> `string-replace' was added in emacs-28, so it looks like your flymake
> >> package needs adjusting. (the version shipped with emacs-28 has ;;
> >> Package-Requires: ((emacs "28.1") (eldoc "1.1.0") (project "0.7.1")))
>
> Nicolas> I am using eglot which references a flymake copy from
> Nicolas> https://github.com/emacs-straight/flymake.
>
> Hmm, is that the canonical upstream? I donʼt think so.
Yes, I finally found out that the problem comes from eglot: it requires
a very recent version of flymake; this causes straight.el to install
flymake from this exterior repository, and this version requires Emacs
28.1.
Sorry for the noise on the bug tracker, the problems does not come from Emacs.
> As a workaround you could copy the definition of `string-replace' from
> emacs-28's subr.el.
I did not think about that, good idea! Thank you so much.
Regards,
--
Nicolas Martyanoff
http://snowsyn.net
khaelin <at> gmail.com
Reply sent
to
Robert Pluim <rpluim <at> gmail.com>
:
You have taken responsibility.
(Mon, 07 Feb 2022 15:46:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Nicolas Martyanoff <khaelin <at> gmail.com>
:
bug acknowledged by developer.
(Mon, 07 Feb 2022 15:46:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 53843-done <at> debbugs.gnu.org (full text, mbox):
>>>>> On Mon, 07 Feb 2022 16:28:36 +0100, Nicolas Martyanoff <khaelin <at> gmail.com> said:
Nicolas> Sorry for the noise on the bug tracker, the problems does not come from Emacs.
No worries, closing.
Robert
--
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 08 Mar 2022 12:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 100 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.