Commit Graph

596 Commits

Author SHA1 Message Date
Aleksey Kladov
1766aae145 Rename EnumVariant -> Variant 2020-07-30 17:56:53 +02:00
Aleksey Kladov
609680ef97 Rename EnumDef -> Enum 2020-07-30 17:52:53 +02:00
Aleksey Kladov
216a5344c8 Rename StructDef -> Struct 2020-07-30 17:50:40 +02:00
Aleksey Kladov
1ae4721c9c Finalize union grammar 2020-07-30 17:38:52 +02:00
bors[bot]
a257fd06b3
Merge #5597
5597: Rename FieldDef -> Field r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-30 14:49:39 +00:00
Aleksey Kladov
0a9e3ccc26 Rename FieldDef -> Field 2020-07-30 16:49:13 +02:00
Aleksey Kladov
d061ab6c8e Code shuffle resiliently 2020-07-30 15:48:35 +02:00
Aleksey Kladov
eb2f806344 Rename TypeAliasDef -> TypeAlias 2020-07-30 15:25:46 +02:00
Aleksey Kladov
1142112c70 Rename FnDef -> Fn 2020-07-30 15:16:05 +02:00
Aleksey Kladov
5cb3d527b0 Rename metric 2020-07-30 12:04:01 +02:00
Aleksey Kladov
e9983f98a9 Do not show progress with parallel analysis 2020-07-30 10:30:01 +02:00
Aleksey Kladov
7204374719 Report instructions in addition to time
They hopefully will be more stable on CI
2020-07-30 10:23:32 +02:00
Aleksey Kladov
afab67e69c Allow negative bytes
Gotta be optimistic about those memory usage optimizations
2020-07-30 09:57:36 +02:00
bors[bot]
bd5d236724
Merge #5563
5563: Check all targets for package-level tasks r=matklad a=SomeoneToIgnore

When invoking "Select Runnable" with the caret on a runnable with a specific target (test, bench, binary), append the corresponding argument for the `cargo check -p` module runnable.

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2020-07-29 21:51:49 +00:00
Aleksey Kladov
63de7bbb5b
Update crates/rust-analyzer/src/cli/analysis_stats.rs
Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
2020-07-29 19:56:54 +02:00
Aleksey Kladov
ba585309ec Replace rand with oorandom 2020-07-29 19:49:10 +02:00
Kirill Bulatov
85d71f4dff Run package-specific cargo check and test for all targets 2020-07-29 15:35:27 +03:00
David Lattimore
cf55806257 SSR: Restrict to current selection if any
The selection is also used to avoid unnecessary work, but only to the
file level. Further restricting unnecessary work is left for later.
2020-07-29 15:06:58 +10:00
Aleksey Kladov
97d309ea4b Bump test timeout for macs 2020-07-28 10:31:08 +02:00
bors[bot]
bc9fab1565
Merge #5532
5532: Restore line index optimization for edits r=matklad a=lnicola



Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-07-27 09:49:45 +00:00
Aleksey Kladov
524c2e9a7c Report type errors in metrics 2020-07-26 12:43:53 +02:00
Laurențiu Nicola
83a87fcd11 Restore line index micro-optimization 2020-07-25 12:56:39 +03:00
Aleksey Kladov
451edcc098 Add rustc-perf to metrics 2020-07-25 10:35:45 +02:00
bors[bot]
a09a00a560
Merge #5520
5520: Add DocumentData to represent in-memory document with LSP info r=matklad a=kjeremy

At the moment this only holds document version information but in the near-future it will hold other things like semantic token delta info.

Co-authored-by: kjeremy <kjeremy@gmail.com>
2020-07-24 20:31:44 +00:00
Jonas Schievink
92a4ec80a0 Only display experimental diagnostics when enabled 2020-07-24 17:39:44 +02:00
Jonas Schievink
f6f49735e8 Add toggle for experimental diagnostics 2020-07-24 17:39:16 +02:00
kjeremy
48da2d4c16 Add DocumentData to represent in-memory document with LSP info 2020-07-24 09:02:57 -04:00
David Lattimore
757f755c29 SSR: Match paths based on what they resolve to
Also render template paths appropriately for their context.
2020-07-24 21:34:00 +10:00
David Lattimore
3975952601 SSR: Pass current file position through to SSR code.
In a subsequent commit, it will be used for resolving paths.
2020-07-24 21:34:00 +10:00
David Lattimore
a45682ed96 Move iteration over all files into the SSR crate
The methods `edits_for_file` and `find_matches_in_file` are replaced with just `edits` and `matches`. This simplifies the API a bit, but more importantly it makes it possible in a subsequent commit for SSR to decide to not search all files.
2020-07-24 21:34:00 +10:00
bors[bot]
6ddcdb8b29
Merge #5511
5511: Set the document version after changes are applied but before vfs r=kjeremy a=kjeremy



Co-authored-by: kjeremy <kjeremy@gmail.com>
2020-07-23 21:49:51 +00:00
kjeremy
c9531dc797 Set the document version after changes are applied but before vfs 2020-07-23 17:46:21 -04:00
Aleksey Kladov
be06aaecde Lighter weight tempdir 2020-07-23 22:26:25 +02:00
Aleksey Kladov
7c0743293e Require quotes around key-value cfg flags in rust-project.json
This matches rustc command-line flags, as well as the build.rs format.
2020-07-23 19:03:17 +02:00
bors[bot]
8df105b8b2
Merge #5505
5505: Cleanup CFG API r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-23 14:55:22 +00:00
Aleksey Kladov
38e38d9b29 Cleanup CFG API 2020-07-23 16:53:12 +02:00
bors[bot]
7bada8a76d
Merge #5473
5473: Changes to rust-project.json r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-23 13:58:45 +00:00
Aleksey Kladov
c2d8829d56 minor 2020-07-23 10:26:56 +02:00
kjeremy
7eedf19cfa Move deprecated attribute to where it is needed 2020-07-22 15:41:38 -04:00
kjeremy
9a9c0e1105 Use symbol tags 2020-07-22 12:18:48 -04:00
bors[bot]
1c7d5f513c
Merge #5481
5481: Track document versions in the server r=kjeremy a=kjeremy

This also pushes diagnostics for the correct file version on close so that when it is reopened stale diagnostics are not shown.

Closes #5452 

Co-authored-by: kjeremy <kjeremy@gmail.com>
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2020-07-22 13:04:30 +00:00
Jeremy Kolb
4f4582a6ad
Update crates/rust-analyzer/src/main_loop.rs
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-22 08:59:05 -04:00
Aleksey Kladov
9ad41eb908 Setup global allocator in the correct crate
It worked before, but was roundabout
2020-07-22 13:42:53 +02:00
Aleksey Kladov
deed44a472 Remove support for jemalloc
We only used it for measuring memory usage, but now we can use glibc's
allocator for that just fine
2020-07-22 13:40:45 +02:00
kjeremy
79a3dd085c Clear diagnostics for known file version on close 2020-07-21 14:18:22 -04:00
kjeremy
97927146db Store document version and pass back to the client 2020-07-21 14:07:42 -04:00
Aleksey Kladov
39a2bc5e3c Expose package roots more directly 2020-07-21 12:52:51 +02:00
bors[bot]
818aeb8a24
Merge #5467
5467: Allow null or empty values for configuration r=matklad a=kjeremy

Allow the client to respond to `workspace/configuration` with `null` values. This is allowed per the spec if the client doesn't know about the configuration we've requested.

This also protects against `null` or `{}` during initialize. I'm not sure if we want to interpret `{}` as "don't change anything" but I think that's a reasonable approach to take.

This should help with LSP clients working out of the box.

Fixes #5464 

Co-authored-by: kjeremy <kjeremy@gmail.com>
2020-07-21 09:41:54 +00:00
Aleksey Kladov
8f3fdf3315 Typo 2020-07-21 10:50:24 +02:00
Aleksey Kladov
a20b8d751b Propagate cargo.target to checkOnSave 2020-07-21 10:30:54 +02:00