SublimeLinter-contrib-rustc icon indicating copy to clipboard operation
SublimeLinter-contrib-rustc copied to clipboard

[tmp] Allow call `cargo build` directly, multiple bin compilation

Open Kerollmops opened this issue 9 years ago • 10 comments
trafficstars

A temporary fix to the cargo check multiple binary problem related to this sublimelinter-contrib-rust issue can be to allow the user to call directly the cargo build command which will don't ask to specify --bin NAME parameter to compile everything and return all errors/warnings.

_Temporary_ :smile:

Kerollmops avatar Mar 27 '16 22:03 Kerollmops

https://github.com/Kerosene2000/SublimeLinter-contrib-rustc/commit/0caf73599da7a5ea7f3bb30d3446fe909b3128a2 It's working great! But it will be very slow to compile the binaries each time you want to check only the syntax :cry:

Kerollmops avatar Mar 27 '16 23:03 Kerollmops

I filed an issue on the fork of cargo-check called cargo-clippy where activity seems to be much more common. It might be worth considering switching.

vadixidav avatar May 16 '16 13:05 vadixidav

cargo check and cargo clippy are different things, not forks.

Manishearth avatar May 16 '16 14:05 Manishearth

To elaborate, cargo check only parses and type-checks the code,whereas cargo clippy runs a battery of lints (which is slower but will find more things worthy of improvement).

llogiq avatar May 16 '16 15:05 llogiq

Ahh, I thought it was a fork for some reason. Cargo check still hasn't seen nearly as much activity (only 8 commits). On May 16, 2016 11:08 AM, "llogiq" [email protected] wrote:

To elaborate, cargo check only parses and type-checks the code,whereas cargo clippy runs a battery of lints (which is slower but will find more things worthy of improvement).

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/oschwald/SublimeLinter-contrib-rustc/issues/21#issuecomment-219450124

vadixidav avatar May 16 '16 15:05 vadixidav

cargo check does a very simple thing, so there's no need for more activity

Manishearth avatar May 16 '16 15:05 Manishearth

I think cargo check needs to be capable to check multiple bin/libs. cargo build can do that, why not cargo check ?

Kerollmops avatar May 16 '16 15:05 Kerollmops

cargo build doesn't build all bins at once, IIRC

Manishearth avatar May 16 '16 15:05 Manishearth

Anyway, both cargo check and cargo clippy forward to cargo rustc, a built-in subcommand, which is the one which doesn't allow stuff to be run on all targets. The bug should be on cargo

Manishearth avatar May 16 '16 15:05 Manishearth

No, but it checks the syntax and then compile each binary/library, why cargo check cannot just check syntax ? Yes, that's right, cargo rustc is the problem source !

Kerollmops avatar May 16 '16 15:05 Kerollmops