aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge pull request #2732 from detrumi/cargo-toml-not-found-message-toggleAleksey Kladov2020-01-091-0/+1
|\ | | | | Flag to hide cargo.toml not found error
| * Allow disabling Cargo.toml not found errorWilco Kusee2020-01-031-0/+1
| |
* | Merge #2772bors[bot]2020-01-092-15/+99
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 2772: Actually test references r=kjeremy a=kjeremy This will be a little more work when `ReferenceSearchResults` change but I think it's easier to maintain in the end. It also follows a similar pattern to navigation targets and call hierarchy. Co-authored-by: kjeremy <[email protected]> Co-authored-by: Jeremy Kolb <[email protected]>
| * | visibility tweakJeremy Kolb2020-01-091-2/+2
| | |
| * | Actually test referenceskjeremy2020-01-082-15/+99
| | |
* | | Remove the Default impl for SourceRootMichal Terepeta2020-01-081-1/+2
|/ / | | | | | | | | | | | | | | | | Let's be always explicit whether we create a library (i.e., an immutable dependency) or a local `SourceRoot`, since it can have a large impact on the validation performance in salsa. (we found it the hard way recently, where the `Default` instance made it quite tricky to spot a bug) Signed-off-by: Michal Terepeta <[email protected]>
* | Move private API downkjeremy2020-01-081-15/+15
| |
* | Implement proposed CallHierarchy featureJeremy Kolb2020-01-085-3/+372
| | | | | | | | See: https://github.com/microsoft/vscode-languageserver-node/blob/master/protocol/src/protocol.callHierarchy.proposed.ts
* | Adds a way to limits reference search by StructLiteralMikhail Modin2020-01-082-12/+91
| |
* | Merge pull request #2762 from edwin0cheng/fix-2759Aleksey Kladov2020-01-081-11/+25
|\ \ | | | | | | Reject tuple index for missing fields assist
| * | Proper emit diagnostic without fixEdwin Cheng2020-01-071-19/+25
| | |
| * | Reject tuple index for missing fields assistEdwin Cheng2020-01-071-0/+8
| | |
* | | Use src node for analyze sourceEdwin Cheng2020-01-071-2/+3
|/ /
* | 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]>
* | Split `infer` query into two for better profilingMichal Terepeta2020-01-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]>
* | Split `crate_def_map` into two methodsMichal Terepeta2020-01-031-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]>
* Drop support for legacy colorizationAleksey Kladov2019-12-313-16/+23
|
* Merge #2667bors[bot]2019-12-291-1/+56
|\ | | | | | | | | | | | | | | 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]>
| * visible_from -> is_visible_fromFlorian Diebold2019-12-271-1/+1
| |
| * Hide completions for private struct fieldsFlorian Diebold2019-12-261-1/+56
| |
* | Omit closure parametersKirill Bulatov2019-12-231-1/+36
|/
* Rudimentary name resolution for local itemsAleksey Kladov2019-12-221-0/+37
|
* Merge #2637bors[bot]2019-12-211-3/+8
|\ | | | | | | | | | | | | | | 2637: Optimize and profile r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * Optimize and profileAleksey Kladov2019-12-211-3/+8
| |
* | Remove import source mapAleksey Kladov2019-12-211-2/+0
|/
* Remove imports from hirAleksey Kladov2019-12-212-10/+12
|
* Revert "Merge #2629"Aleksey Kladov2019-12-213-11/+12
| | | | | This reverts commit cdc9d682b066b110e0a44e5f8f1c574b38c16ba9, reversing changes made to 90ef070db3dce0a7acb9cd11d0b0d72de13c9d79.
* Remove import source mapAleksey Kladov2019-12-211-2/+0
|
* Remove hir for importsAleksey Kladov2019-12-212-10/+11
|
* Clippy lintskjeremy2019-12-205-47/+41
|
* Merge #2617bors[bot]2019-12-202-59/+23
|\ | | | | | | | | | | | | | | | | | | 2617: Remove index resolving from hover r=matklad a=kjeremy I have left in `HoverResult`'s support for multiple entries because we may still want that at some point. Per https://github.com/rust-analyzer/rust-analyzer/issues/2542#issuecomment-565238142 Co-authored-by: kjeremy <[email protected]>
| * Remove unused importskjeremy2019-12-201-1/+1
| |
| * Remove the index resolution from hoverkjeremy2019-12-201-58/+22
| | | | | | | | We are reasonably precise now to do this.
* | Fix parser for macro call in pattern positionEdwin Cheng2019-12-201-0/+36
|/
* Fix resolve for field init shorthandAleksey Kladov2019-12-203-28/+47
|
* Fix highlighting for field init shorthandAleksey Kladov2019-12-202-5/+4
|
* Improve highlighting testAleksey Kladov2019-12-203-2/+7
|
* Add local functions to bodiesAleksey Kladov2019-12-201-0/+17
|
* Omit default types for hover pop-upsKirill Bulatov2019-12-191-3/+3
|
* Remove TruncateOptions structKirill Bulatov2019-12-192-15/+13
|
* Do not add any new configuration parametersKirill Bulatov2019-12-192-40/+11
|
* Ensure hover shows full type declarationKirill Bulatov2019-12-192-2/+19
|
* Omit default parameter typesKirill Bulatov2019-12-192-20/+77
|
* Merge #2311bors[bot]2019-12-181-10/+33
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2311: See through Macros for SignatureHelp r=matklad a=kjeremy Note: we meed to skip the trivia filter to make sure that `covers!(call_info_bad_offset)` succeeds otherwise we exit call_info too early. Also the test doesn't pass: `FnCallNode::with_node` always detects a MacroCall which is obviously wrong. Fixes #2310 Co-authored-by: kjeremy <[email protected]> Co-authored-by: Jeremy Kolb <[email protected]>
| * cargo fmtJeremy Kolb2019-12-181-1/+3
| |
| * Pass testJeremy Kolb2019-12-181-1/+1
| |
| * WIP: See through Macros for SignatureHelpkjeremy2019-12-181-9/+30
| | | | | | | | | | | | | | | | | | Note: we meed to skip the trivia filter to make sure that `covers!(call_info_bad_offset)` succeeds otherwise we exit call_info too early. Also the test doesn't pass: `FnCallNode::with_node` always detects a MacroCall.
* | Don't bother with focus range for navigation to localsAleksey Kladov2019-12-182-7/+49
| |
* | Refactor goto tests to always specify textsAleksey Kladov2019-12-181-50/+74
| |
* | Add blank lines for readabilityAleksey Kladov2019-12-181-0/+4
|/