Commit graph

67 commits

Author SHA1 Message Date
Lukas Wirth
25391e6d44 Only clear diagnostics of workspaces who have been flychecked 2022-07-20 11:49:36 +02:00
Lukas Wirth
a63b5d3c84 feat: Only flycheck workspace that belongs to saved file 2022-07-18 20:30:58 +02:00
Laurențiu Nicola
9e7ca80c82 Bump cargo_metadata 2022-07-03 10:09:35 +03:00
Laurențiu Nicola
212f84ab46 Bump crossbeam-channel 2022-07-03 09:56:58 +03:00
Lukas Wirth
ddddca8717 fix: Fix flycheck sending cancel progress with no running process 2022-06-30 22:58:57 +02:00
Lukas Wirth
59799312e2 Send a DidCancel event when restarting flychecks 2022-06-16 15:25:50 +02:00
Lukas Wirth
bc1aa93e7e Polish 2022-06-15 18:35:48 +02:00
Lukas Wirth
6438ef9aa3 internal: Bring back JodChild into flychecking for cancellation 2022-06-13 13:51:10 +02:00
Lukas Wirth
76ae5434fa internal: Bump Dependencies 2022-06-10 17:30:02 +02:00
Lukas Wirth
b23b276310 internal: Show more project building errors to the user 2022-04-14 11:31:01 +02:00
Cadu
84cf6ad091 Using error instead of output.stderr in failure mode. 2022-04-05 11:17:39 -03:00
Cadu
ca9718aa42 Made error output the contents of Cargo's stderr as well. 2022-04-04 19:15:20 -03:00
Cadu
8e5c57f050 wordsmithing. 2022-04-04 19:15:20 -03:00
Cadu
635270d4ad Better error message hinting about cargo clippy 2022-04-04 19:15:20 -03:00
Lukas Wirth
8e91bb7660 minor: Bump dependencies 2022-03-22 17:42:24 +01:00
iDawer
676744be6e Bump MSRV (1.57) 2021-12-16 01:56:12 +05:00
Lukas Wirth
3fcbcf4a0e Don't discard flycheck error messages 2021-11-27 18:57:51 +01:00
Wilfred Hughes
f6f6b3a7ad Allow the check command to terminate without output
Cargo will always output something on success:

```
$ cargo check --message-format=json
{"reason":"compiler-artifact", ... snipped ... }
{"reason":"build-finished","success":true}
```

However, rustc does not output anything on success:

```
$ rustc --error-format=json main.rs
$ echo $?
0
```

Restore the behaviour prior to #10517, where an exit code of 0 is
considered good even if nothing is written to stdout.

This enables custom overrideCommand values that use rustc rather than
cargo.
2021-11-12 11:43:20 -08:00
Laurențiu Nicola
8457ae34bd Set MSRV 2021-10-23 15:07:11 +03:00
Lukas Wirth
1294bfce86 Migrate to edition 2021 2021-10-21 20:10:40 +02:00
Milo
35de195c41 a few clippy fixes 2021-10-14 19:57:21 +01:00
Lukas Wirth
2ec406bf64 Remove unnecessary unused attribute 2021-10-11 14:42:18 +02:00
Lukas Wirth
d14c9be321 Show cargo check failures to the user 2021-10-11 14:09:20 +02:00
Aramis Razzaghipour
eff195852d
Fix miscellaneous Clippy lints 2021-10-03 23:53:30 +11:00
Aramis Razzaghipour
55c0b86cde
Add semicolons for consistency
`clippy::semicolon_if_nothing_returned`
2021-10-03 23:39:43 +11:00
Aleksey Kladov
73b0f9dc04 internal: remove dead code 2021-09-15 21:22:06 +03:00
Lukas Wirth
36a5ce9790 minor: fix some clippy lints 2021-09-03 16:00:50 +02:00
Dezhi Wu
ba0947dded switch log crate to tracing 2021-08-30 15:11:42 +08:00
Aleksey Kladov
8d8c26e6f5 internal: a bit more of cwd safety for flycheck 2021-07-17 18:13:35 +03:00
kjeremy
35016c772c cargo_metadata 0.14
Removes the following dependent crates:
* semver-parser
* pest
* ucd-trie

Removes project_model's dependency on itertools
2021-07-09 11:01:55 -04:00
Manas
f5c9407a8f This patch shortens the spawned threads' names, as threads on Linux
have an upper limit of 16 characters for their names.
2021-07-08 18:27:54 +05:30
Manas
5e6eee5f63 Explicitly name all spawned threads
The thread name is shown in debugger as well as panic messages and this
patch makes it easier to follow a thread instead of looking through
full backtrace, by naming all spawned threads according to their
functioning.
2021-07-08 01:23:57 +05:30
Aleksey Kladov
86720f2953 minor: drop dummy authors field 2021-07-05 14:19:41 +03:00
Brendan Cully
c4664609ed Use package root as cargo check working directory
Cargo commands are affected by the `.cargo/config` files above
their working directory. If cargo is invoked from above the directory
holding `Cargo.toml`, it may not pick up important settings like
registry replacements, causing it to behave differently or even fail.

Most cargo invocations are currently setting their working directories
to the directory containing `Cargo.toml`, but a couple of paths remain
in which cargo is invoked from the default workspace root instead.

This change fixes that, resolving some cargo check failures that I
experienced in a multi-root workspace in which packages used different
registries.
2021-05-12 19:50:52 -07:00
James Leitch
b3a7953cae Code review feedback. 2021-04-19 12:26:04 -07:00
James Leitch
b5c194f3f7 Flycheck tries to parse both Cargo and Rustc messages. 2021-04-18 16:36:29 -07:00
Laurențiu Nicola
b20708f6ee Bump cargo_metadata 2021-03-02 14:27:29 +02:00
Aleksey Kladov
4b59c3a538 Make logger-based debugging more pleasant 2021-01-28 17:07:53 +03:00
kjeremy
1da68e87af Unfreeze cargo_metadata
It now pulls in a newer version of semver-parser.
2021-01-11 08:27:16 -05:00
Edwin Cheng
54eb87de03 Refactor out JodChild 2021-01-08 01:08:34 +08:00
kjeremy
9a3142664b Pin cargo_metadata 2020-11-25 10:11:53 -05:00
Jeremy Kolb
f64f569483 Update crates
This brings in a number of new dependencies though.
2020-10-20 17:36:02 -04:00
Laurențiu Nicola
db7813ef2c Bump crossbeam-channel in crates 2020-10-13 16:57:01 +03:00
Jonas Schievink
1a28f30ba4 Spawn a flycheck instance per workspace 2020-09-27 19:41:54 +02:00
Pavan Kumar Sunkara
335add49db Add description for crates that will be published 2020-08-24 13:07:22 +02:00
Pavan Kumar Sunkara
a8fa5cd42e Add version to deps in cargo.toml 2020-08-24 11:10:41 +02:00
Aleksey Kladov
1b0c7701cc Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00
Aleksey Kladov
8d34262956 Rename ra_toolchain -> toolchain 2020-08-12 16:52:28 +02:00
Veetaha
4f386afb16 Log the command flycheck runs to debug misconfigurations
Without this users have no clue why flycheck fails to run.
This is what is printed to the output channel:
```
[ERROR rust_analyzer::main_loop] cargo check failed: Cargo watcher failed,the command produced no valid metadata (exit code: ExitStatus(ExitStatus(25856)))
```

I stumbled with this figuring out that rust-analyzer adds `--all-features` which is not intended
for some crates in the workspace (e.g. they have mutually-exclusive features.
Having the command rust-analyzer ran should help a lot
2020-08-11 03:12:09 +03:00
Clemens Wasser
8d9f8ac273 flycheck: Added checkOnSave.noDefaultFeatures
This commit adds the option
`rust-analyzer.checkOnSave.noDefaultFeatures`
and fixes #5550.
2020-07-30 16:04:01 +02:00