Closed brandon-rhodes closed 6 years ago
I've never encountered "dash" before, and so I'm not sure what the macro -->
accomplishes in lsp-ui-sideline.el
that isn't accomplished by simply inlining the lists into each other. But if I replace:
(message (--> (flycheck-error-format-message-and-id e)
(car (split-string it "\n"))
(replace-regexp-in-string "[\n\t ]+" " " it)))
in lsp-ui-sideline--flycheck
with:
(message (replace-regexp-in-string
"[\n\t ]+" " "
(car (split-string
(flycheck-error-format-message-and-id e) "\n"))))
then the feature starts working without error. So, for the moment at least, I'm un-blocked, and can put that definition in my .init.el
if I need to until you have time to debug why this doesn't happen in everyone's copy of the code.
Thanks for lsp-ui
, it's letting me connect Emacs to a larger world of language features!
Is the dash library not loading correctly?
That's where -->
and it
comes from.
Yes, dash is loading correctly. The expression (--> (+ 1 2) (+ 10 it))
that I just had Emacs evaluate comes back as 13
.
This may have nothing to do with the problem but... lexical scoping issue?
And @brandon-rhodes hack fixes my issue as well.
Evaluating the defun for lsp-ui-sideline--flycheck
with C-M-x makes the problem go away :-/
OK I believe I've gotten to the root of this issue.
With the latest lsp-ui (20180619) and an outdated version of dash that came with my system, I get the error. If I update dash, I still get the error. But if I recompile or install lsp-ui with the updated dash the problem goes away. It looks like you can get a different byte compilation result if a package you depend on changes!
@brandon-rhodes can you try installing an updated "dash", then re-installing lsp-ui, and see if that fixes your problem?
The package requirement has been bumped on Sep 4. It seems it shall address the problem.
-;; Package-Requires: ((emacs "25.1") (dash "2.13") (dash-functional "1.2.0") (flycheck "31") (lsp-mode "4.0") (markdown-mode "2.3"))
+;; Package-Requires: ((emacs "25.1") (dash "2.14") (dash-functional "1.2.0") (flycheck "31") (lsp-mode "4.2") (markdown-mode "2.3"))
I have
lsp-mode-20180709.214
andlsp-ui-20180619.251
andflycheck-20180720.947
and this in myinit.el
:When a language server offers a
textDocument/publishDiagnostics
notification, flycheck is correctly putting a little chevron in the gutter over on the left edge of the affected line. But when I move point on to the line, I get the exception:Having read through the source code once, I have no idea where
it
is getting set. I'll go re-read in case I've missed something (and I'll also read the docs on those-->
routines since I saw one of them mentioned in another issue that involved a void variable), but at the moment I can't even tell whereit
was supposed to come from.Oh — and, I'm on Emacs 25.2.2.
Thanks for any hints about how I could debug!