Commit Graph

10872 Commits

Author SHA1 Message Date
bors[bot]
104fad65da
Merge #5025
5025: Don't mess with messy temp dir and just download into extension dir r=matklad a=Veetaha

Temp dirs are messy. Dealing with them requires handling quite a bunch of
edge cases. As proposed by lnicola this seems better to just put the temp files
in the extension dir and not care much about suddenly leaving garbage.
Instead we get shorter and less platform-caveat-y code.
We will also assume users don't try to issue a download in different vscode windows simultaneously.

Fixes #5019 

Co-authored-by: Veetaha <veetaha2@gmail.com>
2020-06-24 22:09:28 +00:00
Veetaha
c1d39571c9 Append 10 random hex chars to temp artifact files 2020-06-25 01:00:30 +03:00
bors[bot]
bff7307b8c
Merge #5039
5039: Flatten module hierarchy r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-06-24 16:58:44 +00:00
Aleksey Kladov
693489e5ee Flatten module hierarchy 2020-06-24 18:57:30 +02:00
Aleksey Kladov
d6c204c750 Cleanup visibility 2020-06-24 18:54:05 +02:00
bors[bot]
946b2c28a7
Merge #5038
5038: Make `iterate_method_candidates` non-generic r=jonas-schievink a=jonas-schievink

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

bors r+ 🤖 ;)

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2020-06-24 15:45:39 +00:00
Jonas Schievink
cefb2204cb Make iterate_method_candidates non-generic 2020-06-24 17:45:38 +02:00
bors[bot]
7e61f4c59e
Merge #5035 #5037
5035: Less error-prone naming r=matklad a=matklad



bors r+
🤖

5037: Don't watch dirs if not asked to r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-06-24 15:18:13 +00:00
Aleksey Kladov
089ea36b2e Don't watch dirs if not asked to 2020-06-24 17:11:07 +02:00
bors[bot]
e9bdb05e96
Merge #4990
4990: Introduce an ItemTree layer to avoid reparsing files r=matklad a=jonas-schievink

This reduces the latency of "go to definition" in a simple benchmark on rust-analyzer by around 30%.

cc https://github.com/rust-analyzer/rust-analyzer/issues/1650
Closes https://github.com/rust-analyzer/rust-analyzer/issues/3485

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2020-06-24 15:07:37 +00:00
Aleksey Kladov
6937bcb67d Less error-prone naming 2020-06-24 16:59:15 +02:00
Aleksey Kladov
ddc5a3e567 Fix infinite cargo check bug 2020-06-24 16:59:15 +02:00
Jonas Schievink
2928600374 Reorder items 2020-06-24 16:54:21 +02:00
Jonas Schievink
d6fd7809b0 Clean up and fix inner item collection a bit 2020-06-24 16:54:21 +02:00
Jonas Schievink
3b50b0b2b6 Use a HashMap instead of Vec
This is no longer enforcing stack discipline, so a Vec isn't necessary
or helpful
2020-06-24 16:54:21 +02:00
Jonas Schievink
59d4640b64 Remove unneeded HirFileId argument 2020-06-24 16:54:21 +02:00
Jonas Schievink
d4ddec2bdf Shrink arenas after building ItemTree 2020-06-24 16:54:21 +02:00
Jonas Schievink
94169ee504 ItemTree: Use more boxed slices 2020-06-24 16:54:21 +02:00
Jonas Schievink
abdba92334 Don't allocate empty generics 2020-06-24 16:54:21 +02:00
Jonas Schievink
43cad21623 Don't allocate common visibilities 2020-06-24 16:54:20 +02:00
Jonas Schievink
16fd4dabb7 Remove file id from item tree
It's not needed, and `source` is only used by tests anyways
2020-06-24 16:53:56 +02:00
Jonas Schievink
c019002d17 Slightly reduce ItemTree memory footprint 2020-06-24 16:53:56 +02:00
Jonas Schievink
f9a1a9cd3c Merge item tree traits
The Source trait isn't needed anymore since we no longer merge
extern crate items with use items.
2020-06-24 16:53:56 +02:00
Jonas Schievink
b5fd02d93c Generate ModItem via macro 2020-06-24 16:53:56 +02:00
Jonas Schievink
20ff1cdcfb Address more comments 2020-06-24 16:53:56 +02:00
Jonas Schievink
a0ad457575 if let else -> match 2020-06-24 16:53:56 +02:00
Jonas Schievink
ae7a296c85 Unify and test attribute handling 2020-06-24 16:53:56 +02:00
Jonas Schievink
689e147c9d Collect inner items in expression macros 2020-06-24 16:53:54 +02:00
Jonas Schievink
5a81427304 Measure ItemTree query memory usage 2020-06-24 16:53:16 +02:00
Jonas Schievink
ffa0435050 Make generics and attr queries use ItemTree
Now it's fast
2020-06-24 16:53:16 +02:00
Jonas Schievink
19586bc5c6 Record HirFileId's in profiler 2020-06-24 16:53:16 +02:00
Jonas Schievink
1fbe21a545 Make remaining item data queries use item tree 2020-06-24 16:53:16 +02:00
Jonas Schievink
4b03b39d5b draw the rest of the owl 2020-06-24 16:53:16 +02:00
Jonas Schievink
b94caeb88b ItemTree: Make clonable and add AST access 2020-06-24 16:53:16 +02:00
Jonas Schievink
c12f7b610b Lower generics 2020-06-24 16:53:16 +02:00
Jonas Schievink
864b650f92 ItemTree: use a newtyped ID 2020-06-24 16:53:16 +02:00
Jonas Schievink
278556f9fe Move ItemTree lowering into its own module 2020-06-24 16:53:16 +02:00
Jonas Schievink
f9e5ba7d40 Remove now-broken incremental test
The ItemTree tracks impl and trait items, so the CrateDefMap now needs
recomputing when those change
2020-06-24 16:53:16 +02:00
Jonas Schievink
0e2602f75e Remove raw item query 2020-06-24 16:53:16 +02:00
Jonas Schievink
7054e89d18 Fix test 2020-06-24 16:53:16 +02:00
Jonas Schievink
9d24412929 Move collector 2020-06-24 16:53:14 +02:00
Jonas Schievink
f9417bcf49 Draw the rest of the owl 2020-06-24 16:52:37 +02:00
Jonas Schievink
e24de2007f collector changes WIP 2020-06-24 16:52:37 +02:00
Jonas Schievink
696a7a5a41 lower traits 2020-06-24 16:52:37 +02:00
Jonas Schievink
34bc80650b Hook up query, add impls, lower moar 2020-06-24 16:52:37 +02:00
Aleksey Kladov
1d75d11d6c Start item tree 2020-06-24 16:52:37 +02:00
bors[bot]
1a3b507a00
Merge #5034
5034: Cleanup project.json deserialization r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-06-24 14:25:56 +00:00
Aleksey Kladov
e6c61d5072 Cleanup project.json deserialization 2020-06-24 16:16:52 +02:00
Aleksey Kladov
a07cad16ab Rename json_project -> project_json 2020-06-24 16:03:24 +02:00
bors[bot]
97c4d06258
Merge #5015 #5027 #5028
5015: Account for updated module ids when determining whether a resolution is changed r=matklad a=Nashenas88

Fixes #4943

5027: Make Debug less verbose for VfsPath and use Display in analysis-stats r=matklad a=lnicola



5028: Remove namedExports config r=matklad a=lnicola

Fixes a warning:

```
(!) Plugin commonjs: The namedExports option from "@rollup/plugin-commonjs" is deprecated. Named exports are now handled automatically.
```

Co-authored-by: Paul Daniel Faria <Nashenas88@users.noreply.github.com>
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-06-24 13:02:37 +00:00