aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Add a builder for DiagnosticSinkJonas Schievink2020-07-244-88/+102
| | |
* | | Real metricsAleksey Kladov2020-07-241-3/+3
| | |
* | | Fix metricsAleksey Kladov2020-07-241-10/+20
| | |
* | | Fix metricsAleksey Kladov2020-07-242-14/+8
| | |
* | | Fix emailAleksey Kladov2020-07-241-1/+1
| | |
* | | fix syntaxAleksey Kladov2020-07-241-1/+1
| | |
* | | Fix another nameAleksey Kladov2020-07-242-3/+4
| | |
* | | fix nameAleksey Kladov2020-07-242-2/+2
| | |
* | | Add metricsAleksey Kladov2020-07-244-0/+255
| | |
* | | Revert "Merge #5516"Aleksey Kladov2020-07-242-43/+32
| | | | | | | | | | | | | | | This reverts commit 5b13c2411f025a16495f5828afe2def6e9220102, reversing changes made to c3defe2532ba6ffd12a13bcbc8fdeda037665efc.
* | | Merge #5523bors[bot]2020-07-242-13/+21
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5523: Minor r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | MinorAleksey Kladov2020-07-242-13/+21
| | |/ | |/|
* | | Merge #5522bors[bot]2020-07-241-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5522: Increace tracing-tree version from 0.1.3 to 0.1.4 r=kjeremy a=vandenheuvel Co-authored-by: Bram van den Heuvel <[email protected]>
| * | | Increace tracing-tree version from 0.1.3 to 0.1.4Bram van den Heuvel2020-07-241-1/+1
| | | |
* | | | Merge #5516bors[bot]2020-07-242-32/+43
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5516: Better LSP conformance r=matklad a=vsrs At the moment rust-analyzer does not fully conform to the LSP. This PR fixes two LSP related issues: 1) rust-analyzer sends predefined server capabilities and does not take supplied client capabilities in mind. 2) rust-analyzer uses dynamic `textDocument/didSave` registration even if the client does not support it. Co-authored-by: vsrs <[email protected]>
| * | | Always send experimental & semantic server caps.vsrs2020-07-241-72/+36
| | | |
| * | | Code formattingvsrs2020-07-241-1/+2
| | | |
| * | | Send dynamic didSave only if the client supportsvsrs2020-07-242-32/+42
| | | |
| * | | Prepare server capabilities based on client ones.vsrs2020-07-241-36/+72
| |/ /
* | | Merge #5518bors[bot]2020-07-2420-393/+1431
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5518: Use resolved paths in SSR rules r=matklad a=davidlattimore The main user-visible changes are: * SSR now matches paths based on whether they resolve to the same thing instead of whether they're written the same. * So `foo()` won't match `foo()` if it's a different function `foo()`, but will match `bar::foo()` if it's the same `foo`. * Paths in the replacement will now be rendered with appropriate qualification for their context. * For example `foo::Bar` will render as just `Bar` inside the module `foo`, but might render as `baz::foo::Bar` from elsewhere. * This means that all paths in the search pattern and replacement template must be able to be resolved. * It now also matters where you invoke SSR from, since paths are resolved relative to wherever that is. * Search now uses find-uses on paths to locate places to try matching. This means that when a path is present in the pattern, search will generally be pretty fast. * Function calls can now match method calls again, but this time only if they resolve to the same function. Co-authored-by: David Lattimore <[email protected]>
| * | SSR: Fix a typescript lint warningDavid Lattimore2020-07-241-1/+1
| | |
| * | SSR: Allow function calls to match method callsDavid Lattimore2020-07-246-25/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This differs from how this used to work before I removed it in that: a) It's only one direction. Function calls in the pattern can match method calls in the code, but not the other way around. b) We now check that the function call in the pattern resolves to the same function as the method call in the code. The lack of (b) was the reason I felt the need to remove the feature before.
| * | SSR: Disable matching within use declarationsDavid Lattimore2020-07-242-1/+51
| | | | | | | | | | | | | | | It currently does the wrong thing when the use declaration contains braces.
| * | SSR: Use Definition::find_usages to speed up matching.David Lattimore2020-07-245-24/+157
| | | | | | | | | | | | When the search pattern contains a path, this substantially speeds up finding matches, especially if the path references a private item.
| * | SSR: Match paths based on what they resolve toDavid Lattimore2020-07-249-61/+482
| | | | | | | | | | | | Also render template paths appropriately for their context.
| * | SSR: Pass current file position through to SSR code.David Lattimore2020-07-2411-32/+88
| | | | | | | | | | | | In a subsequent commit, it will be used for resolving paths.
| * | SSR: Refactor to not rely on recursive search for nesting of matchesDavid Lattimore2020-07-244-27/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, submatches were handled simply by searching in placeholders for more matches. That only works if we search all nodes in the tree recursively. In a subsequent commit, I intend to make search not always be recursive recursive. This commit prepares for that by finding all matches, even if they overlap, then nesting them and removing overlapping matches.
| * | SSR: Add a couple of tests for non-recursive searchDavid Lattimore2020-07-241-0/+33
| | | | | | | | | | | | | | | These tests already pass, however once we switch to non-recursive search, it'd be easy for these tests to not pass.
| * | SSR tests: Define all paths needed for templatesDavid Lattimore2020-07-241-26/+76
| | | | | | | | | | | | | | | | | | | | | In a later commit, paths in templates will be resolved. This allows us to render the path with appropriate qualifiers for its context. Here we prepare for that change by updating existing tests where I'd previously not bothered to define the items that the template referred to.
| * | Move iteration over all files into the SSR crateDavid Lattimore2020-07-246-89/+92
| | | | | | | | | | | | The methods `edits_for_file` and `find_matches_in_file` are replaced with just `edits` and `matches`. This simplifies the API a bit, but more importantly it makes it possible in a subsequent commit for SSR to decide to not search all files.
| * | SSR: Move search code into a submoduleDavid Lattimore2020-07-242-48/+56
| | | | | | | | | | | | | | | | | | Also renamed find_matches to slow_scan_node to reflect that it's a slow way to do things. Actually the name came from a later commit and probably makes more sense once there's an alternative.
| * | SSR: Parse template as Rust code.David Lattimore2020-07-245-82/+112
| | | | | | | | | | | | | | | | | | This is in preparation for a subsequent commit where we add special handling for paths in the template, allowing them to be qualified differently in different contexts.
| * | SSR: Change the way rules are stored internally.David Lattimore2020-07-244-107/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we had: - Multiple rules - Each rule had its pattern parsed as an expression, path etc This meant that there were two levels at which there could be multiple rules. Now we just have multiple rules. If a pattern can parse as more than one kind of thing, then they get stored as multiple separate rules. We also now don't have separate fields for the different kinds of things that a pattern can parse as. This makes adding new kinds of things simpler. Previously, add_search_pattern would construct a rule with a dummy replacement. Now the replacement is an Option. This is slightly cleaner and also opens the way for parsing the replacement template as the same kind of thing as the search pattern.
| * | SSR: Use expect! in testsDavid Lattimore2020-07-243-37/+38
| | |
* | | Merge #5519bors[bot]2020-07-241-2/+14
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5519: Cache macro expansion in semantics r=matklad a=matklad #5497 accidentally made syntax highlighting quadratic, due to repeated tokentreeizing of macros. bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | Cache macro expansion in semanticsAleksey Kladov2020-07-241-2/+14
| | | | | | | | | | | | | | | | | | | | #5497 accidentally made syntax highlighting quadratic, due to repeated tokentreeizing of macros.
* | | | Merge #5517bors[bot]2020-07-241-0/+1
|\| | | | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | 5517: Add missing cancellation point r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | Add missing cancellation pointAleksey Kladov2020-07-241-0/+1
|/ /
* | Merge #5515bors[bot]2020-07-241-0/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | 5515: Add profiling call r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * Add profiling callAleksey Kladov2020-07-241-0/+1
| |
* | Merge #5511bors[bot]2020-07-231-3/+6
|\ \ | | | | | | | | | | | | | | | | | | | | | 5511: Set the document version after changes are applied but before vfs r=kjeremy a=kjeremy Co-authored-by: kjeremy <[email protected]>
| * | Set the document version after changes are applied but before vfskjeremy2020-07-231-3/+6
| |/
* | Merge #5510bors[bot]2020-07-235-34/+75
|\ \ | |/ |/| | | | | | | | | | | | | | | | | 5510: Lighter weight tempdir r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * Lighter weight tempdirAleksey Kladov2020-07-235-34/+75
|/
* Merge #5508bors[bot]2020-07-231-2/+2
|\ | | | | | | | | | | | | | | 5508: Update tracing r=kjeremy a=kjeremy Co-authored-by: kjeremy <[email protected]>
| * Update tracingkjeremy2020-07-231-2/+2
|/
* Merge #5507bors[bot]2020-07-236-71/+107
|\ | | | | | | | | | | | | | | | | | | | | | | | | 5507: Require quotes around key-value cfg flags in rust-project.json r=matklad a=matklad This matches rustc command-line flags, as well as the build.rs format. bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * Require quotes around key-value cfg flags in rust-project.jsonAleksey Kladov2020-07-236-71/+107
|/ | | | This matches rustc command-line flags, as well as the build.rs format.
* Merge #5506bors[bot]2020-07-234-8/+9
|\ | | | | | | | | | | | | | | | | | | | | 5506: Rename modules r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * Rename modulesAleksey Kladov2020-07-234-8/+9
| |