Commit graph

11471 commits

Author SHA1 Message Date
Aleksey Kladov
7db795e747 ⬆️ deps 2020-07-08 22:02:54 +02:00
bors[bot]
81ee8d3d30
Merge #5271
5271: Tidyup hover r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-08 18:42:46 +00:00
Aleksey Kladov
16dcf020c4 simplify 2020-07-08 20:35:54 +02:00
Aleksey Kladov
d74a77efb1 Minimize API 2020-07-08 20:35:54 +02:00
Aleksey Kladov
7238acab78 Dead code 2020-07-08 20:35:54 +02:00
Aleksey Kladov
86aac4303f Reduce visibility 2020-07-08 19:41:57 +02:00
bors[bot]
8aa10c00a4
Merge #5266
5266: Remove relative_path dependency r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-08 17:33:03 +00:00
Aleksey Kladov
dab7f3d2c6 Remove relative_path dependency 2020-07-08 19:32:36 +02:00
Aleksey Kladov
7ae696ba76 Remove unwanted dependency 2020-07-08 18:26:31 +02:00
Aleksey Kladov
35e4bb3506 Document failed refactor 2020-07-08 18:17:45 +02:00
bors[bot]
a622a8e109
Merge #5263
5263: Fix some clippy perf warnings r=matklad a=kjeremy



Co-authored-by: kjeremy <kjeremy@gmail.com>
2020-07-08 13:55:56 +00:00
kjeremy
4b7f473223 Clippy perf warnings 2020-07-08 09:45:29 -04:00
bors[bot]
9e437b2642
Merge #5262
5262: Workaround rollup messing up default imports r=matklad a=Veetaha

Tackles https://github.com/rust-analyzer/rust-analyzer/issues/5257#issuecomment-655435271
Related: https://github.com/rollup/plugins/issues/491

Co-authored-by: Veetaha <veetaha2@gmail.com>
2020-07-08 12:12:14 +00:00
Veetaha
e2fec10dc1 Workaround rollup messing up default imports 2020-07-08 14:47:34 +03:00
bors[bot]
41feb816c9
Merge #5255
5255: Replace ad hocery with science r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-07 21:32:08 +00:00
Aleksey Kladov
69b79e3a73 Replace ad hocery with science 2020-07-07 23:28:48 +02:00
bors[bot]
56ade20380
Merge #4972
4972: Gzip artifacts r=Veetaha a=Veetaha

[Here is the test release](https://github.com/Veetaha/rust-analyzer/releases/tag/2020-06-21)

Change in size:  `~ 25 MB -> ~ 8 MB (gzipped)`

The time to gzip during the dist build takes a somewhat considerable amount of time tho.
Having already compiled artifacts this takes in debug mode:
```
~/dev/rust-analyzer (feat/gzip-binaries) $ time cargo xtask dist
    Finished dev [unoptimized] target(s) in 0.06s
     Running `target/debug/xtask dist`
> cargo build --manifest-path ./crates/rust-analyzer/Cargo.toml --bin rust-analyzer --release
    Finished release [optimized] target(s) in 0.05s
> strip ./target/release/rust-analyzer

real    0m34.331s
user    0m34.245s
sys     0m0.078s
```
In release mode this is much faster:
```
~/dev/rust-analyzer (feat/gzip-binaries) $ time cargo run -p xtask --release -- dist
    Finished release [optimized] target(s) in 0.04s
     Running `target/release/xtask dist`
> cargo build --manifest-path ./crates/rust-analyzer/Cargo.toml --bin rust-analyzer --release
    Finished release [optimized] target(s) in 0.06s
> strip ./target/release/rust-analyzer

real    0m2.401s
```

**[UPD]** adding a profile override for `miniz_oxide` does the thing to ensure good performrance

We might need to notify all other ra plugins' maintainers about the change in our GH releases if we merge this PR, or we could leave uncompressed files along with gzipped for a while until everyone migrates.

Co-authored-by: Veetaha <veetaha2@gmail.com>
2020-07-07 20:36:18 +00:00
Veetaha
f92bfb5807 Gzip artifacts
Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>

Override miniz_oxide to build it with optimizations

Building this crate with optimizations decreases the gzipping
part of `cargo xtask dist` from `30-40s` down to `3s`,
the overhead for `rustc` to apply optimizations is miserable on this background
2020-07-07 23:30:11 +03:00
bors[bot]
980a67f446
Merge #5253
5253: Automate rust-analyzer promotion r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-07 16:39:04 +00:00
Aleksey Kladov
a614d84ff4 Automate rust-analyzer promotion 2020-07-07 18:38:34 +02:00
Aleksey Kladov
faa65d7856 . 2020-07-07 18:12:22 +02:00
bors[bot]
695f1a9af8
Merge #5252
5252: Fix symbol search in salsa r=matklad a=matklad

Previous solution for binning paths into disjoint directories was
simple and fast -- just a single binary search.

Unfortunatelly, it wasn't coorrect: if the ditr are

  /d
  /d/a
  /d/c

then partitioning the file /d/b/lib.rs won't pick /d as a correct
directory.

The correct solution here is a trie, but it requires exposing path
components.

So, we use a poor man's substitution -- a *vector* of sorted paths,
such that each bucket is prefix-free

closes #5246

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-07 15:47:37 +00:00
Aleksey Kladov
5d2225f4bc Fix symbol search in salsa
Previous solution for binning paths into disjoint directories was
simple and fast -- just a single binary search.

Unfortunatelly, it wasn't coorrect: if the ditr are

  /d
  /d/a
  /d/c

then partitioning the file /d/b/lib.rs won't pick /d as a correct
directory.

The correct solution here is a trie, but it requires exposing path
components.

So, we use a poor man's substitution -- a *vector* of sorted paths,
such that each bucket is prefix-free

closes #5246
2020-07-07 17:38:02 +02:00
bors[bot]
7407636568
Merge #5250
5250: ⬆️ backtrace r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-07 14:26:54 +00:00
Aleksey Kladov
1e6336c4b9 ⬆️ backtrace 2020-07-07 16:26:33 +02:00
Aleksey Kladov
6bf33cc5cc
Merge pull request #5249 from matklad/ci
check cargo.lock
2020-07-07 16:24:41 +02:00
Aleksey Kladov
2752f2dccf check cargo.lock 2020-07-07 16:01:05 +02:00
Aleksey Kladov
74223de7c4 Upstream salsa 2020-07-07 16:01:05 +02:00
bors[bot]
43e33f3b4a
Merge #5248
5248: Upstream salsa r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-07 13:51:51 +00:00
Aleksey Kladov
9effc6116f Upstream salsa 2020-07-07 15:48:55 +02:00
bors[bot]
73e972a173
Merge #5244
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-07 11:00:04 +00:00
bors[bot]
0719f2824c
Merge #5247
5247: Modernize unqualified reference completion tests r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-07 10:52:54 +00:00
Aleksey Kladov
5b8a5bfb15 Modernize unqualified reference completion tests 2020-07-07 12:52:09 +02:00
bors[bot]
687fb031d2
Merge #5245
5245: Refactor AssistBuilder to manage a SourceChange r=matklad a=theduke

`AssistBuilder` now managaes a full `SourceChange` instead of a
`Vec<SourceFileEdit>`.

This prepares AssistBuilder to handle creation of new files.


Co-authored-by: Christoph Herzog <chris@theduke.at>
2020-07-07 10:25:17 +00:00
Christoph Herzog
3360118040 Refactor AssistBuilder to manage a SourceChange
`AssistBuilder`` now managaes a full `SourceChange` instead of a
Vec<SourceFileEdit>.

This prepares AssistBuilder to handle creation of new files.
2020-07-07 12:10:18 +02:00
Jonas Schievink
f44c4b61e1 Add a command to compute memory usage statistics 2020-07-07 12:10:14 +02:00
Aleksey Kladov
9b2847885d cleanup 2020-07-07 11:44:16 +02:00
bors[bot]
0f5d62a3f3
Merge #5235 #5236 #5241
5235: Don't ping people in PRs r=matklad a=lnicola



5236: Disable ES module interop r=matklad a=lnicola



5241: Clippy perf warnings r=matklad a=kjeremy

Removes redundant clones

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Co-authored-by: kjeremy <kjeremy@gmail.com>
2020-07-07 09:29:52 +00:00
Aleksey Kladov
c88d85bbb4
Update docs/dev/README.md 2020-07-07 11:23:59 +02:00
bors[bot]
0058f97d57
Merge #5243
5243: Consider EPERM error as other vscode processes using rust-analyzer r=matklad a=Veetaha

According to: https://github.com/rust-analyzer/rust-analyzer/issues/5009#issuecomment-654561497

Co-authored-by: Veetaha <veetaha2@gmail.com>
2020-07-07 09:22:39 +00:00
Veetaha
fd1487db51 Consider EPERM error as other vscode processes using rust-analyzer 2020-07-07 12:09:37 +03:00
bors[bot]
7a8597bc20
Merge #5242
5242: Switch to fully dynamically dispatched salsa r=matklad a=matklad

This improves compile times quite a bit



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-07 08:15:40 +00:00
Aleksey Kladov
4bbc385277 Switch to fully dynamically dispatched salsa
This improves compile times quite a bit
2020-07-07 10:14:48 +02:00
kjeremy
ebdee366b0 Clippy perf warnings
Removes redundant clones
2020-07-06 17:13:55 -04:00
bors[bot]
d4bc2f25de
Merge #5240
5240: Update crates r=kjeremy a=kjeremy



Co-authored-by: kjeremy <kjeremy@gmail.com>
2020-07-06 17:45:43 +00:00
kjeremy
b03dbd2c74 Update crates 2020-07-06 13:44:41 -04:00
bors[bot]
f68aac1161
Merge #5239
5239: sponsors link r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-06 15:13:29 +00:00
Aleksey Kladov
a92b76d823 sponsors link 2020-07-06 17:13:08 +02:00
Laurențiu Nicola
9209a992c9 Disable ES module interop 2020-07-06 14:29:19 +03:00
Laurențiu Nicola
8ab0c7ffd3 Don't ping people in PRs 2020-07-06 13:59:24 +03:00