Commit Graph

7509 Commits

Author SHA1 Message Date
Laurențiu Nicola
0fdca457df Improve auto import message 2020-01-31 22:12:18 +02:00
bors[bot]
12ac379c6c
Merge #2966
2966: Fix extra parentheses warnings r=kjeremy a=lnicola



Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-01-31 19:50:27 +00:00
Laurențiu Nicola
f83154d4bf Disable optimizations for some build-time crates 2020-01-31 21:49:44 +02:00
Laurențiu Nicola
0829e26354 Fix extra parentheses warnings 2020-01-31 21:07:21 +02:00
Laurențiu Nicola
d4d72e8b9b Improve responsiveness of the cargo check status label 2020-01-31 20:55:10 +02:00
Florian Diebold
ba45c60611 Fix env in emacs runnables support 2020-01-31 16:06:31 +01:00
bors[bot]
dc713ea21b
Merge #2960
2960: Small cleanup r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-01-31 12:35:15 +00:00
Aleksey Kladov
9d5a5211a4 Small cleanup 2020-01-31 13:34:44 +01:00
bors[bot]
e48033d066
Merge #2946
2946: updating nvim_lsp usage for rust_analyzer r=matklad a=matu3ba

The other option is invalid and a working version depends on [PR](https://github.com/neovim/nvim-lsp/pull/107)

Co-authored-by: Jan <jan.hafer@rwth-aachen.de>
2020-01-30 17:25:44 +00:00
bors[bot]
90b18a3f97
Merge #2955
2955: ⬆️ rust r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-01-30 17:14:42 +00:00
Aleksey Kladov
21950adc94 Switch Cargo.lock to the new format 2020-01-30 18:14:20 +01:00
Aleksey Kladov
5d7614197d ⬆️ rust 2020-01-30 18:03:24 +01:00
bors[bot]
bc29b7c0e5
Merge #2954
2954: Add a FIXME note r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-01-30 17:02:12 +00:00
Aleksey Kladov
c2e3dba8cb Add a FIXME note 2020-01-30 18:01:38 +01:00
bors[bot]
c7e0baf1a8
Merge #2920
2920: Better handle illformed node id from metadata r=matklad a=edwin0cheng

In some rare cases, deps node-id from cargo-metadata do not match its version-id, which cause a panic in `cargo-workspace.rs`. This PR try to ignore these ill-formed node id from `cargo-metadata`. An alternative is return  `Err` in these cases but I think make it resilience is a better choice here.

Related #2767

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2020-01-30 16:48:35 +00:00
bors[bot]
5f0b17b52d
Merge #2953
2953: Update crates r=kjeremy a=kjeremy



Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2020-01-30 13:10:53 +00:00
Jeremy Kolb
a37ee9c8a4 Update crates 2020-01-30 08:07:42 -05:00
bors[bot]
0c2e7032b1
Merge #2952
2952: Simplify fixture parsing r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-01-30 12:18:32 +00:00
Aleksey Kladov
c445c72eb3 Simplify fixture parsing 2020-01-30 13:17:56 +01:00
bors[bot]
5dcd9fdf5e
Merge #2895
2895: Rewrite ra_prof's profile printing r=michalt a=michalt

This changes the way we print things to first construct a mapping from
events to the children and uses that mapping to actually print things.
It should not change the actual output that we produce.

The new approach two benefits:

 * It avoids a potential quadratic behavior of the previous approach.
   For instance, for a vector of N elements:
   ```
   [Message{level: (N - 1)}, ..., Message{level: 1}, Message{level: 0}]
   ```
   we would first do a linear scan to find entry with level 0, then
   another scan to find one with level 1, etc.

 * It makes it much easier to improve the output in the future, because
   we now pre-compute the children for each entry and can easily take
   that into account when printing.

Signed-off-by: Michal Terepeta <michal.terepeta@gmail.com>

Co-authored-by: Michal Terepeta <michal.terepeta@gmail.com>
2020-01-29 20:09:49 +00:00
Michal Terepeta
644c383f65 A couple of small improvements to ra_prof printing
Based on suggestions from @matklad.

Signed-off-by: Michal Terepeta <michal.terepeta@gmail.com>
2020-01-29 20:55:35 +01:00
Jan
53fd24a6d3 updating nvim_lsp usage for rust_analyzer 2020-01-29 20:11:32 +01:00
bors[bot]
d92a15c163
Merge #2943
2943: Re-sync queries for memory usage measurnment r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-01-29 15:11:38 +00:00
Aleksey Kladov
f1720d7983 Re-sync queries for memory usage measurnment 2020-01-29 16:10:46 +01:00
bors[bot]
b67f695956
Merge #2942
2942: Properly select a target for auto importing r=matklad a=SomeoneToIgnore

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/2932

The corresponding test has the caret placed in the beggining of the document despite the import inserted, but I don't thing I should fix it here:
* in real life, there's some text written before the import and for those cases the caret behaves normally
* it's a separate functionality that needs to be refactored anyway later (the `auto_import_text_edit`)

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2020-01-29 14:35:28 +00:00
Kirill Bulatov
6d219c9a10 Properly select a target for auto importing 2020-01-29 16:23:18 +02:00
bors[bot]
e3c81b67ff
Merge #2941
2941: Freshen Architecture.md document r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-01-29 14:09:04 +00:00
Aleksey Kladov
84dfbfbd1d Freshen Architecture.md document 2020-01-29 15:08:31 +01:00
bors[bot]
2fb6af89eb
Merge #2940
2940: Freshen dev docs a tiny bits r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-01-29 13:46:00 +00:00
Aleksey Kladov
1065c2bf1d Freshen dev docs a tiny bits 2020-01-29 14:45:32 +01:00
bors[bot]
a0be39296d
Merge #2939
2939: Simplify fixture parsing r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-01-29 13:13:30 +00:00
Aleksey Kladov
d2fd252f9d Simplify fixture parsing 2020-01-29 14:06:23 +01:00
bors[bot]
f7268ddab2
Merge #2938
2938: Fix long loop timeout r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-01-29 13:04:46 +00:00
Aleksey Kladov
7cc0a86528 Fix long loop timeout 2020-01-29 14:04:10 +01:00
bors[bot]
abc5828c05
Merge #2937
2937: Parse cargo output a line at a time. r=kiljacken a=kiljacken

We previously used serde's stream deserializer to read json blobs from
the cargo output. It has an issue though: If the deserializer encounters
invalid input, it gets stuck reporting the same error again and again
because it is unable to foward over the input until it reaches a new
valid object.

Reading a line at a time and manually deserializing fixes this issue,
because cargo makes sure to only outpu one json blob per line, so should
we encounter invalid input, we can just skip a line and continue.

The main reason this would happen is stray printf-debugging in
procedural macros, so we still report that an error occured, but we
handle it gracefully now.

Fixes #2935

Co-authored-by: Emil Lauridsen <mine809@gmail.com>
2020-01-29 12:51:52 +00:00
Emil Lauridsen
4ec5f6e258 Change error output to make a bit more sense 2020-01-29 13:51:20 +01:00
Emil Lauridsen
8ffbe86dfd Parse cargo output a line at a time.
We previously used serde's stream deserializer to read json blobs from
the cargo output. It has an issue though: If the deserializer encounters
invalid input, it gets stuck reporting the same error again and again
because it is unable to foward over the input until it reaches a new
valid object.

Reading a line at a time and manually deserializing fixes this issue,
because cargo makes sure to only outpu one json blob per line, so should
we encounter invalid input, we can just skip a line and continue.

The main reason this would happen is stray printf-debugging in
procedural macros, so we still report that an error occured, but we
handle it gracefully now.

Fixes #2935
2020-01-29 13:40:27 +01:00
Aleksey Kladov
9f68f7acf2 Tweak readme 2020-01-29 13:25:32 +01:00
Aleksey Kladov
5643c0730a
Merge pull request #2936 from matklad/better-release
Make sure release uses the release branch, and not master
2020-01-29 12:24:09 +00:00
Aleksey Kladov
f4fd91a7fe Make sure release uses the release branch, and not master 2020-01-29 13:19:51 +01:00
bors[bot]
6fd29651b4
Merge #2931
2931: Added documentation to test_utils r=matklad a=Veetaha

Added some doc comments to test_utils functions while studying this crate. They should be all stable enough to document them.
Also some minor code relocation in `parse_fixture()` closer to its usage according to the advice of @matklad.

Co-authored-by: Veetaha <gerzoh1@gmail.com>
2020-01-29 11:06:18 +00:00
bors[bot]
7a2b87db73
Merge #2934
2934: Complain loudly if the main loop is blocked r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-01-29 10:24:08 +00:00
Aleksey Kladov
9753eb98cc Complain loudly if the main loop is blocked 2020-01-29 11:21:49 +01:00
Aleksey Kladov
aaa4861a0b More uniform naming 2020-01-29 11:15:08 +01:00
bors[bot]
3ea8940d94
Merge #2933
2933: Don't compute diagnostics on the main thread r=matklad a=matklad

closes #2909

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-01-29 10:14:12 +00:00
Aleksey Kladov
2d2585e03f Don't compute diagnostics on the main thread
closes #2909
2020-01-29 11:03:59 +01:00
Veetaha
5e1ae1d7aa test_utils: move flush!() to its usage as per conversation with @matklad 2020-01-29 03:53:15 +02:00
Veetaha
d3472e8ae4 test_utils: updated documentation and some typos 2020-01-29 03:52:13 +02:00
bors[bot]
3bdf2e0972
Merge #2917
2917: Prefer imports starting with std r=matklad a=SomeoneToIgnore

Closes https://github.com/rust-analyzer/rust-analyzer/issues/2915

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2020-01-28 16:22:18 +00:00
Kirill Bulatov
713870ee0c Add the tests 2020-01-28 18:03:24 +02:00