Commit Graph

179 Commits

Author SHA1 Message Date
Lukas Wirth a2a3ea86ea Bring the version command output in line with other rust tools 2022-06-02 18:36:02 +02:00
Jonas Schievink b2779111b4 simplify 2022-05-19 15:29:35 +02:00
Kyle Huey af1aa86ac0 Preserve order when grouping references. 2022-03-22 12:38:59 -07:00
Kyle Huey 0583919919 LSIF: consolidate references into a single edge where possible. 2022-03-22 12:00:52 -07:00
Florian Diebold f807ccd6c0 Add CSV output to analysis-stats
For easy diffing.
2022-02-25 11:45:44 +01:00
Jake Heinz f83c0166be cleanup + detect num cpus 2022-01-14 09:48:59 +00:00
Lukas Wirth aecf26d09b feat: Add config to replace specific proc-macros with dummy expanders 2022-01-06 13:50:18 +01:00
hkalbasi 30ed7fac27 Emit moniker in lsif 2021-11-22 21:29:05 +03:30
vsrs 2f862cd6fe Fix Plaintext textDocument/hover 2021-10-29 18:23:47 +03:00
bors[bot] f185d1c533 Merge #10423
10423: Internal: refactor for mdbook plugin r=Veykril a=HKalbasi

This PR is for upstreaming changes that I made for mdbook plugin. Changes are adding inlay hints to `StaticIndex` and changing some functions for working around privacy of crates.

Aside this, is it okay if I bring the plugin in tree? It is a simple binary crate. I feel it will better maintained here and become resistant to api changes.

Co-authored-by: hamidreza kalbasi <hamidrezakalbasi@protonmail.com>
2021-10-12 18:35:03 +00:00
hamidreza kalbasi 0f49c97e93 internal changes for mdbook 2021-10-12 11:54:00 +03:30
Quentin Gliech 824b7a8564 Add toolInfo in MetaData vertex in LSIF dumps
This helps with uploading LSIF dumps to Sourcegraph without having to
specify an indexer name.
2021-10-11 14:45:58 +02:00
k-nasa b50cb5c261 Remove neesless clone 2021-10-10 10:50:51 +09:00
hamidreza kalbasi 5bd0f50111 remove glob import and cancellables 2021-09-29 16:25:10 +03:30
hamidreza kalbasi 48bebeaa32 support goto definition and find references 2021-09-26 10:04:02 +03:30
hamidreza kalbasi f2775ac2e9 reuse hover results with resultset 2021-09-26 10:04:02 +03:30
hamidreza kalbasi 70061d2b7e move lsif types to lsp types crate 2021-09-26 10:04:02 +03:30
hamidreza kalbasi e803bd25c4 add hover 2021-09-26 10:04:02 +03:30
hamidreza kalbasi 1103e390e0 cfg unix for tests with unix path 2021-09-26 10:04:02 +03:30
hamidreza kalbasi 5163201847 use utf16 instead of utf8 2021-09-26 10:04:02 +03:30
hamidreza kalbasi 557210a688 Begining of lsif 2021-09-26 10:04:02 +03:30
Aleksey Kladov 722a2a4690 minor: improve readability
naming, layout & comments help!
2021-08-31 15:46:00 +03:00
Aleksey Kladov 8dbf3832b2 internal: split database loading time in anaysis-stats into components 2021-08-31 14:38:52 +03:00
Dezhi Wu ba0947dded switch log crate to tracing 2021-08-30 15:11:42 +08:00
Aleksey Kladov e86388689f internal: remove unreasonable crate dependency
Proc macro expansion shouldn't know about salsa at all.
2021-08-22 14:05:12 +03:00
Aleksey Kladov 881d71a489 internal: reduce crate interdependence
I don't think there's anything wrong with project_model depending on
proc_macro_api directly -- fundamentally, both are about gluing our pure
data model to the messy outside world.

However, it's easy enough to avoid the dependency, so why not.

As an additional consideration, `proc_macro_api` now pulls in `base_db`.
project_model should definitely not depend on that!
2021-08-22 13:32:00 +03:00
Aleksey Kladov a379bd715f Update crates/rust-analyzer/src/cli/analysis_stats.rs
Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
2021-08-10 15:31:12 +03:00
Aleksey Kladov 5d5d5182c1 internal: print total size of source code in analysis-stats 2021-08-10 15:28:48 +03:00
Aleksey Kladov 9cf5914c45 internal: unify subcommand handling between ra and xtask 2021-08-10 12:49:55 +03:00
Aleksey Kladov e8a67b67bf internal: prepare to use standard .run pattern for subcommands 2021-08-10 12:25:47 +03:00
Vincent Esche fee3507b71 Make LoadCargoConfig, fn load_workspace_at & fn load_workspace public again 2021-08-01 19:12:04 +02:00
Aleksey Kladov 700210d8b4 remove debug prints 2021-07-19 16:38:36 +03:00
Aleksey Kladov b8b166e674 fix: potential bugs when build scripts do not match the current project 2021-07-18 13:13:03 +03: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
Maan2003 c9b4ac5be4 clippy::redudant_borrow 2021-06-13 09:24:16 +05:30
Kirill Bulatov 339448157c Only prefill caches in the completion benchmark 2021-06-11 09:27:25 +03:00
Kirill Bulatov b24f816c0d Fix visibility issues 2021-06-11 02:00:05 +03:00
Kirill Bulatov ba65d259de Prime caches on workspace load 2021-06-11 02:00:03 +03:00
Laurențiu Nicola 18484365e6 Enable proc macros and build scripts by default in CLI 2021-06-05 15:20:41 +03:00
Florian Diebold d174b919dc Enable attribute macro expansion in analysis-stats
Before:
```
> $ rust-analyzer -q analysis-stats --with-proc-macro --load-output-dirs .
Database loaded:     19.08s, 277minstr
  crates: 34, mods: 688, decls: 13202, fns: 10412
Item Collection:     16.21s, 76ginstr
  exprs: 290580, ??ty: 2508 (0%), ?ty: 1814 (0%), !ty: 947
Inference:           27.46s, 108ginstr
Total:               43.67s, 184ginstr
```
After:
```
> $ ./target/release/rust-analyzer -q analysis-stats --with-proc-macro --load-output-dirs .
Database loaded:     1.09s, 277minstr
  crates: 34, mods: 688, decls: 14790, fns: 11006
Item Collection:     18.20s, 78ginstr
  exprs: 297826, ??ty: 493 (0%), ?ty: 558 (0%), !ty: 342
Inference:           28.34s, 111ginstr
Total:               46.54s, 190ginstr
```
2021-06-05 11:29:24 +02:00
Laurențiu Nicola aabbc84957 Display unknown types in analysis-stats 2021-05-27 19:30:28 +03:00
Kirill Bulatov e5cdcb8b12 Add a way to resolve certain assists 2021-05-03 17:14:49 +03:00
Aleksey Kladov 06a633ff42 feat: improve performance by delaying computation of fixes for diagnostics 2021-04-13 12:09:04 +03:00
Aleksey Kladov 186c5c47cb feat: avoid checking the whole project during initial loading 2021-04-12 15:29:31 +03:00
Lukas Wirth 9b4699a9be Move Ty accessors to TyExt 2021-04-06 13:58:48 +02:00
Jonas Schievink ab49f762a9 analysis-stats: allow skipping type inference
This removes "noise" from memory profiles since it avoids lowering
function bodies and types
2021-04-05 01:42:19 +02:00
Aleksey Kladov 797185e1b6 internal: switch from CLI to internal benchmarking
We have a CLI for benchmarking, but no one actually uses it it seems.
Let's try switching to "internal" benchmarks, implemented as rust tests.
They should be easier to "script" to automate tracking of perf
regressions.
2021-03-30 12:47:23 +03:00
Edwin Cheng 8cc0c7f420 Add no-sysroot flag for analysis-stats 2021-03-14 18:31:14 +08:00
Florian Diebold 6c32bbf3ca Separate Ty and TyKind like in Chalk
Currently `Ty` just wraps `TyKind`, but this allows us to change most
places to already use `intern` / `interned`.
2021-03-13 16:17:15 +01:00