aboutsummaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge #2742bors[bot]2020-01-035-10/+19
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2742: Split `infer` query into two for better profiling r=flodiebold a=michalt This is the same change as we did with `crate_def_map` and it does seem that we mostly spend time in salsa, without recomputing much on rust-analyzer side. Example output: ``` 233ms - handle_inlay_hints 163ms - get_inlay_hints 163ms - SourceAnalyzer::new 67ms - def_with_body_from_child_node 67ms - analyze_container 67ms - analyze_container 67ms - Module::from_definition 67ms - Module::from_file 67ms - crate_def_map 0ms - parse_macro_query (6 calls) 0ms - raw_items_query (1 calls) 66ms - ??? 0ms - crate_def_map (1 calls) 0ms - crate_def_map (1 calls) 96ms - infer 2ms - trait_solve_query (2 calls) 94ms - ??? 0ms - body_with_source_map_query (1 calls) 0ms - crate_def_map (1 calls) [...] ``` Signed-off-by: Michal Terepeta <[email protected]> Co-authored-by: Michal Terepeta <[email protected]>
| * | Split `infer` query into two for better profilingMichal Terepeta2020-01-035-10/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the same change as we did with `crate_def_map` and it does seem that we mostly spend time in salsa, without recomputing much on rust-analyzer side. Example output: ``` 233ms - handle_inlay_hints 163ms - get_inlay_hints 163ms - SourceAnalyzer::new 67ms - def_with_body_from_child_node 67ms - analyze_container 67ms - analyze_container 67ms - Module::from_definition 67ms - Module::from_file 67ms - crate_def_map 0ms - parse_macro_query (6 calls) 0ms - raw_items_query (1 calls) 66ms - ??? 0ms - crate_def_map (1 calls) 0ms - crate_def_map (1 calls) 96ms - infer 2ms - trait_solve_query (2 calls) 94ms - ??? 0ms - body_with_source_map_query (1 calls) 0ms - crate_def_map (1 calls) [...] ``` Signed-off-by: Michal Terepeta <[email protected]>
* | | Fix unused import for windows in cargo_watch testEdwin Cheng2020-01-031-0/+2
| | |
* | | Fix #2705Florian Diebold2020-01-032-1/+18
|/ / | | | | | | | | | | | | | | The `-` turned into a `+` during a refactoring. The original issue was caused by `Read` resolving wrongly to a trait without type parameters instead of a struct with one parameter; this only fixes the crash, not the wrong resolution.
* | Add `_query` suffix to `compute_crate_def_map` for consistencyMichal Terepeta2020-01-032-2/+2
| | | | | | | | Signed-off-by: Michal Terepeta <[email protected]>
* | Split `crate_def_map` into two methodsMichal Terepeta2020-01-034-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change: - introduces `compute_crate_def_map` query and renames `CrateDefMap::crate_def_map_query` for consistency, - annotates `crate_def_map` as `salsa::transparent` and adds a top-level `crate_def_map` wrapper function around that starts the profiler and immediately calls into `compute_crate_def_map` query. This allows us to better understand where we spent the time, in particular, how much is spent in the recomputaiton and how much in salsa. Example output (where we don't actually re-compute anything, but the query still takes a non-trivial amount of time): ``` 211ms - handle_inlay_hints 150ms - get_inlay_hints 150ms - SourceAnalyzer::new 65ms - def_with_body_from_child_node 65ms - analyze_container 65ms - analyze_container 65ms - Module::from_definition 65ms - Module::from_file 65ms - crate_def_map 1ms - parse_macro_query (6 calls) 0ms - raw_items_query (1 calls) 64ms - ??? ``` Signed-off-by: Michal Terepeta <[email protected]>
* | Merge #2730bors[bot]2020-01-031-0/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2730: Add `profile` calls to {Module,Function}::diagnostics r=matklad a=michalt With this change the output `ra_prof` gives a better indication where the time is spent. Example output: ``` 213ms - publish_diagnostics 213ms - diagnostics 70ms - Module::from_definition 70ms - Module::from_file 132ms - Module::diagnostics 78ms - Function::diagnostics 0ms - body_with_source_map_query (1 calls) 2ms - trait_solve_query (1 calls) 76ms - ??? 15ms - Function::diagnostics 0ms - body_with_source_map_query (1 calls) 15ms - trait_solve_query (5 calls) 38ms - Function::diagnostics (51 calls) 8ms - parse_query (1 calls) ``` Signed-off-by: Michal Terepeta <[email protected]> Co-authored-by: Michal Terepeta <[email protected]>
| * | Add `profile` calls to {Module,Function}::diagnosticsMichal Terepeta2020-01-031-0/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this change the output `ra_prof` gives a better indication where the time is spent. Example output: ``` 213ms - publish_diagnostics 213ms - diagnostics 70ms - Module::from_definition 70ms - Module::from_file 132ms - Module::diagnostics 78ms - Function::diagnostics 0ms - body_with_source_map_query (1 calls) 2ms - trait_solve_query (1 calls) 76ms - ??? 15ms - Function::diagnostics 0ms - body_with_source_map_query (1 calls) 15ms - trait_solve_query (5 calls) 38ms - Function::diagnostics (51 calls) 8ms - parse_query (1 calls) ``` Signed-off-by: Michal Terepeta <[email protected]>
* / Remove a duplicate line in `collect_defs`Michal Terepeta2020-01-031-1/+0
|/ | | | Signed-off-by: Michal Terepeta <[email protected]>
* Update dependenciesJeremy Kolb2020-01-013-2/+3
|
* Disable cargo_watch snapshot tests on windowsEmil Lauridsen2020-01-011-0/+7
|
* Merge pull request #2672 from Speedy37/masterAleksey Kladov2019-12-312-37/+83
|\ | | | | fix #2520: change expand_repeat loop stop condition
| * Add details about test_repeat_bad_var current stateVincent Rouillé2019-12-301-0/+2
| |
| * Details about macro NestingState hit and at_end fieldsVincent Rouillé2019-12-301-7/+10
| |
| * fix #2520: change expand_repeat loop stop conditionVincent Rouillé2019-12-282-36/+77
| |
* | Drop support for legacy colorizationAleksey Kladov2019-12-313-16/+23
| |
* | Retry inlay hints on content modified errorAleksey Kladov2019-12-301-10/+5
| |
* | Merge #2681bors[bot]2019-12-293-2/+307
|\ \ | | | | | | | | | | | | | | | | | | | | | 2681: cargo-watcher: Resolve macro call site in more cases r=matklad a=kiljacken This resolves the actual macro call site in a few more cases, f.x. when a macro invokes `compile_error!` (I'm looking at you `ra_hir_def::path::__path`). Co-authored-by: Emil Lauridsen <[email protected]>
| * | Add related information with original error siteEmil Lauridsen2019-12-293-1/+306
| | |
| * | Resolve macro call site in more casesEmil Lauridsen2019-12-291-1/+1
| | |
* | | Merge #2680bors[bot]2019-12-293-63/+71
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | 2680: Fix cargo-watcher file urls on windows r=matklad a=kiljacken Fixes #2676 Co-authored-by: Emil Lauridsen <[email protected]>
| * | Lowercase drive letters when getting paths from cargo checkEmil Lauridsen2019-12-293-63/+71
| | |
* | | Remove unused hard-coded pathsEmil Lauridsen2019-12-291-4/+0
| | |
* | | Resolve traits in infer using lang item infrastructureEmil Lauridsen2019-12-293-10/+19
| | |
* | | Add helpers for unpacking lang itemsEmil Lauridsen2019-12-291-0/+44
|/ /
* | Merge #2650bors[bot]2019-12-294-8/+62
|\ \ | | | | | | | | | | | | | | | | | | | | | 2650: Add macro call support for SourceAnalyzer::type_of r=matklad a=edwin0cheng Co-authored-by: Edwin Cheng <[email protected]>
| * | Use pre-stored macro fileEdwin Cheng2019-12-234-33/+51
| | |
| * | Add macro call support for type_ofEdwin Cheng2019-12-234-13/+49
| | |
* | | Merge #2674bors[bot]2019-12-291-3/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2674: Reduce visibility r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | | Reduce visibilityAleksey Kladov2019-12-291-3/+3
| | | |
* | | | Don't add non-impl/trait containers to scopeAleksey Kladov2019-12-294-25/+96
|/ / /
* | | Merge #2668bors[bot]2019-12-2917-8/+1843
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2668: In-server cargo check watching r=matklad a=kiljacken Opening a draft now so people can follow the progress, and comment if they spot something stupid. Things that need doing: - [x] Running cargo check on save - [x] Pipe through configuration options from client - [x] Tests for parsing behavior - [x] Remove existing cargo watch support from VSCode extension - [x] Progress notification in VSCode extension using LSP 3.15 `$/progress` notification - [ ] ~~Rework ra-ide diagnostics to support secondary messages~~ - [ ] ~~Make cargo-check watcher use ra-ide diagnostics~~ ~~I'd love some input on whether to try to keep the status bar progress thingy for VSCode? It will require some plumbing, and maintaining yet another rust-analyzer specific LSP notification, which I'm not sure we want to.~~ Fixes #1894 Co-authored-by: Emil Lauridsen <[email protected]>
| * | | Fix busy-waiting issue in main cargo watch threadEmil Lauridsen2019-12-271-3/+5
| | | |
| * | | Don't finish main cargo watch thread when subprocess finishes.Emil Lauridsen2019-12-272-3/+5
| | | |
| * | | Fix shutdown behavoir of main cargo-watch thread.Emil Lauridsen2019-12-271-7/+8
| | | | | | | | | | | | | | | | | | | | Even though this didn't error, it became clear to me that it was closing the wrong channel, resulting in the child thread never finishing.
| * | | Add doc comment to moduleEmil Lauridsen2019-12-271-0/+2
| | | |
| * | | Cargo fmt runEmil Lauridsen2019-12-271-7/+1
| | | |
| * | | Shutdown/cancelation story for main cargo watch threadEmil Lauridsen2019-12-271-15/+32
| | | |
| * | | Consistent, hopefully robust, shutdown/cancelation story for cargo check ↵Emil Lauridsen2019-12-271-16/+50
| | | | | | | | | | | | | | | | subprocess
| * | | Move cargo watch functionality to separate crateEmil Lauridsen2019-12-2715-1336/+1358
| | | |
| * | | Keep VSCode config mostly backwards compatibleEmil Lauridsen2019-12-254-49/+31
| | | |
| * | | Some documentatioNEmil Lauridsen2019-12-251-0/+13
| | | |
| * | | Actually respect disabling cargo check functionalityEmil Lauridsen2019-12-251-3/+19
| | | |
| * | | Re-format ra_lsp_server changesEmil Lauridsen2019-12-253-7/+7
| | | |
| * | | Re-implement status display using LSP 3.15 progress eventEmil Lauridsen2019-12-252-9/+52
| | | |
| * | | Migrate tests from extension to rustEmil Lauridsen2019-12-258-0/+1068
| | | |
| * | | Fix use of wrong message in diagnosticEmil Lauridsen2019-12-251-1/+1
| | | |
| * | | Configuration plumbing for cargo watcherEmil Lauridsen2019-12-254-10/+55
| | | |
| * | | Initial implementation of cargo check watchingEmil Lauridsen2019-12-257-4/+598
| | | |
* | | | Merge #2667bors[bot]2019-12-2920-113/+608
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | 2667: Visibility r=matklad a=flodiebold This adds the infrastructure for handling visibility (for fields and methods, not in name resolution) in the HIR and code model, and as a first application hides struct fields from completions if they're not visible from the current module. (We might want to relax this again later, but I think it's ok for now?) Co-authored-by: Florian Diebold <[email protected]>