Stream: general

Topic: rust-analyzer on wasmtime repo


view this post on Zulip kmeakin (Mar 28 2023 at 20:23):

Is rust-analyzer working on the wasmtime repo? Doesn't seem to be working for me on VSCode. Compile errors arent reported at all, but hundreads of clippy warnings are

view this post on Zulip Chris Fallin (Mar 28 2023 at 20:28):

It's working at least for me and I know for a number of the other contributors; I'm using it under emacs with eglot

view this post on Zulip Chris Fallin (Mar 28 2023 at 20:28):

Are you able to see logs or output? maybe it's missing some configuration or something?

view this post on Zulip kmeakin (Mar 28 2023 at 20:41):

Changing the rust-analyer command from cargo clippy to cargo check seems to fix it

view this post on Zulip kmeakin (Mar 28 2023 at 20:41):

I'm guessinng wasmtime doesnt use clippy, since there are hundreds of clippy warnings?

view this post on Zulip Chris Fallin (Mar 28 2023 at 20:42):

Ah, yeah, actual typechecking is what you want

view this post on Zulip Chris Fallin (Mar 28 2023 at 20:42):

we don't use clippy; it's overly opinionated about a lot of things and suggests refactors that don't make sense, or actively make code worse

view this post on Zulip Chris Fallin (Mar 28 2023 at 20:42):

(that's my opinion at least, may be slightly spicy)

view this post on Zulip kmeakin (Mar 28 2023 at 20:44):

Yeah, the pedantic warnings are overly, well, pedantic. But the default warnings can be pretty helpful - eg useless clones or borrows

view this post on Zulip fitzgen (he/him) (Mar 28 2023 at 22:20):

some of them are helpful, but even the default aren't all great IMO

view this post on Zulip fitzgen (he/him) (Mar 28 2023 at 22:21):

one thing I've never figured out is how to tell rust-analyzer which cargo features to enable or disable from emacs via lsp-mode

view this post on Zulip Chris Fallin (Mar 28 2023 at 22:24):

Oh, yeah, that one's really annoying; if I'm working on something that's under a feature and not on by default, sometimes I just add it to the default feature set (locally, uncommitted) to make LSP work

view this post on Zulip Joel Dice (Mar 28 2023 at 22:29):

Regarding Clippy: perhaps it would help to add a clippy.toml file which disables the opinionated lints. I agree with @kmeakin that some of the lints are quite helpful.

view this post on Zulip Joel Dice (Mar 28 2023 at 22:32):

Err, nevermind the clippy.toml idea. I just noticed this in the Clippy docs: Note: The configuration file is unstable and may be deprecated in the future.

view this post on Zulip kmeakin (Mar 28 2023 at 23:16):

you can ignore them with #![allow(...)] in lib.rs. But you have to repeat that for every crate


Last updated: Nov 22 2024 at 17:03 UTC