Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
emacs rust clippy integration issue [fixed]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3638

PostPosted: Tue Mar 08, 2022 7:08 pm    Post subject: emacs rust clippy integration issue [fixed] Reply with quote

When saving rust standalone main.rs, message buffer gets
Code:
Suspicious state from syntax checker rust-cargo: Flycheck checker rust-cargo returned 101, but its output contained no errors: error: no library targets found in package `playground`

Try installing a more recent version of rust-cargo, and please open a bug report if the issue persists in the latest release.  Thanks!
Code:
output of M-x flycheck-verify-setup
returns:
Code:
Syntax checkers for buffer main.rs in rust-mode:

First checker to run:

  rust-cargo
    - may enable:  yes
    - may run:     t
    - executable:  Found at /usr/bin/cargo
    - Cargo.toml:  Found
    - Crate type:  lib
    - Binary name: Not required

Checkers that could run if selected:

  rust  select
    - may enable: yes
    - may run:    t
    - executable: Found at /usr/bin/rustc

Checkers that are compatible with this mode, but will not run until properly configured:

  rust-clippy (automatically disabled) reset
    - may enable: no
    - may run:    t
    - executable: Found at /usr/bin/cargo
    - Clippy:     Cannot find the `cargo clippy' command
    - Cargo.toml: Found

Flycheck Mode is enabled.  Use C-u C-c ! x to enable disabled
checkers.

--------------------

Flycheck version: 32snapshot
Emacs version:    27.2
System:           x86_64-pc-linux-gnu
Window system:    x
So issue seems with cargo clippy.
Code:
[ebuild   R   ~] dev-lang/rust-1.59.0:stable/1.59::gentoo  USE="clippy -debug -dist -doc miri nightly -parallel-compiler rls rust-src rustfmt system-bootstrap -system-llvm -test verify-sig wasm" ABI_X86="-32 (64) (-x32)" CPU_FLAGS_X86="sse2" LLVM_TARGETS="-AArch64 -AMDGPU -ARM -AVR -BPF -Hexagon -Lanai -MSP430 -Mips -NVPTX -PowerPC -RISCV -Sparc -SystemZ WebAssembly (X86) -XCore" 0 KiB

No idea how to fix?
NB: running cargo clippy from terminal works fine.

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "


Last edited by CaptainBlood on Wed Mar 09, 2022 9:46 am; edited 3 times in total
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3638

PostPosted: Tue Mar 08, 2022 8:28 pm    Post subject: Reply with quote

flycheck-rust install stanza fixed here.
EDIT: actually it didn't.
Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3638

PostPosted: Wed Mar 09, 2022 9:44 am    Post subject: Reply with quote

Fixed with manual build of
Code:
 cat /etc/portage/patches/app-emacs/flycheck/flycheck-rust-cargo.patch
--- a/flycheck.el   2022-03-09 12:23:37.136702051 +0300
+++ b/flycheck.el   2022-03-09 12:26:35.680037307 +0300
@@ -11431,7 +11431,8 @@
 
 Execute `cargo --list' to find out whether COMMAND is present."
   (let ((cargo (funcall flycheck-executable-find "cargo")))
-    (member command (mapcar #'string-trim-left
+    (cl-some (lambda (x) (string-prefix-p command x))
+             (mapcar #'string-trim-left
                             (ignore-errors (process-lines cargo "--list"))))))
 
 (defun flycheck-rust-valid-crate-type-p (crate-type)
pull request source
Successfully checked running
Code:
M-x flycheck-verify-setup

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum