Commit graph

356 commits

Author SHA1 Message Date
Jeremy Kolb
3f44aaf363 use flatten branch of lsp-types 2019-07-07 14:13:13 -04:00
Jeremy Kolb
9438bbc75a Formatting again 2019-07-04 19:31:06 -04:00
Jeremy Kolb
b4c0c7f79c Symplify by using into() 2019-07-04 19:08:08 -04:00
Jeremy Kolb
e7fb6c83cc Formatting 2019-07-04 17:43:19 -04:00
Jeremy Kolb
4ad9e986ad Some clippy fixes for 1.36 2019-07-04 17:43:00 -04:00
Jeremy Kolb
a394c04bca Fix formatting 2019-07-04 16:58:52 -04:00
Jeremy Kolb
ad4276ac05 Change default() 2019-07-04 16:57:52 -04:00
Jeremy Kolb
9bfdab7089 Update to lsp-types 0.58.0 2019-07-04 16:57:52 -04:00
Aleksey Kladov
1834bae5b8 allow rustfmt to reorder imports
This wasn't a right decision in the first place, the feature flag was
broken in the last rustfmt release, and syntax highlighting of imports
is more important anyway
2019-07-04 23:09:09 +03:00
Aleksey Kladov
18a1e092e9 Move memory usage statistics to ra_prof 2019-06-30 13:30:17 +03:00
Ryan Cumming
e052ca9d61 Swallow expected rustfmt errors
My workflow in Visual Studio Code + Rust Analyzer has become:

1. Make a change to Rust source code using all the analysis magic

2. Save the file to trigger `cargo watch`. I have format on save enabled
   for all file types so this also runs `rustfmt`

3. Fix any diagnostics that `cargo watch` finds

Unfortunately if the Rust source has any syntax errors the act of saving
will pop up a scary "command has failed" message and will switch to the
"Output" tab to show the `rustfmt` error and exit code.

I did a quick survey of what other Language Servers do in this case.
Both the JSON and TypeScript servers will swallow the error and return
success. This is consistent with how I remember my workflow in those
languages. The syntax error will show up as a diagnostic so it should
be clear why the file isn't formatting.

I checked the `rustfmt` source code and while it does distinguish "parse
errors" from "operational errors" internally they both result in exit
status of 1. However, more catastrophic errors (missing `rustfmt`,
SIGSEGV, etc) will return 127+ error codes which we can distinguish from
a normal failure.

This changes our handler to log an info message and feign success if
`rustfmt` exits with status 1.

Another option I considered was only swallowing the error if the
formatting request came from format-on-save. However, the Language
Server Protocol doesn't seem to distinguish those cases.
2019-06-27 08:08:26 +10:00
kjeremy
f8f136e990 Bump cargo_metadata, ena, flexi_logger 2019-06-20 15:09:39 -04:00
Aleksey Kladov
b0be4207d0 reuse AnalysisHost in batch analysis 2019-06-15 16:29:23 +03:00
Aleksey Kladov
24703acf26 re-enable backtraces on panic 2019-06-15 12:58:17 +03:00
Muhammad Mominul Huque
ebb40c7f87
cargo format 2019-06-15 13:37:15 +06:00
Muhammad Mominul Huque
9709bd39ca
Get rid of failure: ra_lsp_server & ra_project_model 2019-06-15 02:42:56 +06:00
Aleksey Kladov
d32e15cae6 Temp fix for slow onEnter issue
The issue was windows specific -- cancellation caused collection of
bracktraces at some point, and that was slow on windows.

The proper fix here is to make sure that we don't collect bracktraces
unnecessary (which we currently do due to failure), but, as a
temporary fix, let's just not force their collection in the first
place!
2019-06-13 21:29:44 +03:00
Aleksey Kladov
fed52706de make LRU cache configurable 2019-06-12 13:36:24 +03:00
Aleksey Kladov
33026c654e make Docs handing more ideomatic 2019-06-08 14:16:05 +03:00
Alan Du
b28ca32db2 Fix clippy::or_fun_call 2019-06-04 18:05:07 -04:00
Alan Du
40424d4222 Fix clippy::identity_conversion 2019-06-04 18:05:07 -04:00
Alan Du
7bcd8d6290 Fix clippy::unused_mut 2019-06-04 18:05:07 -04:00
Alan Du
6095e3fe19 Fix clippy::unnecessary_mut_passed 2019-06-04 18:05:07 -04:00
Alan Du
ecd420636e Fix clippy::single_match 2019-06-04 18:05:07 -04:00
Aleksey Kladov
bf801953a3 rename 2019-06-01 10:31:40 +03:00
Aleksey Kladov
678a458543 move subs inside 2019-06-01 10:24:43 +03:00
Aleksey Kladov
78e17f65cf use sync queries for join lines and friends 2019-05-31 20:53:00 +03:00
Aleksey Kladov
c6537c3280 add sync requests 2019-05-31 20:50:16 +03:00
Aleksey Kladov
9697d8afad cleanup 2019-05-31 20:42:53 +03:00
Aleksey Kladov
15efd58274 cleanup 2019-05-31 20:30:14 +03:00
Aleksey Kladov
2d773a46c9 simplify 2019-05-31 20:23:56 +03:00
Aleksey Kladov
e1bda6aeda move completed requests to a separate file 2019-05-31 20:14:54 +03:00
Aleksey Kladov
838915c9a2 simplify 2019-05-31 19:24:33 +03:00
Aleksey Kladov
8bb02859e8 introduce constant 2019-05-31 19:20:22 +03:00
Aleksey Kladov
0e542936be minor 2019-05-31 19:17:46 +03:00
Aleksey Kladov
b6a854e161 update ra_ide_api to use builtins 2019-05-30 16:10:07 +03:00
Aleksey Kladov
18ed351747 ⬆️ parking_lot 2019-05-30 12:02:30 +03:00
Aleksey Kladov
9304cb0263 bump timeout for CI 2019-05-29 22:14:06 +03:00
Aleksey Kladov
a9373c4220 less noisy status 2019-05-29 21:07:38 +03:00
Aleksey Kladov
5c410385fc optimization: cancel backlog in onEnter 2019-05-29 16:05:14 +03:00
Aleksey Kladov
2c9a1cb3dd add latest requests to status page 2019-05-29 15:47:46 +03:00
Aleksey Kladov
e45c350a3b log the actual time of requests 2019-05-29 14:59:01 +03:00
Aleksey Kladov
118a2113c1 trigger garbage collection *after* requests, not before 2019-05-29 14:37:04 +03:00
Aleksey Kladov
6a1e3e59cb more perf logging 2019-05-29 14:34:21 +03:00
Aleksey Kladov
a6f1b171bc silnce profiling in tests 2019-05-29 10:33:47 +03:00
bors[bot]
b2bf41b2ba Merge #1334
1334: check for cancellation during macro expansion r=matklad a=matklad

closes #1331

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-05-27 11:45:41 +00:00
Aleksey Kladov
a2845bb1f5 check cancellation when expanding macros 2019-05-27 14:41:14 +03:00
Aleksey Kladov
cf214ac4e7 enable profiling in tests 2019-05-27 14:20:11 +03:00
Pascal Hertleif
4ac338b608
rename stray id field 2019-05-27 11:26:35 +02:00
Pascal Hertleif
5abcca516d
make it build again 2019-05-27 11:26:35 +02:00