about summary refs log tree commit diff
path: root/crates/rust-analyzer
AgeCommit message (Collapse)AuthorLines
2020-07-10Avoid accidently stumping over config valuesAleksey Kladov-134/+169
2020-07-09Always put config firstAleksey Kladov-1/+0
2020-07-09Move diagnostics tests to expectAleksey Kladov-112/+49
2020-07-09Add fixmesAleksey Kladov-0/+2
2020-07-09SimplifyAleksey Kladov-133/+13
2020-07-09Cleanup diagnostic conversion codeAleksey Kladov-102/+72
2020-07-08Add Markup typeAleksey Kladov-11/+12
2020-07-08Remove unwanted dependencyAleksey Kladov-15/+14
2020-07-08Clippy perf warningskjeremy-2/+1
2020-07-07Merge #5244bors[bot]-1/+21
5244: Add a command to compute memory usage statistics r=matklad a=jonas-schievink This allows inspecting memory usage on a live rust-analyzer instance after it has been used interactively. This will only work with `--features jemalloc`, so maybe it should print something more useful when that's not available? Right now it will just print 0 Bytes for every query. Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2020-07-07Modernize unqualified reference completion testsAleksey Kladov-0/+1
2020-07-07Add a command to compute memory usage statisticsJonas Schievink-1/+21
2020-07-05Fix typoAleksey Kladov-6/+6
2020-07-04Add Item change to the set of benchesAleksey Kladov-0/+13
2020-07-04Fix bench to work with relative pathsAleksey Kladov-15/+14
2020-07-03Add AssistKind::GenerateAleksey Kladov-1/+1
2020-07-03Merge #5209bors[bot]-4/+14
5209: Fixes to memory usage stats r=matklad a=jonas-schievink This brings the unaccounted memory down from 287mb to 250mb, and displays memory used by VFS and "other" allocations. Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2020-07-03Fix workspace reloadingAleksey Kladov-1/+4
2020-07-03Track VFS and remaining/unaccounted memoryJonas Schievink-4/+14
2020-07-02Don't categorize things we don't care aboutkjeremy-4/+0
2020-07-02Move AssistKind into AssistIdkjeremy-1/+1
2020-07-02Categorize assistsJeremy Kolb-4/+18
2020-07-02Merge #5192bors[bot]-8/+17
5192: Implement rust-analyzer feature configuration to tests. r=matklad a=daxpedda Fixes #3198. I'm unsure if it is desired this way, maybe we want to make a seperate configuration? Co-authored-by: daxpedda <daxpedda@gmail.com>
2020-07-02Move cargo metadata off the main loopAleksey Kladov-41/+54
2020-07-02Implement rust-analyzer feature configuration to tests.daxpedda-8/+17
2020-07-02Merge #5191bors[bot]-9/+8
5191: Minor r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-02MinorAleksey Kladov-9/+8
2020-07-02Merge #5188bors[bot]-11/+86
5188: Implement StatusBar r=matklad a=matklad Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-02Indicate when project needs a reloadAleksey Kladov-7/+51
2020-07-02Implement StatusBarAleksey Kladov-4/+35
2020-07-01Fold multiline callsAleksey Kladov-18/+13
2020-07-01Automatically reload project on config changeAleksey Kladov-2/+5
2020-07-01Better account for project reloadAleksey Kladov-6/+8
2020-07-01Add reload workspace commandAleksey Kladov-4/+4
2020-07-01Use the selection range when resolving call hierarchy itemsJeremy Kolb-2/+2
Add a test in call_hierarchy that already passed Fixes #5103
2020-07-01Dont show empty progress for empty workspacesAleksey Kladov-16/+18
2020-07-01Merge #5159bors[bot]-1/+1
5159: Don't fail expect tests in rewrite mode r=matklad a=matklad bors r+ Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-01Add file support to expectAleksey Kladov-1/+1
2020-07-01Structured search debuggingDavid Lattimore-3/+78
2020-06-30analysis-stats: allow parallel type inferenceJonas Schievink-5/+42
2020-06-30Remove confusing APIAleksey Kladov-4/+17
2020-06-30Merge #5132bors[bot]-1/+1
5132: Fix some typos r=matklad a=davidlattimore Co-authored-by: David Lattimore <dml@google.com>
2020-06-30Merge #5101bors[bot]-4/+24
5101: Add expect -- a light-weight alternative to insta r=matklad a=matklad This PR implements a small snapshot-testing library. Snapshot updating is done by setting an env var, or by using editor feature (which runs a test with env-var set). Here's workflow for updating a failing test: ![expect](https://user-images.githubusercontent.com/1711539/85926956-28afa080-b8a3-11ea-9260-c6d0d8914d0b.gif) Here's workflow for adding a new test: ![expect-fresh](https://user-images.githubusercontent.com/1711539/85926961-306f4500-b8a3-11ea-9369-f2373e327a3f.gif) Note that colorized diffs are not implemented in this PR, but should be easy to add (we already use them in test_utils). Main differences from insta (which is essential for rust-analyzer development, thanks @mitsuhiko!): * self-updating tests, no need for a separate tool * fewer features (only inline snapshots, no redactions) * fewer deps (no yaml, no persistence) * tighter integration with editor * first-class snapshot object, which can be used to write test functions (as opposed to testing macros) * trivial to tweak for rust-analyzer needs, by virtue of being a workspace member. I think eventually we should converge to a single snapshot testing library, but I am not sure that `expect` is exactly right, so I suggest rolling with both insta and expect for some time (if folks agree that expect might be better in the first place!). # Editor Integration Implementation The thing I am most excited about is the ability to update a specific snapshot from the editor. I want this to be available to other snapshot-testing libraries (cc @mitsuhiko, @aaronabramov), so I want to document how this works. The ideal UI here would be a code action (:bulb:). Unfortunately, it seems like it is impossible to implement without some kind of persistence (if you save test failures into some kind of a database, like insta does, than you can read the database from the editor plugin). Note that it is possible to highlight error by outputing error message in rustc's format. Unfortunately, one can't use the same trick to implement a quick fix. For this reason, expect makes use of another rust-analyzer feature -- ability to run a single test at the cursor position. This does need some expect-specific code in rust-analyzer unfortunately. Specifically, if rust-analyzer notices that the cursor is on `expect!` macro, it adds a special flag to runnable's JSON. However, given #5017 it is possible to approximate this well-enough without rust-analyzer integration. Specifically, an extension can register a special runner which checks (using regexes) if rust-anlyzer runnable covers text with specific macro invocation and do special magic in that case. closes #3835 Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-06-30Format & replace todos with 'fixme'Zac Pullar-Strecker-1/+1
2020-06-30Update missed heavy testZac Pullar-Strecker-1/+1
2020-06-30Switch to pulldown-cmark, tidy importsZac Pullar-Strecker-1/+1
2020-06-30Move resolver into impls, work on testsZac Pullar-Strecker-2/+1
2020-06-30Remove local documentation link rewritingZac Pullar-Strecker-1/+1
2020-06-30Hover doc link rewritingZac Pullar-Strecker-0/+1
2020-06-30Fix some typosDavid Lattimore-1/+1