aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Use src node for analyze sourceEdwin Cheng2020-01-071-2/+3
|
* Merge pull request #2725 from kiljacken/actions-matrixAleksey Kladov2020-01-072-3/+35
|\ | | | | Run tests on ubuntu, windows and macos
| * Add missing comma and use double-quotes to bors.tomlEmil Lauridsen2020-01-051-3/+3
| |
| * Rename old toolchains on windows to speedup installationEmil Lauridsen2020-01-031-2/+6
| |
| * Remove rust-docs on Windows before updating to latest stableEmil Lauridsen2020-01-031-0/+4
| |
| * Update bors.tomlEmil Lauridsen2020-01-031-1/+6
| |
| * Blindfolded PowerShell codingEmil Lauridsen2020-01-031-1/+17
| |
| * Run tests on ubuntu, windows and macosEmil Lauridsen2020-01-031-1/+4
| |
* | Merge #2724bors[bot]2020-01-069-21/+123
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2724: Improve const generic parsing r=matklad a=mchesser Add support for generic arguments in: `impl` type parameters: ```rust impl<const N: u32> Bar<N> {} ``` type args: ```rust type A = B<1, { 2 }>; test::<10>(); ``` Co-authored-by: Michael Chesser <[email protected]>
| * | Improve const generics parsingMichael Chesser2020-01-069-21/+123
|/ / | | | | | | | | - Handle const generics type args - Fix issue with const generic as first parameter in trait impl
* | Merge #2753bors[bot]2020-01-061-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2753: Fix a problem with `Durability` of libraries r=matklad a=michalt When processing a change with added libraries, we used `Default::default` for `SourceRoot` which sets `is_library` to false. Since we use `is_library` to decide whether to use low or high durability, I believe that this caused us to mark many library dependencies as having low durability and thus increased the size of the graph that salsa needed to verify on every change. Based on my initial tests this speeds up the `CrateDefMapQuery` on rust-analyzer from about ~64ms to ~14ms and reduces the number of validations for the query from over 60k to about 7k. Signed-off-by: Michal Terepeta <[email protected]> Co-authored-by: Michal Terepeta <[email protected]>
| * | Fix a problem with `Durability` of librariesMichal Terepeta2020-01-061-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | When processing a change with added libraries, we used `Default::default` for `SourceRoot` which sets `is_library` to false. Since we use `is_library` to decide whether to use low or high durability, I believe that this caused us to mark many library dependencies as having low durability and thus increased the size of the graph that salsa needed to verify on every change. Based on my initial tests this speeds up the `CrateDefMapQuery` on rust-analyzer from about ~64ms to ~14ms and reduces the number of validations for the query from over 60k to about 7k. Signed-off-by: Michal Terepeta <[email protected]>
* | Merge #2750bors[bot]2020-01-061-0/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 2750: add note in vscode instructions for vim plugin users r=matklad a=guswynn Fixes #2746 As the issue mentions, this is already mentioned below in the setting docs. However, it ended up taking me a long time to figure this out, so a note in the instructions for Vscode specifically is helpful Co-authored-by: Gus Wynn <[email protected]>
| * | add note in vscode instructions for vim plugin usersGus Wynn2020-01-051-0/+4
| | |
* | | Merge #2714bors[bot]2020-01-061-0/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2714: Sanity check for missing server binary r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | | Sanity check for missing server binaryAleksey Kladov2019-12-311-0/+4
| | | |
* | | | Merge #2726bors[bot]2020-01-061-4/+25
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2726: Improve profiling output when duration filter is specified r=matklad a=michalt In particular: - Use strict inequality for comparisons, since that's what the filter syntax supports. - Convert to millis for comparisons, since that's the unit used both for the filter and when printing. Now something like `RA_PROFILE='*>0'` will only print things that took at least 1ms (when rounded to millis). Signed-off-by: Michal Terepeta <[email protected]> Co-authored-by: Michal Terepeta <[email protected]>
| * | | | Improve profiling output when duration filter is specifiedMichal Terepeta2020-01-021-4/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In particular: - Use strict inequality for comparisons, since that's what the filter syntax supports. - Convert to millis for comparisons, since that's the unit used both for the filter and when printing. Now something like `RA_PROFILE='*>0'` will only print things that took at least 1ms (when rounded to millis). Signed-off-by: Michal Terepeta <[email protected]>
* | | | | Merge #2751bors[bot]2020-01-061-17/+18
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2751: Crates up r=kjeremy a=kjeremy Co-authored-by: Jeremy Kolb <[email protected]>
| * | | | Crates upJeremy Kolb2020-01-061-17/+18
|/ / / /
* | | | Merge #2747bors[bot]2020-01-042-11/+19
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2747: BinOp helper to detect assignment r=matklad a=kjeremy Co-authored-by: Jeremy Kolb <[email protected]>
| * | | | BinOp helper to detect assignmentJeremy Kolb2020-01-042-11/+19
|/ / / /
* | | | Merge #2745bors[bot]2020-01-041-6/+0
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2745: remove unused file r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | | | remove unused fileAleksey Kladov2020-01-041-6/+0
| | | | |
* | | | | Merge #2743bors[bot]2020-01-0310-2510/+2328
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2743: Switch ast declaration from ron to a macro r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | | | Switch ast declaration from ron to a macroAleksey Kladov2020-01-039-2510/+2328
| | | | |
| * | | | kill unused fileAleksey Kladov2020-01-021-0/+0
| |/ / /
* | | | 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]>
* | | | Merge #2740bors[bot]2020-01-031-0/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2740: Fix unused import for windows in cargo_watch test r=matklad a=edwin0cheng This PR fixed some unused import in ra_cargo_watch test which are not used in Windows. Co-authored-by: Edwin Cheng <[email protected]>
| * | | | Fix unused import for windows in cargo_watch testEdwin Cheng2020-01-031-0/+2
|/ / / /
* | | | Merge #2735bors[bot]2020-01-031-4/+4
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2735: Update quick-error r=kjeremy a=kjeremy Co-authored-by: kjeremy <[email protected]>
| * | | | Update quick-errorkjeremy2020-01-031-4/+4
|/ / / /
* | | | Merge #2734bors[bot]2020-01-032-1/+18
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2734: Fix #2705 r=flodiebold a=flodiebold 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. Co-authored-by: Florian Diebold <[email protected]>
| * | | 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.
* | | Merge #2731bors[bot]2020-01-034-9/+18
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2731: Split `crate_def_map` into two methods r=matklad a=michalt 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]> Co-authored-by: Michal Terepeta <[email protected]>
| * | | 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]>
* | | Merge #2729bors[bot]2020-01-031-1/+0
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | 2729: Remove a duplicate line in `collect_defs` r=matklad a=michalt Co-authored-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]>
* | Merge #2723bors[bot]2020-01-014-25/+26
|\ \ | | | | | | | | | | | | | | | | | | | | | 2723: Update dependencies r=kjeremy a=kjeremy Co-authored-by: Jeremy Kolb <[email protected]>
| * | Update dependenciesJeremy Kolb2020-01-014-25/+26
|/ /
* | Merge #2722bors[bot]2020-01-011-0/+7
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2722: Fix ra_cargo_watch test on windows. r=matklad a=kiljacken Due to difference in path parsing on platforms, the current input to the snapshot tests in ra_cargo_watch cause a panic when running on Windows. This PR disables the tests when running on Windows until a better solution is found. If somebody running on Windows could test this that would be great, as I'm working in the blind here :) Fixes #2720 (probably). Co-authored-by: Emil Lauridsen <[email protected]>
| * | Disable cargo_watch snapshot tests on windowsEmil Lauridsen2020-01-011-0/+7
|/ /
* | Merge #2718bors[bot]2020-01-011-1/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | 2718: Allow disabling inlay hints r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | Allow disabling inlay hintsAleksey Kladov2020-01-011-1/+2
|/ /
* | Merge #2715bors[bot]2019-12-312-17/+12
|\ \ | | | | | | | | | | | | | | | | | | | | | 2715: Fixes to progress display r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | Fixes to progress displayAleksey Kladov2019-12-312-17/+12
| |/