Open conao3 opened 4 years ago
I am not quite sure about this, surely we can isolate the lsp-ui-flycheck
into an individual package. Or maybe we can just add flycheck
to Package-Requires
list? Base on the current version of our README file; it seems like lsp-ui
are deeply rely on flycheck
?
But this indeed is a good catch! Thanks for reporting! 👍
Good! Either way, package.el can recognize the dependencies correctly. It is important for package.el to recognize the dependencies in order to schedule the byte-compile order correctly.
Alternatively, we may use define-function
to avoid compile errors.
Or maybe we can just add flycheck to Package-Requires list?
I checked the code and I think that it was removed as part of Flymake effort. Back then flycheck integration was in lsp-ui so lsp-ui had to avoid using flycheck when lsp-mode was using flymake. Not sure if this make sense ATM.
If just suppress the compile error, the users will get an error at runtime.
I recommend either splitting the package or add packageage-require
.
I prefer the former method. There are a lot of packages that have been split this way. https://melpa.org/#/?q=flycheck
This decision is up to @sebastiencs who is the author of this component.
This issue is regarding #555 and #431.
Hi! Thanks for such great work!
I found that
lsp-ui-flycheck
has an implicit (not listed in thePackage-Requires
) dependency. A common solution to this problem is to create a new package calledlsp-ui-flycheck
and make sure thatpackage.el
explicitly knows that the new package depends onflycheck
. Below is aninit.el
and log that reproduces this issue.init.el
log
full log
``` Leaving directory ‘/home/conao/.debug.emacs.d/lsp-ui/elpa/leaf-20200817.1226’ Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/leaf-20200817.1226/leaf.el at Sun Sep 20 19:53:46 2020 Entering directory ‘/home/conao/.debug.emacs.d/lsp-ui/elpa/leaf-20200817.1226/’ Compiling internal form(s) at Sun Sep 20 19:53:46 2020 Leaving directory ‘/home/conao/.debug.emacs.d/lsp-ui/elpa/ppp-20200812.844’ Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/ppp-20200812.844/ppp.el at Sun Sep 20 19:53:46 2020 Entering directory ‘/home/conao/.debug.emacs.d/lsp-ui/elpa/ppp-20200812.844/’ Compiling internal form(s) at Sun Sep 20 19:53:47 2020 Leaving directory ‘/home/conao/.debug.emacs.d/lsp-ui/elpa/keycast-20200612.2247’ Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/keycast-20200612.2247/keycast.el at Sun Sep 20 19:53:47 2020 Entering directory ‘/home/conao/.debug.emacs.d/lsp-ui/elpa/keycast-20200612.2247/’ Compiling internal form(s) at Sun Sep 20 19:53:47 2020 Leaving directory ‘/home/conao/.debug.emacs.d/lsp-ui/elpa/real-auto-save-20200505.1537’ Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/real-auto-save-20200505.1537/real-auto-save.el at Sun Sep 20 19:53:47 2020 Entering directory ‘/home/conao/.debug.emacs.d/lsp-ui/elpa/real-auto-save-20200505.1537/’ Compiling internal form(s) at Sun Sep 20 19:53:48 2020 Leaving directory ‘/home/conao/.debug.emacs.d/lsp-ui/elpa/company-20200831.2016’ Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/company-20200831.2016/company-abbrev.el at Sun Sep 20 19:53:48 2020 Entering directory ‘/home/conao/.debug.emacs.d/lsp-ui/elpa/company-20200831.2016/’ Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/company-20200831.2016/company-bbdb.el at Sun Sep 20 19:53:48 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/company-20200831.2016/company-capf.el at Sun Sep 20 19:53:48 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/company-20200831.2016/company-clang.el at Sun Sep 20 19:53:48 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/company-20200831.2016/company-cmake.el at Sun Sep 20 19:53:48 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/company-20200831.2016/company-css.el at Sun Sep 20 19:53:48 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/company-20200831.2016/company-dabbrev-code.el at Sun Sep 20 19:53:48 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/company-20200831.2016/company-dabbrev.el at Sun Sep 20 19:53:48 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/company-20200831.2016/company-elisp.el at Sun Sep 20 19:53:48 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/company-20200831.2016/company-etags.el at Sun Sep 20 19:53:48 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/company-20200831.2016/company-files.el at Sun Sep 20 19:53:48 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/company-20200831.2016/company-gtags.el at Sun Sep 20 19:53:48 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/company-20200831.2016/company-ispell.el at Sun Sep 20 19:53:48 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/company-20200831.2016/company-keywords.el at Sun Sep 20 19:53:48 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/company-20200831.2016/company-nxml.el at Sun Sep 20 19:53:48 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/company-20200831.2016/company-oddmuse.el at Sun Sep 20 19:53:48 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/company-20200831.2016/company-semantic.el at Sun Sep 20 19:53:48 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/company-20200831.2016/company-template.el at Sun Sep 20 19:53:48 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/company-20200831.2016/company-tempo.el at Sun Sep 20 19:53:48 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/company-20200831.2016/company-tng.el at Sun Sep 20 19:53:48 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/company-20200831.2016/company-yasnippet.el at Sun Sep 20 19:53:48 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/company-20200831.2016/company.el at Sun Sep 20 19:53:48 2020 Compiling internal form(s) at Sun Sep 20 19:53:49 2020 Leaving directory ‘/home/conao/.debug.emacs.d/lsp-ui/elpa/markdown-mode-20200909.2355’ Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/markdown-mode-20200909.2355/markdown-mode.el at Sun Sep 20 19:53:49 2020 Entering directory ‘/home/conao/.debug.emacs.d/lsp-ui/elpa/markdown-mode-20200909.2355/’ Compiling internal form(s) at Sun Sep 20 19:53:50 2020 Leaving directory ‘/home/conao/.debug.emacs.d/lsp-ui/elpa/lv-20200507.1518’ Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lv-20200507.1518/lv.el at Sun Sep 20 19:53:50 2020 Entering directory ‘/home/conao/.debug.emacs.d/lsp-ui/elpa/lv-20200507.1518/’ Compiling internal form(s) at Sun Sep 20 19:53:51 2020 Leaving directory ‘/home/conao/.debug.emacs.d/lsp-ui/elpa/spinner-1.7.3’ Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/spinner-1.7.3/spinner.el at Sun Sep 20 19:53:51 2020 Entering directory ‘/home/conao/.debug.emacs.d/lsp-ui/elpa/spinner-1.7.3/’ spinner.el:101:13:Warning: Package cl is deprecated Compiling internal form(s) at Sun Sep 20 19:53:52 2020 Leaving directory ‘/home/conao/.debug.emacs.d/lsp-ui/elpa/dash-20200803.1520’ Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/dash-20200803.1520/dash.el at Sun Sep 20 19:53:52 2020 Entering directory ‘/home/conao/.debug.emacs.d/lsp-ui/elpa/dash-20200803.1520/’ Compiling internal form(s) at Sun Sep 20 19:53:52 2020 Leaving directory ‘/home/conao/.debug.emacs.d/lsp-ui/elpa/ht-20200217.2331’ Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/ht-20200217.2331/ht.el at Sun Sep 20 19:53:52 2020 Entering directory ‘/home/conao/.debug.emacs.d/lsp-ui/elpa/ht-20200217.2331/’ Compiling internal form(s) at Sun Sep 20 19:53:53 2020 Leaving directory ‘/home/conao/.debug.emacs.d/lsp-ui/elpa/s-20180406.808’ Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/s-20180406.808/s.el at Sun Sep 20 19:53:53 2020 Entering directory ‘/home/conao/.debug.emacs.d/lsp-ui/elpa/s-20180406.808/’ Compiling internal form(s) at Sun Sep 20 19:53:53 2020 Leaving directory ‘/home/conao/.debug.emacs.d/lsp-ui/elpa/f-20191110.1357’ Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/f-20191110.1357/f.el at Sun Sep 20 19:53:53 2020 Entering directory ‘/home/conao/.debug.emacs.d/lsp-ui/elpa/f-20191110.1357/’ Compiling internal form(s) at Sun Sep 20 19:53:54 2020 Leaving directory ‘/home/conao/.debug.emacs.d/lsp-ui/elpa/dash-functional-20200617.702’ Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/dash-functional-20200617.702/dash-functional.el at Sun Sep 20 19:53:54 2020 Entering directory ‘/home/conao/.debug.emacs.d/lsp-ui/elpa/dash-functional-20200617.702/’ Compiling internal form(s) at Sun Sep 20 19:53:55 2020 Leaving directory ‘/home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004’ Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-ada.el at Sun Sep 20 19:53:55 2020 Entering directory ‘/home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/’ Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-angular.el at Sun Sep 20 19:53:55 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-bash.el at Sun Sep 20 19:53:55 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-clangd.el at Sun Sep 20 19:53:55 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-clojure.el at Sun Sep 20 19:53:55 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-cmake.el at Sun Sep 20 19:53:55 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-completion.el at Sun Sep 20 19:53:55 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-crystal.el at Sun Sep 20 19:53:55 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-csharp.el at Sun Sep 20 19:53:55 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-css.el at Sun Sep 20 19:53:55 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-dhall.el at Sun Sep 20 19:53:55 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-diagnostics.el at Sun Sep 20 19:53:55 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-dockerfile.el at Sun Sep 20 19:53:55 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-elixir.el at Sun Sep 20 19:53:55 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-elm.el at Sun Sep 20 19:53:55 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-erlang.el at Sun Sep 20 19:53:55 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-eslint.el at Sun Sep 20 19:53:55 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-fortran.el at Sun Sep 20 19:53:55 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-fsharp.el at Sun Sep 20 19:53:55 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-gdscript.el at Sun Sep 20 19:53:55 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-go.el at Sun Sep 20 19:53:55 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-groovy.el at Sun Sep 20 19:53:55 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-hack.el at Sun Sep 20 19:53:55 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-haxe.el at Sun Sep 20 19:53:55 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-headerline.el at Sun Sep 20 19:53:55 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-html.el at Sun Sep 20 19:53:55 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-javascript.el at Sun Sep 20 19:53:55 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-json.el at Sun Sep 20 19:53:55 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-kotlin.el at Sun Sep 20 19:53:55 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-lens.el at Sun Sep 20 19:53:55 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-lua.el at Sun Sep 20 19:53:55 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-mode.el at Sun Sep 20 19:53:55 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-modeline.el at Sun Sep 20 19:53:56 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-nim.el at Sun Sep 20 19:53:56 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-nix.el at Sun Sep 20 19:53:56 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-ocaml.el at Sun Sep 20 19:53:56 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-perl.el at Sun Sep 20 19:53:56 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-php.el at Sun Sep 20 19:53:56 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-prolog.el at Sun Sep 20 19:53:56 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-protocol.el at Sun Sep 20 19:53:56 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-purescript.el at Sun Sep 20 19:53:58 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-pwsh.el at Sun Sep 20 19:53:58 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-pyls.el at Sun Sep 20 19:53:58 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-r.el at Sun Sep 20 19:53:58 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-racket.el at Sun Sep 20 19:53:58 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-rf.el at Sun Sep 20 19:53:58 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-rust.el at Sun Sep 20 19:53:58 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-solargraph.el at Sun Sep 20 19:53:58 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-sqls.el at Sun Sep 20 19:53:58 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-svelte.el at Sun Sep 20 19:53:58 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-terraform.el at Sun Sep 20 19:53:58 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-tex.el at Sun Sep 20 19:53:58 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-verilog.el at Sun Sep 20 19:53:58 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-vetur.el at Sun Sep 20 19:53:58 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-vhdl.el at Sun Sep 20 19:53:58 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-vimscript.el at Sun Sep 20 19:53:58 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-xml.el at Sun Sep 20 19:53:58 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp-yaml.el at Sun Sep 20 19:53:58 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-mode-20200920.1004/lsp.el at Sun Sep 20 19:53:58 2020 Compiling internal form(s) at Sun Sep 20 19:53:59 2020 Leaving directory ‘/home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-ui-20200920.1008’ Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-ui-20200920.1008/lsp-ui-doc.el at Sun Sep 20 19:53:59 2020 Entering directory ‘/home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-ui-20200920.1008/’ Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-ui-20200920.1008/lsp-ui-flycheck.el at Sun Sep 20 19:54:00 2020 lsp-ui-flycheck.el:30:1:Error: Cannot open load file: No such file or directory, flycheck Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-ui-20200920.1008/lsp-ui-imenu.el at Sun Sep 20 19:54:00 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-ui-20200920.1008/lsp-ui-peek.el at Sun Sep 20 19:54:00 2020 Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-ui-20200920.1008/lsp-ui-sideline.el at Sun Sep 20 19:54:00 2020 In lsp-ui-sideline-mode: lsp-ui-sideline.el:690:29:Warning: assignment to free variable ‘flycheck-display-errors-function’ In end of data: lsp-ui-sideline.el:701:1:Warning: the following functions are not known to be defined: flycheck-overlay-errors-in, flycheck-error-format-message-and-id, flycheck-error-level Compiling file /home/conao/.debug.emacs.d/lsp-ui/elpa/lsp-ui-20200920.1008/lsp-ui.el at Sun Sep 20 19:54:00 2020 ```