Laurențiu Nicola
90e05ba57e
Bump deps
2021-07-31 11:25:03 +03:00
Aleksey Kladov
89d4b9a95a
⬆️ crates
2021-07-31 10:25:13 +03:00
Lukas Wirth
b537cb186e
Use more strictly typed syntax nodes for analysis in extract_function assist
2021-07-29 17:26:37 +02:00
Laurențiu Nicola
d9ec9d95c5
Bump deps
2021-07-24 11:16:32 +03:00
bors[bot]
0bee7cb716
Merge #9453
...
9453: Add first-class limits. r=matklad,lnicola a=rbartlensky
Partially fixes #9286 .
This introduces a new `Limits` structure which is passed as an input
to `SourceDatabase`. This makes limits accessible almost everywhere in
the code, since most places have a database in scope.
One downside of this approach is that whenever you query limits, you
essentially do an `Arc::clone` which is less than ideal.
Let me know if I missed anything, or would like me to take a different approach!
Co-authored-by: Robert Bartlensky <bartlensky.robert@gmail.com>
2021-07-22 10:33:05 +00:00
Aleksey Kladov
b0c4b776b5
internal: add simple smoke test for project model
...
Our project model code is rather complicated -- the logic for lowering
from `cargo metadata` to `CrateGraph` is fiddly and special-case. So
far, we survived without testing this at all, but this increasingly
seems like a poor option.
So this PR introduces a simple tests just to detect the most obvious
failures. The idea here is that, although we rely on external processes
(cargo & rustc), we are actually using their stable interfaces, so we
might just mock out the outputs.
Long term, I would like to try to virtualize IO here, so as to do such
mocking in a more principled way, but lets start simple.
Should we forgo the mocking and just call `cargo metadata` directly
perhaps? Touch question -- I personally feel that fast, in-process tests
are more important in this case than any extra assurance we get from
running the real thing.
Super-long term, we would probably want to extend our heavy tests to
cover more use-cases, but we should figure a way to do that without
slowing the tests down for everyone.
Perhaps we need two-tiered bors system, where we pull from `master` into
`release` branch only when an additional set of tests passes?
2021-07-20 16:23:57 +03:00
Aleksey Kladov
e20a1a4e4e
minor: publish la_arena
2021-07-20 14:33:08 +03:00
bors[bot]
c595676f7e
Merge #9625
...
9625: internal: simplify handling of the build scripts r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-07-19 15:28:36 +00:00
Robert Bartlensky
0b3d0cde8b
Add Limit
struct.
...
Fixes #9286 .
2021-07-19 13:26:11 +01:00
bors[bot]
ea105f9396
Merge #9619
...
9619: Support GATs for associated type arg parsing r=Veykril a=Veykril
Fixes #9602
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-07-18 09:10:56 +00:00
Lukas Wirth
e7aa37c20a
Support GATs for associated type arg parsing
2021-07-18 11:08:43 +02:00
Aleksey Kladov
f4de2ece0d
internal: simplify handling of the build scripts
2021-07-18 11:29:22 +03:00
Aleksey Kladov
8d8c26e6f5
internal: a bit more of cwd safety for flycheck
2021-07-17 18:13:35 +03:00
Aleksey Kladov
8df38aa797
internal: make sure that proc macro machinery doesn't depend on cwd
2021-07-17 17:55:16 +03:00
Laurențiu Nicola
df729eda69
Bump chalk
2021-07-10 18:58:14 +03:00
Laurențiu Nicola
861f1e2a86
Bump rustc_lexer a little
2021-07-10 18:57:59 +03:00
Laurențiu Nicola
932d4183a1
Bump deps
2021-07-10 18:55:01 +03:00
kjeremy
35016c772c
cargo_metadata 0.14
...
Removes the following dependent crates:
* semver-parser
* pest
* ucd-trie
Removes project_model's dependency on itertools
2021-07-09 11:01:55 -04:00
Aleksey Kladov
90e27d6289
internal: make xtask
lighter
...
Moving tests to `rust-analyzer` crate allows removing walkdir dependency
from `xtask`. It does seem more reasonable to keep tidy tests outside of
the "build system" and closer to other integration tests.
2021-07-04 12:47:56 +03:00
Aleksey Kladov
58d2ece88a
internal: overhaul code generation
...
* Keep codegen adjacent to the relevant crates.
* Remove codgen deps from xtask, speeding-up from-source installation.
This regresses the release process a bit, as it now needs to run the
tests (and, by extension, compile the code).
2021-07-03 22:11:03 +03:00
kjeremy
bf7651886e
Cargo update and pull in the new rowan
...
This brings in the new hashbrown for better compile times.
2021-06-30 10:03:31 -04:00
kjeremy
5b6e168928
Update crates
2021-06-22 13:18:48 -04:00
kjeremy
a1aba2e8cc
cargo update
2021-06-18 14:32:02 -04:00
Aleksey Kladov
06f5d6f640
internal: don't pull tracing via chalk
2021-06-14 20:41:08 +03:00
Aleksey Kladov
a91071b57b
internal: cut deps between assists and diagnostics
2021-06-14 17:45:17 +03:00
Aleksey Kladov
1d2772c2c7
internal: move diagnostics to a new crate
2021-06-14 17:45:17 +03:00
Aleksey Kladov
3d2f0400a2
internal: start ide diagnostics crate
2021-06-14 17:45:17 +03:00
Aleksey Kladov
0463d76a1f
internal: cross-crate cov-marks
2021-06-12 23:40:52 +03:00
Aleksey Kladov
6f0141a140
minor: optimize
...
We shouldn't be looking at the source map unless we actually have
diagnostics.
2021-06-12 17:49:41 +03:00
bors[bot]
409f5fb563
Merge #9204
...
9204: feat: more accurate memory usage info on glibc Linux r=jonas-schievink a=jonas-schievink
This adds support for the new `mallinfo2` API added in glibc 2.33. It addresses a shortcoming in the `mallinfo` API where it was unable to handle memory usage of more than 2 GB, which we sometimes exceed.
Blocked on https://github.com/rust-lang/libc/pull/2228
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-06-11 22:00:23 +00:00
Jonas Schievink
74dc9bb0e9
Update libc
2021-06-11 23:55:27 +02:00
Jonas Schievink
1d6eef1350
Update ungrammar
2021-06-11 18:34:30 +02:00
bors[bot]
050232a37e
Merge #9192
...
9192: internal: Build test-macros in a build script r=jonas-schievink a=jonas-schievink
This build the test-proc-macros in `proc_macro_test` in a build script, and copies the artifact to `OUT_DIR`. This should make it available throughout all of rust-analyzer at no cost other than depending on `proc_macro_test`, fixing https://github.com/rust-analyzer/rust-analyzer/issues/9067 .
This hopefully will let us later write inline tests that utilize proc macros, which makes my life fixing proc macro bugs easier.
Opening this as a sort of RFC, because I'm not totally sure this approach is the best.
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-06-11 10:44:07 +00:00
Jonas Schievink
2c1ca98aba
Make MemoryUsage
work on Windows
2021-06-10 14:06:35 +02:00
Jonas Schievink
05b3a4bc93
Build test-macros in a build script
2021-06-09 17:16:52 +02:00
Jonas Schievink
cfcadcb295
Simplify proc_macro_srv tests
2021-05-31 17:32:56 +02:00
bors[bot]
e9a797748d
Merge #8866
...
8866: Update salsa r=matklad a=jonas-schievink
This updates salsa to include https://github.com/salsa-rs/salsa/pull/265 , and removes all cancellation-related code from rust-analyzer
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-05-31 12:42:32 +00:00
bors[bot]
f41b68637a
Merge #9062
...
9062: internal: Bump deps r=lnicola a=lnicola
Fixes #9061
bors r+
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-05-30 11:48:59 +00:00
Laurențiu Nicola
36567eb9be
Bump deps
2021-05-30 14:48:10 +03:00
Jonas Schievink
acb5c227ed
Update to prerelease
2021-05-29 21:10:00 +02:00
Lukas Wirth
fc37e2f953
Attribute completion is context aware
2021-05-27 23:28:14 +02:00
Jonas Schievink
33debc4065
Update salsa
2021-05-27 15:05:41 +02:00
Laurențiu Nicola
b43bc61981
Bump rustc_lexer
2021-05-24 16:39:19 +03:00
Laurențiu Nicola
d525cfc85a
Bump object
2021-05-24 16:35:23 +03:00
Laurențiu Nicola
47afa4a5fc
Bump misc deps
2021-05-24 16:31:54 +03:00
Laurențiu Nicola
74f1b21b08
Bump chalk
2021-05-24 16:27:24 +03:00
kjeremy
58621f114b
Update notify and fst
2021-05-17 07:49:27 -04:00
Aleksey Kladov
0650f77dd9
internal: remove one more immutable tree
2021-05-14 16:19:27 +03:00
Jonas Schievink
a85a2c4d15
Allow viewing the crate graph in a webview
2021-05-11 16:15:31 +02:00
Aleksey Kladov
53f7149d45
internal: expose cfg attrs from hir::Crate
2021-05-07 23:50:24 +03:00
John Renner
d8a9b450a6
Switch from jemalloc to tikv-jemalloc
2021-05-07 12:17:37 -07:00
Dawer
52143f389f
Update to rowan 0.13.0-pre.5
2021-05-06 10:04:39 +05:00
Jonas Schievink
851bd2a32b
Update salsa
2021-05-05 23:00:29 +02:00
memoryruins
27ba1dd8e3
Replace memmap
to memmap2
in proc_macro_api
2021-05-03 20:20:47 -04:00
Jeremy Kolb
666302f007
cargo update
2021-05-02 15:17:04 -04:00
Jeremy Kolb
36c20dc23d
Return ServerNotInitialized according to the spec
...
According to the spec we should return ServerNotInitialized if the server is waiting for an initialize request and something else comes in.
Upgrading to lsp-server 0.5.1 will do this and retry until the initialize request comes in.
Fixes #8581
2021-04-27 07:47:06 -04:00
Jeremy Kolb
321aa9eb92
Update deps
2021-04-25 15:43:42 -04:00
bors[bot]
e529f73355
Merge #8627
...
8627: Add profiling spans under cargo_to_crate_graph r=lnicola a=lnicola
bors r+
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-04-22 18:26:09 +00:00
Laurențiu Nicola
6b187af337
Add profiling spans under cargo_to_crate_graph
2021-04-22 21:25:29 +03:00
bors[bot]
32491c0978
Merge #8570
...
8570: Flycheck tries to parse both Cargo and Rustc messages. r=rickvanprim a=rickvanprim
This change allows non-Cargo build systems to be used for Flycheck provided they call `rustc` with `--error-format=json` and emit those JSON messages to `stdout`.
Co-authored-by: James Leitch <rickvanprim@gmail.com>
2021-04-21 21:56:54 +00:00
Laurențiu Nicola
81054a2581
Bump other deps
2021-04-21 19:20:18 +03:00
Laurențiu Nicola
27c5e2da48
Bump chalk
2021-04-21 19:20:01 +03:00
Laurențiu Nicola
e50ca6b067
Bump rustc_lexer
2021-04-21 19:19:27 +03:00
Aleksey Kladov
1772eb0f1a
fix: no longer get stuck on windows
...
reading both stdout & stderr is a common gotcha, you need to drain them
concurrently to avoid deadlocks. Not sure why I didn't do the right
thing from the start. Seems like I assumed the stderr is short? That's
not the case when cargo spams `compiling xyz` messages
2021-04-20 18:02:54 +03:00
James Leitch
b5c194f3f7
Flycheck tries to parse both Cargo and Rustc messages.
2021-04-18 16:36:29 -07:00
kjeremy
7091082f38
notify 5.0.0.pre7
...
Fixes windows leak: https://github.com/notify-rs/notify/pull/298
2021-04-15 11:51:32 -04:00
kjeremy
9b673aa9d8
crossbeam-channel 0.5.1
...
Fixes a potential memory leak in unbound channels.
2021-04-13 08:19:47 -04:00
kjeremy
3634b2145c
Bump lsp-types and syn
...
This lsp-types now supports a default InsertTextMode for completion and a per-completion item commit_characters
2021-04-08 10:57:47 -04:00
kjeremy
761a81822a
Update crates
2021-04-07 11:39:33 -04:00
Alexandru Macovei
4e2a6ac7ea
Avoid duplicating VfsPath in vfs::path_interner::PathInterner by using an IndexSet
2021-04-06 16:03:57 +03:00
kjeremy
b246f57fad
Use arrayvec 0.7 to avoid perf regression in 0.6.1
...
See: https://github.com/bluss/arrayvec/issues/182
2021-04-05 12:58:35 -04:00
Aleksey Kladov
d1474ae518
Check if bitflags deps pulls its weight
...
Bitflags is generally a good dependency -- it's lightweight, well
maintained and embraced by the ecosystem.
I wonder, however, do we really need it? Doesn't feel like it adds much
to be honest.
2021-04-04 12:06:01 +03:00
Jonas Schievink
ee4b5a34d8
Use bitflags to compress function properties
...
Very minor savings, only 1 MB or so
2021-04-03 20:58:42 +02:00
Jeremy Kolb
c7a664c2ea
cargo update
2021-04-03 12:18:00 -04:00
Jonas Schievink
b00266b79f
Global TypeRef/TraitRef interning
2021-04-01 19:46:43 +02:00
Laurențiu Nicola
9787bddac5
Use arrayvec 0.6
2021-03-25 21:03:20 +02:00
kjeremy
0630ff5de5
cargo update
...
Removes dependency on socket2
2021-03-23 14:44:26 -04:00
Aleksey Kladov
48b534ceb8
⬆️ rowan
2021-03-22 20:26:59 +03:00
Lukas Wirth
4771a56791
Parse extended_key_value_attributes
2021-03-19 02:13:46 +01:00
Aleksey Kladov
f5a81ec468
Upgrade rowan
...
Notably, new rowan comes with support for mutable syntax trees.
2021-03-16 16:10:49 +03:00
Edwin Cheng
8e07b23b84
Fix macro expansion for statements w/o semicolon
2021-03-16 13:44:50 +08:00
Lukas Wirth
2e3c156b0e
Return multiple modules in parent_module
2021-03-15 15:15:40 +01:00
Jonas Schievink
bc4ecb199b
Use expect-test for builtin macro/derive tests
2021-03-10 21:05:02 +01:00
bors[bot]
6c32e2d8a0
Merge #7965
...
7965: cargo update and lexer r=kjeremy a=kjeremy
Co-authored-by: kjeremy <kjeremy@gmail.com>
2021-03-10 18:59:19 +00:00
kjeremy
08e0e9976d
cargo update and lexer
2021-03-10 13:47:12 -05:00
Jonas Schievink
2b8674b37e
Implement builtin cfg!
macro
2021-03-10 19:43:03 +01:00
bors[bot]
654313dbc7
Merge #6822
...
6822: Read version of rustc that compiled proc macro r=edwin0cheng a=jsomedon
Signed-off-by: Jay Somedon <jay.somedon@outlook.com>
This PR is to fix #6174 .
I basically
* added two methods, `read_version` and `read_section`(used by `read_version`)
* two new crates `snap` and `object` to be used by those two methods
I just noticed that some part of code were auto-reformatted by rust-analyzer on file save. Does it matter?
Co-authored-by: Jay Somedon <jay.somedon@outlook.com>
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2021-03-09 20:57:04 +00:00
Laurențiu Nicola
fc9eed4836
Use upstream cov-mark
2021-03-08 22:19:44 +02:00
Aleksey Kladov
da73c93c7f
Don't punish every crate with serde-json
2021-03-08 20:37:20 +03:00
kjeremy
e13ac349b5
Cargo update
...
Chalk changes just a version # bump. There are no actual commits.
2021-03-08 10:39:11 -05:00
Aleksey Kladov
0296cd590e
⬆️ xflags
2021-03-07 11:12:59 +03:00
kjeremy
124c9fe006
cargo update
2021-03-05 13:14:29 -05:00
Aleksey Kladov
142f9a03fd
Cleanup install command
2021-03-05 11:51:32 +03:00
Jay Somedon
55d73bc675
Fix multiple issues from code review
...
* check metadata version
* use memmap
* use Result instead of unwrap
with Jay Somedon <jay.somedon@outlook.com>
2021-03-04 09:11:33 +08:00
Jay Somedon
6608acef71
Read version of rustc that compiled proc macro
...
With Jay Somedon <jay.somedon@outlook.com>
2021-03-04 09:05:23 +08:00
kjeremy
41d1b4cd26
Update lexer
2021-03-02 15:33:22 -05:00
kjeremy
58697afca4
bump once_cell
2021-03-02 12:41:20 -05:00
bors[bot]
91bf5fa827
Merge #7513
...
7513: NFA parser for mbe matcher r=matklad a=edwin0cheng
Almost straight porting from rustc one, but a little bit slow :(
```
rust-analyzer analysis-stats -q .
```
From:
```log
Database loaded: 636.11ms, 277minstr
crates: 36, mods: 594, decls: 11527, fns: 9017
Item Collection: 10.99s, 60ginstr
exprs: 249618, ??ty: 2699 (1%), ?ty: 2101 (0%), !ty: 932
Inference: 28.94s, 123ginstr
Total: 39.93s, 184ginstr
```
To:
```log
Database loaded: 630.90ms, 277minstr
crates: 36, mods: 594, decls: 11528, fns: 9018
Item Collection: 13.70s, 77ginstr
exprs: 249482, ??ty: 2699 (1%), ?ty: 2101 (0%), !ty: 932
Inference: 30.27s, 133ginstr
Total: 43.97s, 211ginstr
```
Fixes #4777
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2021-03-02 13:20:47 +00:00
bors[bot]
8eee9149e8
Merge #7848
...
7848: Bump cargo_metadata r=matklad a=lnicola
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-03-02 12:31:15 +00:00
Laurențiu Nicola
b20708f6ee
Bump cargo_metadata
2021-03-02 14:27:29 +02:00
Aleksey Kladov
3038579c8e
Switch from pico-args to xflags
2021-03-02 15:08:20 +03:00
bors[bot]
10a57b8109
Merge #7835
...
7835: Use cli parser with auto-generated help r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-03-01 19:57:25 +00:00
Aleksey Kladov
4ce20b80c5
Use cli parser with auto-generated help
2021-03-01 22:12:43 +03:00
Laurențiu Nicola
63e8bdb8a2
Bump chalk
2021-03-01 18:17:03 +02:00
Laurențiu Nicola
8ffd76ddc5
Bump deps
2021-03-01 18:13:08 +02:00
Edwin Cheng
cff2201c30
NFA parser for mbe matcher
2021-03-01 00:11:14 +08:00
bors[bot]
a8cf346b97
Merge #7566
...
7566: Add benchmark tests for mbe r=matklad a=edwin0cheng
This PR add more real world tests dumped from `rust-analyzer analysis-stats .` to benchmark its performance.
cc #7513
r? @matklad
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2021-02-27 14:39:22 +00:00
kjeremy
d42730b76e
bump crates
2021-02-25 10:34:48 -05:00
Aleksey Kladov
eb7333f0a9
⬆️ crates
2021-02-25 17:55:50 +03:00
Edwin Cheng
23dbf36c7d
Add benchmark test for mbe
2021-02-25 05:47:13 +08:00
kjeremy
722d071dbf
Update mio
2021-02-23 12:16:56 -05:00
Chetan Khilosiya
eb6cfa7f15
7526: Renamed create ssr to ide_ssr.
2021-02-23 00:59:16 +05:30
Chetan Khilosiya
e4756cb4f6
7526: Rename crate assists to ide_assists.
2021-02-23 00:59:16 +05:30
kjeremy
e103ca7d8d
update tracing-tree
2021-02-22 12:03:34 -05:00
bors[bot]
63d61c0c98
Merge #7752
...
7752: up once_cell r=kjeremy a=kjeremy
Co-authored-by: kjeremy <kjeremy@gmail.com>
2021-02-22 13:32:40 +00:00
kjeremy
d51c58e14e
up once_cell
2021-02-22 08:31:33 -05:00
Aleksey Kladov
58be1edfbb
Make more common assist easier to ues
2021-02-22 16:07:08 +03:00
Laurențiu Nicola
6c0f7a2f56
Pin ungrammar
2021-02-21 19:33:55 +02:00
Laurențiu Nicola
48ae948b22
Bump deps
2021-02-21 19:13:11 +02:00
Jeremy Kolb
b43bec380f
Update some crates
2021-02-20 14:15:26 -05:00
Aleksey Kladov
3db64a400c
rename completion -> ide_completion
...
We don't have completion-related PRs in flight, so lets do it
2021-02-17 17:53:31 +03:00
kjeremy
88a5e1d036
Bump lsp-types
2021-02-16 09:21:07 -05:00
kjeremy
2cb0544c20
cargo update
2021-02-15 09:49:36 -05:00
Jeremy Kolb
8105418b25
Start LSP 3.17 support
2021-02-14 14:51:29 -05:00
kjeremy
61092bd900
libloading 0.7
...
See https://docs.rs/libloading/0.7.0/libloading/changelog/r0_7_0/index.html
2021-02-11 10:07:49 -05:00
Aleksey Kladov
4b1279d0b1
Infra for "unit" benchmarking
2021-02-09 20:25:39 +03:00
kjeremy
0c3b38695a
Update crates
...
Pulls in https://github.com/rust-lang/chalk/pull/682
2021-02-08 11:38:51 -05:00
Aleksey Kladov
7022ea52b5
AdtDef -> Adt
2021-02-07 14:15:02 +03:00
kjeremy
c3ddf3e1d6
cargo update
2021-02-05 15:35:45 -05:00
Lukas Wirth
eeb5bfcfab
Cleanup decl_check
2021-02-05 16:09:45 +01:00
kjeremy
4a722a34f9
Update thread_local
...
Pulls in https://github.com/Amanieu/thread_local-rs/pull/30 which fixes
a leak when dropping ThreadLocal.
2021-02-04 14:42:45 -05:00
kjeremy
b9ad1f587d
Update mimalloc
2021-02-02 17:17:49 -05:00
Laurențiu Nicola
6b60206669
Bump rustc_lexer
2021-02-02 17:40:01 +02:00
Laurențiu Nicola
9c4b799dce
Bump chalk
2021-02-02 17:40:01 +02:00
kjeremy
953883ca54
Use non-deprecated memmap2 crate
...
`cargo audit` complains that `memmap` is unmaintained so switch to
RazrFalcon's maintained version.
Removes yet another edge on winapi
2021-02-02 10:25:17 -05:00
kjeremy
1c9e216f69
cargo update
2021-02-02 10:00:34 -05:00
Laurențiu Nicola
7ed80bae92
Reap proc macro server instances
2021-02-01 21:24:09 +02:00
kjeremy
16f40d6e20
cargo update
2021-01-29 10:12:39 -05:00
Aleksey Kladov
921bfc0984
⬆️ rowan
2021-01-29 16:12:41 +03:00
Aleksey Kladov
06b56e720f
⬆️ rowan
2021-01-28 22:27:35 +03:00
bors[bot]
92a6dcc360
Merge #7477
...
7477: ⬆️ cm r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-01-28 16:00:43 +00:00
Aleksey Kladov
29da27004e
⬆️ cm
2021-01-28 18:59:54 +03:00
kjeremy
ffff827828
cargo update
2021-01-28 09:55:34 -05:00
Laurențiu Nicola
efafcf2428
Bump deps
2021-01-27 14:22:19 +02:00
Aleksey Kladov
b8d50a7414
add more counts
2021-01-27 12:39:19 +03:00
Aleksey Kladov
d35bda6429
Make always-assert crate reusable
2021-01-26 22:13:42 +03:00
Aleksey Kladov
1df711b95c
⬆️ rowan
2021-01-25 12:32:35 +03:00
Jeremy Kolb
ea1683ea96
cargo update
2021-01-23 11:28:59 -05:00
kjeremy
486066417a
Cargo update
2021-01-21 14:00:42 -05:00
Aleksey Kladov
e5c5c0a040
Include countme
crate to count important data structures.
2021-01-21 19:30:52 +03:00
kjeremy
f006517857
Up lexer
2021-01-21 09:31:06 -05:00
Laurențiu Nicola
e42dfd7a40
Bump chalk
2021-01-21 10:29:19 +02:00
kjeremy
1e0b163860
chalk 0.49.0
2021-01-20 12:31:03 -05:00
kjeremy
46359ae841
bump serde
2021-01-20 09:44:48 -05:00
bors[bot]
de5aabd48b
Merge #7350
...
7350: Update pico-args r=matklad a=kjeremy
Should maintain existing behavior
Co-authored-by: kjeremy <kjeremy@gmail.com>
2021-01-20 12:28:10 +00:00
Aleksey Kladov
3429b32ad1
⬆️ rowan
...
It now stores text inline with tokens
2021-01-20 14:04:53 +03:00
Aleksey Kladov
46b4f89c92
.
2021-01-20 01:56:11 +03:00
Aleksey Kladov
cd21b0e9c1
⬆️ rowan
2021-01-19 22:11:42 +03:00
kjeremy
db0aaeca33
Update pico-args
...
Should maintains existing behavior
2021-01-19 11:56:45 -05:00
Aleksey Kladov
4d510dfc56
⬆️ rowan
2021-01-19 12:05:27 +03:00
bors[bot]
342bf41022
Merge #7297 #7338
...
7297: Propose trait associated items and autoimport traits on completion r=matklad a=SomeoneToIgnore
![trait_imports](https://user-images.githubusercontent.com/2690773/104819998-6faeb480-583a-11eb-8b45-b7351b51b90e.gif )
Closes #7248
7338: Parse `impl const Trait` r=Veykril a=Veykril
Closes #7313
bors r+
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-01-18 19:40:11 +00:00
Lukas Wirth
b26002410b
Parse impl const Trait
2021-01-18 20:18:02 +01:00
Jonas Schievink
9b5fa1c61a
Add back jemalloc support
2021-01-18 19:39:46 +01:00
kjeremy
a8b984185b
cargo update
...
Update test_serialize_proc_macro for new serde version
2021-01-18 13:13:24 -05:00
Jonas Schievink
872bf09381
Add MacroType
syntax
2021-01-18 17:56:35 +01:00
bors[bot]
9daba961f2
Merge #7291
...
7291: Wrap remaining self/super/crate in Name{Ref} r=matklad a=Veykril
That should be the remaining special casing for `self` 🎉
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-01-18 16:13:06 +00:00
Aleksey Kladov
e13065b8ac
Add profile call
2021-01-18 13:30:12 +03:00
Aleksey Kladov
1b6b5c9f28
⬆️ rowan
2021-01-17 20:56:37 +03:00
Aleksey Kladov
33cce3d114
⬆️ rowan
...
https://github.com/rust-analyzer/rowan/pull/86 , which speeds up things
visibly
2021-01-17 18:27:29 +03:00
Aleksey Kladov
1c8feac01f
⬆️ arena
2021-01-17 11:43:04 +03:00
bors[bot]
f5f011ba71
Merge #7304
...
7304: Depend on local copy of la-arena instead of crates.io’s r=lnicola a=arzg
This addresses [this comment](https://github.com/rust-analyzer/rust-analyzer/pull/7276#issuecomment-760909936 ). #7275 and #7276 should start compiling if this is merged.
Co-authored-by: Aramis Razzaghipour <aramisnoah@gmail.com>
2021-01-17 07:05:44 +00:00
Aramis Razzaghipour
709034d123
Depend on local copy of la-arena instead of crates.io’s
2021-01-17 17:52:57 +11:00
Aleksey Kladov
b38414c7f4
When building an item-tree, keep fewer nodes in memory
2021-01-16 23:07:28 +03:00
Aleksey Kladov
842ed790ea
Simpler and faster rowan
...
This removes thread-local syntax node caching, which improves perf a
bunch
2021-01-16 21:36:01 +03:00
Lukas Wirth
98718e0544
Wrap remaining self/super/crate in Name{Ref}
2021-01-15 22:18:43 +01:00
bors[bot]
8a869e870a
Merge #7288
...
7288: Handle self/super/crate in PathSegment as NameRef r=matklad a=Veykril
Wrapping self/super/crate in NameRef as per https://github.com/rust-analyzer/rust-analyzer/pull/7261#issuecomment-760023172
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-01-15 18:40:47 +00:00
Lukas Wirth
cb863390f2
Handle self/super/crate in PathSegment as NameRef
2021-01-15 19:21:23 +01:00
bors[bot]
148e3d0f6a
Merge #7287
...
7287: Make SyntaxPtr lookup logarithmic r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-01-15 17:46:36 +00:00
Aleksey Kladov
26ef7e39f4
Make SyntaxPtr lookup logarithmic
...
closes #3934
cc https://github.com/rust-analyzer/rowan/pull/81
2021-01-15 20:40:40 +03:00
Daiki Ihara
d9b1fa6da3
Upgrade ungrammar to v1.7
2021-01-15 23:35:17 +09:00
Aleksey Kladov
5c66053bd1
bump arena
2021-01-15 11:35:55 +03:00
Aleksey Kladov
4c4e54ac8a
prepare to publish el libro de arena
2021-01-14 19:06:02 +03:00
Aleksey Kladov
865e05b5b4
Make printin the backtrace more convenient
2021-01-14 14:55:13 +03:00
Aleksey Kladov
3d78f502bd
Use upstream TextSize API
2021-01-13 21:32:24 +03:00
kjeremy
d229f0a1b2
cargo update
2021-01-11 09:06:30 -05:00
kjeremy
1da68e87af
Unfreeze cargo_metadata
...
It now pulls in a newer version of semver-parser.
2021-01-11 08:27:16 -05:00
kjeremy
0a91f29699
cargo update
2021-01-08 09:37:28 -05:00
Edwin Cheng
54eb87de03
Refactor out JodChild
2021-01-08 01:08:34 +08:00
Jesse Bakker
974313eb87
Replace last usages of difference with dissimilar
2021-01-06 18:13:29 +01:00
Aleksey Kladov
f9707cde68
Rename expr -> tail_expr
2021-01-05 15:51:13 +03:00
kjeremy
f13ee0a43d
Cargo update to remove some dependencies
2021-01-04 17:02:16 -05:00
kjeremy
f2d1144b4a
Update crates
2021-01-04 11:12:42 -05:00
Jesse Bakker
c7e0c7f43a
Upgrade expect-test to 1.1
2021-01-03 14:43:29 +01:00
bors[bot]
0a3d08e2e3
Merge #7106
...
7106: Split textDocument/formatting TextEdit with diff r=matklad a=Jesse-Bakker
#7044
Co-authored-by: Jesse Bakker <github@jessebakker.com>
2020-12-31 15:11:14 +00:00
Jesse Bakker
f355a6d831
Split textDocument/formatting TextEdit with diff
2020-12-31 15:33:20 +01:00
kjeremy
dc1396eec7
Update crates
2020-12-30 10:39:50 -05:00
bors[bot]
27ccde9ce9
Merge #7019
...
7019: Try serde_path_to_error for LSP InitializeParams r=matklad a=lnicola
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-12-23 12:04:32 +00:00
Laurențiu Nicola
4e89c2a664
Try serde_path_to_error for LSP InitializeParams
2020-12-23 13:21:58 +02:00
bors[bot]
4228e826b8
Merge #7016
...
7016: Bump deps r=flodiebold a=lnicola
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-12-23 11:04:07 +00:00
Laurențiu Nicola
9a14e308b9
Bump deps
2020-12-23 12:58:23 +02:00
Laurențiu Nicola
c04406287a
Bump chalk
2020-12-23 12:58:23 +02:00
Lukas Wirth
bdd8c0b68f
Remove local ungrammar dependency
2020-12-23 11:22:36 +01:00
Laurențiu Nicola
18a7b98b2e
Bump rustc_lexer
2020-12-23 11:24:52 +02:00
Lukas Wirth
be7260485e
Update ungrammar for const block patterns
2020-12-23 01:26:31 +01:00
Jeremy Kolb
f4df2d164d
Update syn and quote
2020-12-20 17:26:44 -05:00
Jeremy Kolb
00d4b156af
cargo update
2020-12-19 14:04:31 -05:00
kjeremy
d828bd794b
LSP 3.16 - Released
2020-12-17 11:33:35 -05:00
Lukas Wirth
dd496223f5
Node-ify lifetimes
2020-12-16 14:16:09 +01:00
Jonas Schievink
d34611633b
Unpatch ungrammar
2020-12-16 12:54:34 +01:00
Jonas Schievink
c31c3246a8
Basic support for decl macros 2.0
2020-12-15 18:43:34 +01:00
Jonas Schievink
c1cb595382
Move to upstream macro_rules!
model
2020-12-15 15:37:37 +01:00
bors[bot]
134c7563be
Merge #6817
...
6817: Replace goblin crate with object r=matklad a=lnicola
Continuation of #4385 .
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-12-14 15:04:47 +00:00
Laurențiu Nicola
dc519b88af
Replace goblin crate with object
2020-12-13 14:08:59 +02:00
kjeremy
8079f5b147
cargo update
2020-12-11 17:00:25 -05:00
Jonas Schievink
4d4b91117a
Use itertools
2020-12-10 19:29:11 +01:00
Aleksey Kladov
2544abbf86
Make config.rs a single source of truth for configuration.
...
Configuration is editor-independent. For this reason, we pick
JSON-schema as the repr of the source of truth. We do specify it using
rust-macros and some quick&dirty hackery though.
The idea for syncing truth with package.json is to just do that
manually, but there's a test to check that they are actually synced.
There's CLI to print config's json schema:
$ rust-analyzer --print-config-schema
We go with a CLI rather than LSP request/response to make it easier to
incorporate the thing into extension's static config. This is roughtly
how we put the thing in package.json.
2020-12-08 19:25:41 +03:00
kjeremy
d18acb0f65
Update expect-test and remove outdated license
2020-12-07 14:19:10 -05:00
kjeremy
28209ce3f9
cargo update
2020-12-07 13:01:07 -05:00
Jonas Schievink
fb21a215be
Retain types of proc macros and allow attr. macros
2020-12-07 17:06:14 +01:00
Florian Diebold
78dd548243
Upgrade Chalk
...
Also make overflow depth and max type size configurable through env variables.
This can be helpful at least for debugging.
Fixes #6628 .
2020-12-07 11:48:58 +01:00
kjeremy
1da8726b85
cargo update: bump libloading to fix a double-free
2020-12-03 10:30:28 -05:00
kjeremy
75bd5a5e20
Bump mio for safety goodness
2020-12-02 16:06:36 -05:00
kjeremy
e4ffd70c91
Fix OptionalVersionedTextDocumentIdentifier type
...
Fixes #6654
2020-12-01 08:33:21 -05:00
kjeremy
0a95201243
bump lexer
2020-11-30 09:29:09 -05:00
kjeremy
467a81529a
cargo update
2020-11-30 08:44:03 -05:00
Kirill Bulatov
3f612d37c6
Move the helpers into ide_db
2020-11-28 16:30:39 +02:00
Kirill Bulatov
f4ae3650d8
Extract the import code into the shared module
2020-11-27 18:28:41 +02:00
Kirill Bulatov
b2e6ca46ca
Profile completions better
2020-11-27 18:00:03 +02:00
kjeremy
24bbf3b838
cargo update
2020-11-24 09:13:26 -05:00
kjeremy
e981485b76
New lsp-types to fix versioning
...
Fixes #6603
2020-11-24 08:52:24 -05:00
kjeremy
1472ec4c05
cargo update
2020-11-19 15:00:56 -05:00
bors[bot]
99975d08f0
Merge #6577 #6579 #6581
...
6577: fix typos in syntax.md r=matklad a=jakobhellermann
6579: cargo update and add new license r=matklad a=kjeremy
6581: Use vscode-languageclient 7.0.0-next.14 r=matklad a=kjeremy
Co-authored-by: Jakob Hellermann <jakob.hellermann@protonmail.com>
Co-authored-by: kjeremy <kjeremy@gmail.com>
2020-11-17 18:01:18 +00:00
bors[bot]
156f7d6963
Merge #6553
...
6553: Auto imports in completion r=matklad a=SomeoneToIgnore
![completion](https://user-images.githubusercontent.com/2690773/99155339-ae4fb380-26bf-11eb-805a-655b1706ce70.gif )
Closes https://github.com/rust-analyzer/rust-analyzer/issues/1062 but does not handle the completion order, since it's a separate task for https://github.com/rust-analyzer/rust-analyzer/issues/4922 , https://github.com/rust-analyzer/rust-analyzer/issues/4922 and maybe something else.
2 quirks in the current implementation:
* traits are not auto imported during method completion
If I understand the current situation right, we cannot search for traits by a **part** of a method name, we need a full name with correct case to get a trait for it.
* VSCode (?) autocompletion is not as rigid as in Intellij Rust as you can notice on the animation.
Intellij is able to refresh the completions on every new symbol added, yet VS Code does not query the completions on every symbol for me.
With a few debug prints placed in RA, I've observed the following behaviour: after the first set of completion suggestions is received, next symbol input does not trigger a server request, if the completions contain this symbol.
When more symbols added, the existing completion suggestions are filtered out until none are left and only then, on the next symbol it queries for completions.
It seems like the only alternative to get an updated set of results is to manually retrigger it with Esc and Ctrl + Space.
Despite the eerie latter bullet, the completion seems to work pretty fine and fast nontheless, but if you have any ideas on how to make it more smooth, I'll gladly try it out.
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2020-11-17 17:50:08 +00:00
kjeremy
4e73c8f608
cargo update and add new license
2020-11-17 09:39:25 -05:00
kjeremy
233fdb12ce
Latest LSP 3.16 protocol
...
Pulls in https://github.com/gluon-lang/lsp-types/pull/186
2020-11-16 15:10:13 -05:00
Kirill Bulatov
3b0fc4d7f2
Omit modules during autocompletion
2020-11-16 21:19:06 +02:00
Kirill Bulatov
f62e8616c8
Add imports in auto completion
2020-11-16 21:19:05 +02:00
Benjamin Coenen
e73d140b51
add suggestion ..Default::default() for remaining struct fields in a constructor #6492
...
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-11-13 17:17:16 +01:00
kjeremy
3b9d164043
Update crates
2020-11-11 11:17:48 -05:00
kjeremy
f32be79296
Do not use yanked once_cell
2020-11-11 11:02:49 -05:00
Aleksey Kladov
731f7bfc02
Replace RacyFlag with OnceCell
2020-11-11 03:11:40 +01:00
kjeremy
6b9a3504ca
cargo update
2020-11-04 22:01:19 -05:00
kjeremy
0403e82d91
Bump chalk and lexer
2020-11-02 12:00:58 -05:00
Aleksey Kladov
f5e7f07838
Update crates
...
This is to bust the caches
2020-11-02 17:00:05 +01:00
Jeremy Kolb
5fccb72dd5
cargo update
2020-10-31 10:20:25 -04:00
Florian Diebold
bca51e3519
Upgrade Chalk to 0.36
...
Quite a few changes, because Chalk got rid of the `ApplicationTy` nesting.
2020-10-30 18:57:55 +01:00
kjeremy
e7e58b08ac
cargo update
2020-10-28 15:37:40 -04:00
kjeremy
5cb6fafd36
Latest proposed LSP 3.16.0
...
Needs: https://github.com/gluon-lang/lsp-types/pull/183
2020-10-26 09:23:34 -04:00
Florian Diebold
39dfca23f1
Add tracing to main rust-analyzer binary
2020-10-25 13:53:38 +01:00
bors[bot]
bf84e4958e
Merge #6331 #6342
...
6331: correct hover text for items with doc attribute with raw strings r=matklad a=JoshMcguigan
Fixes #6300 by improving the handling of raw string literals in attribute style doc comments.
This still has a bug where it could consume too many `"` at the start or end of the comment text, just as the original code had. Not sure if we want to fix that as part of this PR or not? If so, I think I'd prefer to add a unit test for either the `as_simple_key_value` function (I'm not exactly sure where this would belong / how to set this up) or create a `fn(&SmolStr) -> &SmolStr` to unit test by factoring out the `trim` operations from `as_simple_key_value`. Thoughts on this?
6342: Shorter dependency chain r=matklad a=popzxc
Continuing implementing suggestions from the `Completion refactoring` zulip thread.
This PR does the following:
- Removes dependency of `completions` on `assists` by moving required functionality into `ide_db`.
- Moves completely `call_info` crate into `ide_db` as it looks like it fits perfect there.
- Adds a bunch of new tests and docs.
- Adds the re-export of `base_db` to the `ide_db` and removes direct dependency on `base_db` from other crates.
The last point is controversial, I guess, but I noticed that in places where `ide_db` is used, `base_db` is also *always* used. Thus I think the dependency on the `base_db` is implied by the fact of `ide_db` interfaces, and thus it makes sense to just provide `base_db` out of the box.
Co-authored-by: Josh Mcguigan <joshmcg88@gmail.com>
Co-authored-by: Igor Aleksanov <popzxc@yandex.ru>
2020-10-24 19:08:12 +00:00
Laurențiu Nicola
c81d044622
Bump chalk
2020-10-24 17:14:05 +03:00
Laurențiu Nicola
4834015fd1
Bump rustc_lexer
2020-10-24 17:11:58 +03:00
Laurențiu Nicola
09468ce370
Bump deps
2020-10-24 17:10:36 +03:00
Igor Aleksanov
19cce08662
Re-export base_db from ide_db
2020-10-24 11:39:57 +03:00
Igor Aleksanov
b6ea56ea09
Make call_info a part of ide_db
2020-10-24 11:07:10 +03:00
Igor Aleksanov
8d3d509af7
Remove dependency on 'assists' from 'completion' crate
2020-10-24 10:47:23 +03:00
bors[bot]
2fa942ad30
Merge #6251 #6310
...
6251: Semantic Highlight: Add Callable modifier for variables r=matklad a=GrayJack
This PR added the `HighlightModifier::Callable` variant and assigned it to variables and parameters that are fn pointers, closures and implements FnOnce trait.
This allows to colorize these variables/parameters when used in call expression.
6310: Rewrite algo::diff to support insertion and deletion r=matklad a=Veykril
This in turn also makes `algo::diff` generate finer diffs(maybe even minimal diffs?) as insertions and deletions aren't always represented as as replacements of parent nodes now.
Required for #6287 to go on.
Co-authored-by: GrayJack <gr41.j4ck@gmail.com>
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2020-10-23 22:12:15 +00:00
bors[bot]
81609960fa
Merge #6324
...
6324: Improve #[cfg] diagnostics r=jonas-schievink a=jonas-schievink
Unfortunately I ran into https://github.com/rust-analyzer/rust-analyzer/issues/4058 while testing this on https://github.com/nrf-rs/nrf-hal/ , so I didn't see much of it in action yet, but it does seem to work.
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2020-10-23 10:38:30 +00:00
Jonas Schievink
68b17986c7
Implement DNF-based #[cfg]
introspection
2020-10-22 17:57:00 +02:00
Lukas Wirth
d86863aeb4
Rewrite algo::diff to support insertion and deletion
2020-10-22 09:51:11 +02:00
Jeremy Kolb
f64f569483
Update crates
...
This brings in a number of new dependencies though.
2020-10-20 17:36:02 -04:00
Aleksey Kladov
c4699819d0
⬆️ crates
2020-10-19 13:57:41 +02:00
Igor Aleksanov
9e7c952bbd
Extract call_info and completion into separate crates
2020-10-18 13:09:00 +03:00
Aleksey Kladov
6c7769a2e3
update deps
2020-10-18 01:53:01 +02:00
Aleksey Kladov
cb63e83237
⬆️ xshell
2020-10-18 01:51:39 +02:00
Aleksey Kladov
0fab08740b
⬆️ xshell
2020-10-17 13:25:22 +02:00
Aleksey Kladov
49a90d4c31
Switch from not_bash to xshell
2020-10-17 02:42:42 +02:00
bors[bot]
3e450cf89f
Merge #6207 #6224 #6226 #6227
...
6207: Extract ImportAssets out of auto_import r=matklad a=Veykril
See https://github.com/rust-analyzer/rust-analyzer/pull/6172#issuecomment-707182140
I couldn't fully pull out `AssistContext` as `find_node_at_offset_with_descend`: 81fa00c5b5/crates/assists/src/assist_context.rs (L90-L92)
requires the `SourceFile` which is private in it and I don't think making it public just for this is the right call?
6224: ⬆️ salsa r=matklad a=matklad
bors r+
🤖
6226: Add reminder to update lsp-extensions.md r=matklad a=matklad
bors r+
🤖
6227: Reduce bors timeout r=matklad a=matklad
bors r+
🤖
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-10-14 11:37:51 +00:00
Aleksey Kladov
41e2639f35
⬆️ salsa
2020-10-14 12:40:48 +02:00
Laurențiu Nicola
e559066bed
Bump pulldown-cmark
2020-10-13 20:41:49 +03:00
Laurențiu Nicola
baf84d4a93
Bump regex
2020-10-13 18:06:40 +03:00
Laurențiu Nicola
9937c0d50a
Bump rustc_lexer
2020-10-13 18:06:23 +03:00
Laurențiu Nicola
017a04f424
Bump crossbeam-channel and lsp-server in rust-analyzer
2020-10-13 18:05:06 +03:00
Laurențiu Nicola
db7813ef2c
Bump crossbeam-channel in crates
2020-10-13 16:57:01 +03:00
Laurențiu Nicola
c6605affe4
Bump some deps
2020-10-13 16:46:36 +03:00
Laurențiu Nicola
852b2481a4
Remove Cargo.lock comment
2020-10-13 16:46:22 +03:00
Jonas Schievink
f8be6c636c
macOS: install GNU tar
2020-10-12 19:51:49 +02:00
kjeremy
a7d6674e4d
Update crates
2020-10-11 18:01:50 -04:00
kjeremy
13bb0404a8
Bump rustc_lexer, cfg-if to 1.0 and add new license to check
2020-10-08 10:39:02 -04:00
Casey Primozic
37df2138ec
Switch from git to latest tagged release of chalk deps
2020-10-07 12:11:22 -07:00
Casey Primozic
56a8a7645f
Bump chalk to use latest git to get fix
...
* Chalk very recently (like an hour ago) merged a fix that prevents rust analyzer from panicking. This allows it to be usable again for code that hits those situations. See #6134 , #6145 , Probably #6120
2020-10-06 15:05:20 -07:00
kjeremy
ff678e1349
Up rustc-ap-rustc_lexer to 681
...
cargo update as well
2020-10-01 15:21:13 -04:00
kjeremy
9b2e38f009
cargo update
2020-09-30 09:49:40 -04:00
Nathan Whitaker
f50458deaf
Update chalk to 0.30.0
2020-09-28 14:24:11 -04:00
Jeremy Kolb
76dfac7894
chalk 0.29.0
2020-09-28 07:44:27 -04:00
Jeremy Kolb
89ac5995e9
Update deps
2020-09-27 18:14:50 -04:00
Bram van den Heuvel
dff6895ce8
Update chalk to 0.28.0
2020-09-25 15:29:31 +02:00
Jean SIMARD
875ad9b5c4
Bump smol_str from 0.1.16 to 0.1.17
2020-09-24 16:39:08 +02:00
kjeremy
95d7e3ce49
lsp-types 0.82
2020-09-23 15:41:55 -04:00
kjeremy
c7243e4a59
Support active parameters at the per-signature level
...
Update crates
2020-09-18 11:39:25 -04:00
Charles Lew
b302f69b7c
Update chalk to 0.27 and adapt to chalk changes.
2020-09-15 22:37:05 +08:00
kjeremy
07110a4472
Update crates
2020-09-14 08:43:26 -04:00
kjeremy
50bbe8bddd
Update serde
2020-09-11 15:07:49 -04:00
kjeremy
b2334d0ecb
cargo update
2020-09-11 11:38:36 -04:00
kjeremy
b74aba4011
Update crates
...
Gets passed pulled crossbeam crate
2020-09-08 08:50:03 -04:00
kjeremy
11758d518a
Up proc-macro2 to 1.20
...
This changes the way Display is implemented
2020-09-03 17:40:12 -04:00
kjeremy
5e4195bb6a
Chalk 0.25
...
Picks up flodiebold's infinite loop fix
2020-09-02 14:07:06 -04:00
bors[bot]
7f79dbc84f
Merge #5930
...
5930: Migrate to the latest Semantic Tokens Proposal for LSP 3.16 r=matklad a=kjeremy
This stabilizes call hierarchy and semantic tokens features on the client side and changes the server-side semantic tokens protocol to match the latest proposal for 3.16.
The server-side change will break clients depending on the earlier semantic tokens draft.
Fixes #4942
Co-authored-by: kjeremy <kjeremy@gmail.com>
2020-09-02 15:11:22 +00:00
kjeremy
b527257330
Move to vscode-languageclient 7.0.0-next.9
...
Stabilizes call hierarchy and semantic tokens features.
2020-09-02 09:40:59 -04:00
kjeremy
62656f09c0
cargo update
2020-09-02 09:36:03 -04:00
Veetaha
4bc56ebd93
Replace custom not_bash::fs2
setup with fs_err crate
2020-08-29 17:47:13 +03:00
Aleksey Kladov
c692b5d76d
⬆️ expect-test
2020-08-28 14:47:14 +02:00
Aleksey Kladov
07da02fc37
⬆️ crates
2020-08-27 19:06:00 +02:00
Aleksey Kladov
f8a59adf5e
Tease apart orthogonal concerns in markdown link rewriting
...
`hir` should know nothing about URLs, markdown and html. It should
only be able to:
* resolve stringy path from documentation
* generate canonical stringy path for a def
In contrast, link rewriting should not care about semantics of paths
and names resolution, and should be concern only with text mangling
bits.
2020-08-26 20:24:00 +02:00
Zac Pullar-Strecker
b835f06cec
Merge remote-tracking branch 'upstream/master' into 503-hover-doc-links
2020-08-25 16:44:36 +12:00
Jonas Schievink
f3ac19e8cd
Support extern types
2020-08-24 22:02:55 +02:00
Zac Pullar-Strecker
7bbca7a1b3
Merge remote-tracking branch 'upstream/master' into 503-hover-doc-links
2020-08-24 21:20:13 +12:00
Zac Pullar-Strecker
4f5f608b49
Reorganise code
2020-08-24 20:26:45 +12:00
Aleksey Kladov
95f33bb5f7
⬆️ autocfg
2020-08-21 19:14:44 +02:00
Aleksey Kladov
863b1fb731
⬆️ ungrammar
2020-08-21 19:14:05 +02:00
bors[bot]
df54561a68
Merge #5835
...
5835: Switch to expect_test from crates.io
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-08-21 11:21:05 +00:00
Aleksey Kladov
b0fd3faf36
Switch to expect_test from crates.io
2020-08-21 13:19:31 +02:00
kjeremy
41c5d9caaa
Update crates
2020-08-20 12:50:43 -04:00
Aleksey Kladov
6b0b9178b3
⬆️ crates
2020-08-18 23:52:29 +02:00
bors[bot]
a95c5e2121
Merge #5758
...
5758: SSR: Explicitly autoderef and ref placeholders as needed r=matklad a=davidlattimore
Structural search replace now inserts *, & and &mut in the replacement to match any auto[de]ref in the matched code.
e.g. `$a.foo() ==>> bar($a)` might convert `x.foo()` to `bar(&mut x)`
Co-authored-by: David Lattimore <dml@google.com>
2020-08-18 10:52:27 +00:00
David Lattimore
29e6238cb7
SSR: A few small refactorings
2020-08-18 20:39:55 +10:00
Aleksey Kladov
88adca766a
⬆️ crates
2020-08-18 11:20:45 +02:00
Jeremy Kolb
409090e74c
Chalk 0.23
2020-08-16 12:15:44 -04:00
Jeremy Kolb
7819e794db
Bump rustc_lexer
2020-08-16 11:57:10 -04:00
Jeremy Kolb
9aca8d6647
Update chrono
2020-08-16 11:34:13 -04:00
Jonas Schievink
cb816b1ea8
Add a proc_macro_test crate
...
This exports all 3 kinds of proc macros and is useful for testing
2020-08-15 00:27:32 +02:00
Aleksey Kladov
1b0c7701cc
Rename ra_ide -> ide
2020-08-13 17:58:27 +02:00
Aleksey Kladov
fc34403018
Rename ra_assists -> assists
2020-08-13 17:33:38 +02:00
Aleksey Kladov
ae3abd6e57
Rename ra_ssr -> ssr
2020-08-13 17:02:44 +02:00
Aleksey Kladov
bb5c189b7d
Rename ra_ide_db -> ide_db
2020-08-13 16:39:16 +02:00
Aleksey Kladov
ae71a631fd
Rename ra_hir -> hir
2020-08-13 16:36:55 +02:00
Aleksey Kladov
6a77ec7bbe
Rename ra_hir_ty -> hir_ty
2020-08-13 16:35:29 +02:00
Aleksey Kladov
b28c54a2c2
Rename ra_hir_def -> hir_def
2020-08-13 16:29:33 +02:00
Aleksey Kladov
b7aa4898e0
Rename ra_hir_expand -> hir_expand
2020-08-13 16:29:33 +02:00
Aleksey Kladov
ed20a857f4
Rename ra_db -> base_db
2020-08-13 16:29:33 +02:00
Aleksey Kladov
2119dc23e8
Rename ra_proc_macro -> proc_macro_api
2020-08-13 12:39:27 +02:00
bors[bot]
de1d93455f
Merge #5744
...
5744: Rename ra_project_model -> project_model r=matklad a=pksunkara
Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
2020-08-13 10:10:03 +00:00
Pavan Kumar Sunkara
eac24d52e6
Rename ra_project_model -> project_model
2020-08-13 12:05:30 +02:00
Aleksey Kladov
c81f6230da
Remove ra_fmt crate
2020-08-13 11:59:42 +02:00
Aleksey Kladov
68c2238725
Rename ra_cfg -> cfg
2020-08-13 10:36:04 +02:00
Aleksey Kladov
2f45cfc415
Rename ra_mbe -> mbe
2020-08-13 10:36:04 +02:00
Aleksey Kladov
d42ba63976
⬆️ crates
2020-08-13 10:36:04 +02:00
Aleksey Kladov
0e6b94de78
Minor
2020-08-13 10:36:04 +02:00
Pavan Kumar Sunkara
349e6c62ad
Rename ra_proc_macro_srv -> proc_macro_srv
2020-08-13 03:18:19 +02:00
Aleksey Kladov
a1c187eef3
Rename ra_syntax -> syntax
2020-08-12 18:30:53 +02:00
Aleksey Kladov
50a02eb359
Rename ra_parser -> parser
2020-08-12 17:14:23 +02:00
Aleksey Kladov
6dafc13f5f
Rename ra_text_edit -> text_edit
2020-08-12 17:03:06 +02:00
Aleksey Kladov
7510048ec0
Cleanup TextEdit API
2020-08-12 16:58:56 +02:00
Aleksey Kladov
8d34262956
Rename ra_toolchain -> toolchain
2020-08-12 16:52:28 +02:00
Aleksey Kladov
550d7fbe3c
Rename ra_tt -> tt
2020-08-12 16:46:54 +02:00
Aleksey Kladov
208b7bd7ba
Rename ra_prof -> profile
2020-08-12 16:35:29 +02:00
Aleksey Kladov
98baa9b569
Rename ra_arena
2020-08-12 16:22:05 +02:00
Jonas Schievink
67b2b3d0ce
Fix build on musl and test it in CI
2020-08-12 12:23:25 +02:00
kjeremy
9842bbfd27
cargo update
2020-08-10 10:56:16 -04:00
Jeremy Kolb
4591bd458d
Update chalk
2020-08-05 22:24:23 -04:00
Aleksey Kladov
edd4a83ee3
Use salsa's purge to account for all memory
2020-08-05 15:28:20 +02:00
Zac Pullar-Strecker
b34ad4bc8a
update & configure cmark to render three backticks
2020-08-02 20:32:09 +12:00
Aleksey Kladov
bff8dd0949
Update grammar
2020-08-01 13:47:19 +02:00
Aleksey Kladov
a015714def
Better JSON serialization in metrics
2020-08-01 04:09:52 +02:00
Zac Pullar-Strecker
b7bbfc2543
pulldown_cmark no-default-features
2020-08-01 14:08:24 +12:00
Zac Pullar-Strecker
7bd48a63f6
use static data for namespace recognition
2020-08-01 12:32:49 +12:00
Zac Pullar-Strecker
4c745d219f
remove some crates.io deps
2020-08-01 11:47:27 +12:00
Zac Pullar-Strecker
f05d7b41a7
Merge remote-tracking branch 'upstream/master' into 503-hover-doc-links
...
Hasn't fixed tests yet.
2020-07-31 14:12:44 +12:00
Laurențiu Nicola
797cdb00d9
Bump chalk
2020-07-30 23:09:07 +03:00
Laurențiu Nicola
fa64817eab
Bump perf-event and rustc_lexer
2020-07-30 20:36:03 +03: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
kjeremy
e51d1ddf5b
cargo_metadata 0.11.1 and cargo update
2020-07-29 17:06:56 -04:00
Aleksey Kladov
ba585309ec
Replace rand with oorandom
2020-07-29 19:49:10 +02:00
Aleksey Kladov
3d28292157
Switch to ungrammar from ast_src
...
The primary advantage of ungrammar is that it (eventually) allows one
to describe concrete syntax tree structure -- with alternatives and
specific sequence of tokens & nodes.
That should be re-usable for:
* generate `make` calls
* Rust reference
* Hypothetical parser's evented API
We loose doc comments for the time being unfortunately. I don't think
we should add support for doc comments to ungrammar -- they'll make
grammar file hard to read. We might supply docs as out-of band info,
or maybe just via a reference, but we'll think about that once things
are no longer in flux
2020-07-29 19:18:25 +02:00
Aleksey Kladov
514bb96e7c
⬆️ deps
2020-07-27 09:30:44 +02:00
David Lattimore
2b53639e38
SSR: Use expect! in tests
2020-07-24 21:34:00 +10:00
Aleksey Kladov
be06aaecde
Lighter weight tempdir
2020-07-23 22:26:25 +02:00
kjeremy
cf07bbc0db
Update tracing
2020-07-23 13:31:16 -04:00
Aleksey Kladov
4f7a3fba59
Replace superslice with API on path to stabilization
2020-07-23 12:59:18 +02:00
kjeremy
9a9c0e1105
Use symbol tags
2020-07-22 12:18:48 -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
bors[bot]
2e73ba1b49
Merge #5479
...
5479: Allow gathering memory stats on non-jemalloc Linux r=matklad a=jonas-schievink
I could also parse `/proc/$PID/statm` to get the resident set size, but decided against that for now as it isn't terribly useful.
Note that `mallinfo()` is incredibly slow for some reason, and unfortunately this will be exposed to users via the "Memory Usage" command (even worse, the opened document will show the outdated values while the server is processing). So, not very ideal, but it keeps me from recompiling r-a with different feature sets all the time.
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2020-07-22 11:00:17 +00:00
kjeremy
f71ff7fc7a
bump crossbeam-channel
2020-07-21 14:45:10 -04:00
Jonas Schievink
56c090d0d0
Allow gathering memory stats on non-jemalloc Linux
2020-07-21 19:55:54 +02:00
Laurențiu Nicola
daab8b2fd0
Remove insta dep
2020-07-21 13:11:51 +03:00
bors[bot]
9518e2f9d6
Merge #5451 #5463 #5465 #5466
...
5451: Highlight more cases of SyntaxKind when it is a punctuation r=matklad a=GrayJack
This maybe closes #5406
Closes #5453
Separate what one expect to be a punctuation semantic token (like `,`, `;`, `(`, etc), and what is not (`&`, `::`, `+`, etc)
5463: Bump lexer r=matklad a=kjeremy
Since we're now on rust 1.45
5465: Bump chalk r=matklad a=kjeremy
5466: Do not show default types in function and closure return values r=matklad a=SomeoneToIgnore
Avoid things like
<img width="522" alt="image" src="https://user-images.githubusercontent.com/2690773/87985936-1bbe4f80-cae5-11ea-9b8a-5383d896c296.png ">
Co-authored-by: GrayJack <gr41.j4ck@gmail.com>
Co-authored-by: kjeremy <kjeremy@gmail.com>
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2020-07-21 09:57:46 +00:00
kjeremy
9cfb373665
Bump chalk
2020-07-20 15:50:35 -04:00
kjeremy
d8eec71dc9
Bump lexer
2020-07-20 15:37:50 -04:00
kjeremy
11c7182163
cargo update
2020-07-20 13:53:17 -04:00
Jeremy Kolb
398a401044
cargo update
2020-07-19 13:09:01 -04:00
Aleksey Kladov
46ac9ff5e3
Simplify exclusion logic
2020-07-18 16:40:10 +02:00
Aleksey Kladov
19e78020bd
Remove insta for ra_hir_def
2020-07-17 15:54:40 +02:00
Jeremy Kolb
c8a232c2ef
Update log
2020-07-16 17:41:22 -04:00
Jeremy Kolb
7fba2274d9
Update lsp-types for HoverOptions
2020-07-15 18:17:46 -04:00
bors[bot]
b8b41c5f41
Merge #5354
...
5354: Add opt-in mimalloc feature r=matklad a=ivan
This adds a `mimalloc` feature to use [mimalloc](https://github.com/microsoft/mimalloc ) via [mimalloc_rust](https://github.com/purpleprotocol/mimalloc_rust ), and a corresponding `cargo xtask install --server --mimalloc`.
In my tests on Linux, mimalloc seems to run consistently faster than jemalloc and uses only slightly more memory in `analysis-stats` on chalk. Also, builds with mimalloc produce a binary 3MB smaller than builds with jemalloc.
A summary of `env time -v cargo run --release -p rust-analyzer -- analysis-stats ../chalk/` runs on NixOS master on an Intel 4790K in VMware Workstation:
<table>
<tr>
<td></td><td>self-reported time</td><td>elapsed time</td><td>max RSS</td>
</tr>
<tr><td>glibc 2.30 run 1</td><td>225.1 sec</td><td>3:46.91</td><td>1075208</td></tr>
<tr><td>glibc 2.30 run 2</td><td>228.4 sec</td><td>3:50.13</td><td>1074996</td></tr>
<tr><td>jemalloc run 1</td><td>201.8 sec</td><td>3:23.03</td><td>1055960</td></tr>
<tr><td>jemalloc run 2</td><td>199.2 sec</td><td>3:20.41</td><td>1065040</td></tr>
<tr><td>mimalloc run 1</td><td>188.6 sec</td><td>3:09.77</td><td>1105584</td></tr>
<tr><td>mimalloc run 2</td><td>185.0 sec</td><td>3:06.23</td><td>1108132</td></tr>
<tr><td>mimalloc + lto run 1</td><td>160.7 sec</td><td>2:41.80</td><td>1106076</td></tr>
<tr><td>mimalloc + lto run 2</td><td>162.2 sec</td><td>2:43.31</td><td>1104268</td></tr>
</tr>
</table>
I included an `lto = true; codegen-units = 1` run out of curiosity, this PR doesn't enable it.
<details>
<summary>analysis-stats benchmark runs</summary>
## default
```
# env time -v cargo run --release -p rust-analyzer -- analysis-stats ../chalk/
Finished release [optimized] target(s) in 0.10s
Running `target/release/rust-analyzer analysis-stats ../chalk/`
[ERROR ra_project_model] cyclic dependency chalk-integration -> chalk-engine
[ERROR ra_project_model] cyclic dependency chalk-recursive -> chalk-integration
[ERROR ra_project_model] cyclic dependency chalk-solve -> chalk-integration
Database loaded 333.880345ms
Crates in this dir: 11
Total modules found: 159
Total declarations: 2631
Total functions: 1947
Item Collection: 10.176299461s, 0b allocated 0b resident
Total expressions: 57094
Expressions of unknown type: 2938 (5%)
Expressions of partially unknown type: 2427 (4%)
Type mismatches: 232
Inference: 214.968806927s, 0b allocated 0b resident
Total: 225.145114417s, 0b allocated 0b resident
Command being timed: "cargo run --release -p rust-analyzer -- analysis-stats ../chalk/"
User time (seconds): 225.34
System time (seconds): 1.49
Percent of CPU this job got: 99%
Elapsed (wall clock) time (h:mm:ss or m:ss): 3:46.91
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 1075208
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 6
Minor (reclaiming a frame) page faults: 294711
Voluntary context switches: 365
Involuntary context switches: 3273
Swaps: 0
File system inputs: 2904
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
# env time -v cargo run --release -p rust-analyzer -- analysis-stats ../chalk/
Finished release [optimized] target(s) in 0.10s
Running `target/release/rust-analyzer analysis-stats ../chalk/`
[ERROR ra_project_model] cyclic dependency chalk-integration -> chalk-engine
[ERROR ra_project_model] cyclic dependency chalk-recursive -> chalk-integration
[ERROR ra_project_model] cyclic dependency chalk-solve -> chalk-integration
Database loaded 332.711598ms
Crates in this dir: 11
Total modules found: 159
Total declarations: 2631
Total functions: 1947
Item Collection: 9.895020518s, 0b allocated 0b resident
Total expressions: 57094
Expressions of unknown type: 2938 (5%)
Expressions of partially unknown type: 2427 (4%)
Type mismatches: 232
Inference: 218.5001697s, 0b allocated 0b resident
Total: 228.39519833s, 0b allocated 0b resident
Command being timed: "cargo run --release -p rust-analyzer -- analysis-stats ../chalk/"
User time (seconds): 228.26
System time (seconds): 1.75
Percent of CPU this job got: 99%
Elapsed (wall clock) time (h:mm:ss or m:ss): 3:50.13
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 1074996
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 9
Minor (reclaiming a frame) page faults: 294748
Voluntary context switches: 330
Involuntary context switches: 1561
Swaps: 0
File system inputs: 12608
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
```
## jemalloc
```
# env time -v cargo run --release -p rust-analyzer -- analysis-stats ../chalk/
Finished release [optimized] target(s) in 0.11s
Running `target/release/rust-analyzer analysis-stats ../chalk/`
[ERROR ra_project_model] cyclic dependency chalk-integration -> chalk-engine
[ERROR ra_project_model] cyclic dependency chalk-recursive -> chalk-integration
[ERROR ra_project_model] cyclic dependency chalk-solve -> chalk-integration
Database loaded 356.090374ms
Crates in this dir: 11
Total modules found: 159
Total declarations: 2631
Total functions: 1947
Item Collection: 10.176550183s, 439mb allocated 465mb resident
Total expressions: 57094
Expressions of unknown type: 2938 (5%)
Expressions of partially unknown type: 2427 (4%)
Type mismatches: 232
Inference: 191.607201827s, 993mb allocated 1036mb resident
Total: 201.783937913s, 993mb allocated 1036mb resident
Command being timed: "cargo run --release -p rust-analyzer -- analysis-stats ../chalk/"
User time (seconds): 201.07
System time (seconds): 1.89
Percent of CPU this job got: 99%
Elapsed (wall clock) time (h:mm:ss or m:ss): 3:23.03
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 1055960
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 357755
Voluntary context switches: 240
Involuntary context switches: 1889
Swaps: 0
File system inputs: 256
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
# env time -v cargo run --release -p rust-analyzer -- analysis-stats ../chalk/
Finished release [optimized] target(s) in 0.10s
Running `target/release/rust-analyzer analysis-stats ../chalk/`
[ERROR ra_project_model] cyclic dependency chalk-integration -> chalk-engine
[ERROR ra_project_model] cyclic dependency chalk-recursive -> chalk-integration
[ERROR ra_project_model] cyclic dependency chalk-solve -> chalk-integration
Database loaded 317.917622ms
Crates in this dir: 11
Total modules found: 159
Total declarations: 2631
Total functions: 1947
Item Collection: 9.902142185s, 439mb allocated 463mb resident
Total expressions: 57094
Expressions of unknown type: 2938 (5%)
Expressions of partially unknown type: 2427 (4%)
Type mismatches: 232
Inference: 189.295317017s, 993mb allocated 1046mb resident
Total: 199.197555943s, 993mb allocated 1046mb resident
Command being timed: "cargo run --release -p rust-analyzer -- analysis-stats ../chalk/"
User time (seconds): 198.64
System time (seconds): 1.67
Percent of CPU this job got: 99%
Elapsed (wall clock) time (h:mm:ss or m:ss): 3:20.41
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 1065040
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 369013
Voluntary context switches: 243
Involuntary context switches: 2835
Swaps: 0
File system inputs: 0
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
```
## mimalloc
```
# env time -v cargo run --release -p rust-analyzer -- analysis-stats ../chalk/
Finished release [optimized] target(s) in 0.12s
Running `target/release/rust-analyzer analysis-stats ../chalk/`
[ERROR ra_project_model] cyclic dependency chalk-integration -> chalk-engine
[ERROR ra_project_model] cyclic dependency chalk-recursive -> chalk-integration
[ERROR ra_project_model] cyclic dependency chalk-solve -> chalk-integration
Database loaded 332.116806ms
Crates in this dir: 11
Total modules found: 159
Total declarations: 2631
Total functions: 1947
Item Collection: 9.796643695s, 0b allocated 0b resident
Total expressions: 57094
Expressions of unknown type: 2938 (5%)
Expressions of partially unknown type: 2427 (4%)
Type mismatches: 232
Inference: 178.82132362s, 0b allocated 0b resident
Total: 188.617975605s, 0b allocated 0b resident
Command being timed: "cargo run --release -p rust-analyzer -- analysis-stats ../chalk/"
User time (seconds): 187.70
System time (seconds): 1.97
Percent of CPU this job got: 99%
Elapsed (wall clock) time (h:mm:ss or m:ss): 3:09.77
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 1105584
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 296481
Voluntary context switches: 222
Involuntary context switches: 1868
Swaps: 0
File system inputs: 256
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
# env time -v cargo run --release -p rust-analyzer -- analysis-stats ../chalk/
Finished release [optimized] target(s) in 0.13s
Running `target/release/rust-analyzer analysis-stats ../chalk/`
[ERROR ra_project_model] cyclic dependency chalk-integration -> chalk-engine
[ERROR ra_project_model] cyclic dependency chalk-recursive -> chalk-integration
[ERROR ra_project_model] cyclic dependency chalk-solve -> chalk-integration
Database loaded 320.046776ms
Crates in this dir: 11
Total modules found: 159
Total declarations: 2631
Total functions: 1947
Item Collection: 9.287690124s, 0b allocated 0b resident
Total expressions: 57094
Expressions of unknown type: 2938 (5%)
Expressions of partially unknown type: 2427 (4%)
Type mismatches: 232
Inference: 175.710939697s, 0b allocated 0b resident
Total: 184.998640033s, 0b allocated 0b resident
Command being timed: "cargo run --release -p rust-analyzer -- analysis-stats ../chalk/"
User time (seconds): 184.38
System time (seconds): 1.81
Percent of CPU this job got: 99%
Elapsed (wall clock) time (h:mm:ss or m:ss): 3:06.23
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 1108132
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 297055
Voluntary context switches: 374
Involuntary context switches: 2374
Swaps: 0
File system inputs: 0
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
```
## mimalloc + lto
```
# env time -v cargo run --release -p rust-analyzer -- analysis-stats ../chalk/
Finished release [optimized] target(s) in 0.11s
Running `target/release/rust-analyzer analysis-stats ../chalk/`
[ERROR ra_project_model] cyclic dependency chalk-integration -> chalk-engine
[ERROR ra_project_model] cyclic dependency chalk-recursive -> chalk-integration
[ERROR ra_project_model] cyclic dependency chalk-solve -> chalk-integration
Database loaded 369.600196ms
Crates in this dir: 11
Total modules found: 159
Total declarations: 2631
Total functions: 1947
Item Collection: 7.572726834s, 0b allocated 0b resident
Total expressions: 57094
Expressions of unknown type: 2938 (5%)
Expressions of partially unknown type: 2427 (4%)
Type mismatches: 232
Inference: 153.090899101s, 0b allocated 0b resident
Total: 160.663635235s, 0b allocated 0b resident
Command being timed: "cargo run --release -p rust-analyzer -- analysis-stats ../chalk/"
User time (seconds): 160.01
System time (seconds): 1.70
Percent of CPU this job got: 99%
Elapsed (wall clock) time (h:mm:ss or m:ss): 2:41.80
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 1106076
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 1
Minor (reclaiming a frame) page faults: 296610
Voluntary context switches: 209
Involuntary context switches: 2798
Swaps: 0
File system inputs: 8
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
# env time -v cargo run --release -p rust-analyzer -- analysis-stats ../chalk/
Finished release [optimized] target(s) in 0.10s
Running `target/release/rust-analyzer analysis-stats ../chalk/`
[ERROR ra_project_model] cyclic dependency chalk-integration -> chalk-engine
[ERROR ra_project_model] cyclic dependency chalk-recursive -> chalk-integration
[ERROR ra_project_model] cyclic dependency chalk-solve -> chalk-integration
Database loaded 334.630658ms
Crates in this dir: 11
Total modules found: 159
Total declarations: 2631
Total functions: 1947
Item Collection: 7.71699197s, 0b allocated 0b resident
Total expressions: 57094
Expressions of unknown type: 2938 (5%)
Expressions of partially unknown type: 2427 (4%)
Type mismatches: 232
Inference: 154.50351318s, 0b allocated 0b resident
Total: 162.220513775s, 0b allocated 0b resident
Command being timed: "cargo run --release -p rust-analyzer -- analysis-stats ../chalk/"
User time (seconds): 161.52
System time (seconds): 1.74
Percent of CPU this job got: 99%
Elapsed (wall clock) time (h:mm:ss or m:ss): 2:43.31
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 1104268
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 296183
Voluntary context switches: 200
Involuntary context switches: 1666
Swaps: 0
File system inputs: 0
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
```
</details>
Co-authored-by: Ivan Kozik <ivan@ludios.org>
2020-07-15 09:43:08 +00:00
Ivan Kozik
6710856c10
Add opt-in mimalloc feature
2020-07-14 20:57:51 +00:00
kjeremy
2257a48cd3
Use more explicity type for save registration
2020-07-14 11:03:44 -04:00
kjeremy
06dea07dde
Bump tracing-tree to remove quanta
...
Hopefully fixes power 32-bit build.
See: https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/Running.20check.20builds.20on.2032.20bit.20power
2020-07-13 18:11:24 -04:00
Aleksey Kladov
693ac892f2
Don't copy-paste impl_froms
into every crate
2020-07-13 16:21:02 +02:00
kjeremy
2e466db7f3
Update adler and syn
2020-07-13 08:52:07 -04:00
Florian Diebold
71d645101d
Upgrade Chalk
2020-07-12 20:20:31 +02:00
Florian Diebold
c82f5379de
Enable Chalk tracing in hir_ty tests
2020-07-12 20:12:01 +02:00
Jeremy Kolb
6a18dbe116
Update lsp-types
2020-07-12 12:28:00 -04:00
Jeremy Kolb
007812dcae
Update lsp-types to account for new CodeActionKind structure
2020-07-11 17:29:45 -04:00
Aleksey Kladov
b20a6b582b
Rewrite item_tree tests to expect
...
insta review wouldn't update the test, so ...
2020-07-11 22:11:31 +02:00
Aleksey Kladov
9a3c22bbfd
Make slow test parallel
2020-07-11 12:56:44 +02:00
kjeremy
e07c7008af
Update deps
2020-07-10 17:14:24 -04:00
bors[bot]
89c7c55995
Merge #5270
...
5270: Add argument count mismatch diagnostic r=matklad a=jonas-schievink
Closes https://github.com/rust-analyzer/rust-analyzer/issues/4025 .
This currently has one false positive on this line, where `max` is resolved to `Iterator::max` instead of `Ord::max`:
8aa10c00a4/crates/expect/src/lib.rs (L263)
(I have no idea why it thinks that `usize` is an `Iterator`)
TODO:
* [x] Tests
* [x] Improve diagnostic text for method calls
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2020-07-09 15:34:43 +00:00
Jonas Schievink
f4a9d9a00f
Address review comments
2020-07-09 17:33:49 +02:00
Aleksey Kladov
e075e6eef2
Move diagnostics tests to expect
2020-07-09 16:04:29 +02:00
Aleksey Kladov
b398519011
Cleanup diagnostic conversion code
2020-07-09 15:34:37 +02:00
Aleksey Kladov
117392e879
Remove insta from ra_ide
2020-07-09 14:33:57 +02:00
Aleksey Kladov
b660681a6b
Unify tests
2020-07-09 10:58:56 +02:00
Aleksey Kladov
7db795e747
⬆️ deps
2020-07-08 22:02:54 +02:00
Aleksey Kladov
dab7f3d2c6
Remove relative_path dependency
2020-07-08 19:32:36 +02: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
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
Aleksey Kladov
1e6336c4b9
⬆️ backtrace
2020-07-07 16:26:33 +02:00
Aleksey Kladov
74223de7c4
Upstream salsa
2020-07-07 16:01:05 +02: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
b03dbd2c74
Update crates
2020-07-06 13:44:41 -04:00
Jonas Schievink
0da5ce0b59
Update salsa
2020-07-06 11:47:11 +02:00
Jeremy Kolb
b48dc22fbf
update deps
2020-07-04 10:49:13 -04:00
Aleksey Kladov
b6ac5952cf
⬆️ salsa
2020-07-03 16:41:58 +02:00
David Lattimore
3d9997889b
SSR: Add initial support for placeholder constraints
2020-07-01 18:44:11 +10:00
bors[bot]
b1a2d01645
Merge #5142
...
5142: analysis-stats: allow parallel type inference r=matklad a=jonas-schievink
This is mostly just for testing/fun, but it looks like type inference can be sped up massively with little to no effort (since it runs after the serial phases are already done).
Without `--parallel`:
```
Item Collection: 16.43597698s, 683mb allocated 720mb resident
Inference: 25.429774879s, 1720mb allocated 1781mb resident
Total: 41.865866352s, 1720mb allocated 1781mb resident
```
With `--parallel`:
```
Item Collection: 16.380369815s, 683mb allocated 735mb resident
Parallel Inference: 7.449166445s, 1721mb allocated 1812mb resident
Inference: 143.437157ms, 1721mb allocated 1812mb resident
Total: 23.973303611s, 1721mb allocated 1812mb resident
```
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2020-06-30 21:17:54 +00:00
kjeremy
a05fba0213
Bump console and insta (removes clicolors-control and atty)
2020-06-30 15:12:36 -04:00
Jonas Schievink
4602c2eeaa
analysis-stats: allow parallel type inference
2020-06-30 17:00:17 +02:00
Zac Pullar-Strecker
d6f9e8806a
Remove unintentional changes
2020-06-30 21:42:44 +12:00
bors[bot]
d13ded6cbc
Merge #5101
...
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 (💡 ). 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-30 08:34:08 +00:00
Zac Pullar-Strecker
6bba4158cb
Switch to pulldown-cmark, tidy imports
2020-06-30 20:10:23 +12:00
Zac Pullar-Strecker
1d6f291335
Move resolver into impls, work on tests
2020-06-30 20:07:08 +12:00
Zac Pullar-Strecker
5f52a516de
Working intra-doc-links
2020-06-30 20:02:47 +12:00
Zac Pullar-Strecker
8f56e7c3b1
Generate correct symbol filename for relative links
2020-06-30 20:02:46 +12:00
Zac Pullar-Strecker
2023af53f0
Hover doc link rewriting
2020-06-30 20:02:46 +12:00
bors[bot]
2bd7171399
Merge #5120
...
5120: Add a simple SSR subcommand to the rust-analyzer command line binary r=davidlattimore a=davidlattimore
Is adding the dependency on ra_ide_db OK? It's needed for the call to `db.local_roots()`
Co-authored-by: David Lattimore <dml@google.com>
2020-06-29 23:33:34 +00:00
kjeremy
ff08ae9266
Update serde_json and cc
2020-06-29 14:09:29 -04:00
David Lattimore
93a91ae9de
Add a simple SSR subcommand to the rust-analyzer command line binary
2020-06-29 13:34:45 +10:00
Jeremy Kolb
c3b38dcca9
Update instant
2020-06-28 16:07:44 -04:00
Florian Diebold
3fe0d73670
Update Chalk to released version
2020-06-28 21:24:20 +02:00
Aleksey Kladov
a9b4fb034b
Add colors
2020-06-27 21:14:25 +02:00
Aleksey Kladov
be265ece02
Add example expect test for goto definition
2020-06-27 19:22:31 +02:00
Aleksey Kladov
03c5a6690d
Add light-weight snapshot testing library with editor integration
2020-06-27 19:22:31 +02:00
Paul Daniel Faria
b1992b469c
Remove unneeded code, filename from tests, fix rebasing issues
2020-06-27 11:38:34 -04:00
bors[bot]
6a067ce947
Merge #5090
...
5090: Bump deps r=matklad a=lnicola
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-06-27 11:00:51 +00:00
Laurențiu Nicola
52a488982f
Bump rustc_lexer
2020-06-27 13:56:54 +03:00
Laurențiu Nicola
d036006c95
Bump deps
2020-06-27 13:56:54 +03:00
bors[bot]
18a6dd4635
Merge #4982
...
4982: Bump chalk r=matklad a=lnicola
This passes the tests, but fails in a weird way on `analysis-stats`:
```
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/me/.cargo/registry/src/github.com-1ecc6299db9ec823/chalk-solve-0.14.0/src/clauses/builtin_traits/fn_family.rs:96:20
stack backtrace:
0: backtrace::backtrace::libunwind::trace
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
1: backtrace::backtrace::trace_unsynchronized
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
2: std::sys_common::backtrace::_print_fmt
at src/libstd/sys_common/backtrace.rs:78
3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
at src/libstd/sys_common/backtrace.rs:59
4: core::fmt::write
at src/libcore/fmt/mod.rs:1076
5: std::io::Write::write_fmt
at src/libstd/io/mod.rs:1537
6: std::sys_common::backtrace::_print
at src/libstd/sys_common/backtrace.rs:62
7: std::sys_common::backtrace::print
at src/libstd/sys_common/backtrace.rs:49
8: std::panicking::default_hook::{{closure}}
at src/libstd/panicking.rs:198
9: std::panicking::default_hook
at src/libstd/panicking.rs:218
10: std::panicking::rust_panic_with_hook
at src/libstd/panicking.rs:477
11: rust_begin_unwind
at src/libstd/panicking.rs:385
12: core::panicking::panic_fmt
at src/libcore/panicking.rs:86
13: core::panicking::panic
at src/libcore/panicking.rs:51
14: chalk_solve::clauses::builtin_traits::fn_family::add_fn_trait_program_clauses
15: chalk_solve::clauses::builder::ClauseBuilder<I>::push_binders
16: chalk_solve::clauses::program_clauses_that_could_match
17: chalk_solve::clauses::program_clauses_for_goal
18: chalk_solve::recursive::Solver<I>::solve_new_subgoal
19: <chalk_solve::recursive::Solver<I> as chalk_solve::recursive::solve::SolveDatabase<I>>::solve_goal
20: chalk_solve::recursive::Solver<I>::solve_root_goal
21: chalk_solve::solve::Solver<I>::solve_limited
22: ra_hir_ty::traits::trait_solve_query
23: salsa::runtime::Runtime<DB>::execute_query_implementation
24: salsa::derived::slot::Slot<DB,Q,MP>::read_upgrade
25: salsa::derived::slot::Slot<DB,Q,MP>::read
26: <salsa::derived::DerivedStorage<DB,Q,MP> as salsa::plumbing::QueryStorageOps<DB,Q>>::try_fetch
27: salsa::QueryTable<DB,Q>::get
28: <T as ra_hir_ty::db::HirDatabase>::trait_solve
29: ra_hir_ty::infer::InferenceContext::resolve_ty_as_possible
30: ra_hir_ty::infer::expr::<impl ra_hir_ty::infer::InferenceContext>::infer_expr_inner
31: ra_hir_ty::infer::expr::<impl ra_hir_ty::infer::InferenceContext>::infer_expr_coerce
32: ra_hir_ty::infer::expr::<impl ra_hir_ty::infer::InferenceContext>::check_call_arguments
33: ra_hir_ty::infer::expr::<impl ra_hir_ty::infer::InferenceContext>::infer_method_call
34: ra_hir_ty::infer::expr::<impl ra_hir_ty::infer::InferenceContext>::infer_expr_inner
35: ra_hir_ty::infer::expr::<impl ra_hir_ty::infer::InferenceContext>::infer_expr
36: ra_hir_ty::infer::expr::<impl ra_hir_ty::infer::InferenceContext>::infer_method_call
37: ra_hir_ty::infer::expr::<impl ra_hir_ty::infer::InferenceContext>::infer_expr_inner
38: ra_hir_ty::infer::expr::<impl ra_hir_ty::infer::InferenceContext>::infer_expr_coerce
39: ra_hir_ty::infer::expr::<impl ra_hir_ty::infer::InferenceContext>::infer_expr_inner
40: ra_hir_ty::infer::expr::<impl ra_hir_ty::infer::InferenceContext>::infer_expr_inner
41: ra_hir_ty::infer::expr::<impl ra_hir_ty::infer::InferenceContext>::infer_expr_coerce
42: ra_hir_ty::infer::expr::<impl ra_hir_ty::infer::InferenceContext>::infer_expr_inner
43: ra_hir_ty::infer::expr::<impl ra_hir_ty::infer::InferenceContext>::infer_expr_coerce
44: ra_hir_ty::infer::infer_query
45: salsa::runtime::Runtime<DB>::execute_query_implementation
46: salsa::derived::slot::Slot<DB,Q,MP>::read_upgrade
47: salsa::derived::slot::Slot<DB,Q,MP>::read
48: <salsa::derived::DerivedStorage<DB,Q,MP> as salsa::plumbing::QueryStorageOps<DB,Q>>::try_fetch
49: ra_hir_ty::db::infer_wait
50: rust_analyzer::cli::analysis_stats::analysis_stats
51: rust_analyzer::main
52: std::rt::lang_start::{{closure}}
53: std::rt::lang_start_internal::{{closure}}
at src/libstd/rt.rs:52
54: std::panicking::try::do_call
at src/libstd/panicking.rs:297
55: std::panicking::try
at src/libstd/panicking.rs:274
56: std::panic::catch_unwind
at src/libstd/panic.rs:394
57: std::rt::lang_start_internal
at src/libstd/rt.rs:51
58: main
59: __libc_start_main
60: _start
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
```
It's as if we're returning `None` for a well-known trait that `chalk` asks about. That seems to happen for `Deref`, `CoerceUnsized` and `Try`.
r? @flodiebold
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-06-27 09:50:08 +00:00
Aleksey Kladov
9617bb4f07
Try to find rustfmt in more places
2020-06-27 01:28:06 +02:00
Laurențiu Nicola
7e104ea4a8
Bump chalk
2020-06-26 13:00:55 +03:00
Aleksey Kladov
0ec5d4f55c
Rename ra_flycheck -> flycheck
2020-06-25 09:13:46 +02:00
Jonas Schievink
696a7a5a41
lower traits
2020-06-24 16:52:37 +02:00
Aleksey Kladov
e6c61d5072
Cleanup project.json deserialization
2020-06-24 16:16:52 +02:00
Aleksey Kladov
154cb8243b
Be more explicit about absolute paths at various places
2020-06-24 14:39:34 +02:00
Aleksey Kladov
84cd28fddc
Cut problematic dependency
2020-06-23 18:56:26 +02:00
Aleksey Kladov
dad1333b48
New VFS
2020-06-23 17:51:06 +02:00
Aleksey Kladov
676e82bb83
Remove relative-path dependency
2020-06-23 17:04:10 +02:00
David Lattimore
662ab2ecc8
Allow SSR to match type references, items, paths and patterns
...
Part of #3186
2020-06-22 21:42:55 +10:00