aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | Don't fail tests when updating snapshotAleksey Kladov2020-07-011-8/+9
| | | | |
* | | | | Merge #5160bors[bot]2020-07-012-52/+48
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5160: Use the existing Semantics in auto_import r=matklad a=lnicola Co-authored-by: Laurențiu Nicola <[email protected]>
| * | | | Use the existing Semantics in auto_importLaurențiu Nicola2020-07-012-52/+48
|/ / / /
* | | | Merge #5098bors[bot]2020-07-013-601/+390
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5098: Bump npm deps r=Veetaha a=lnicola Co-authored-by: Laurențiu Nicola <[email protected]> Co-authored-by: Laurențiu Nicola <[email protected]>
| * | | | Be more strict with `@types/node`Laurențiu Nicola2020-07-012-4/+4
| | | | | | | | | | | | | | | | | | | | Co-authored-by: Veetaha <[email protected]>
| * | | | Use newer @types/nodeLaurențiu Nicola2020-06-291-1/+1
| | | | |
| * | | | Downgrade @types/nodeLaurențiu Nicola2020-06-282-4/+4
| | | | |
| * | | | Bump @rollup/plugin-commonjsLaurențiu Nicola2020-06-273-10/+9
| | | | |
| * | | | Bump some npm depsLaurențiu Nicola2020-06-272-591/+381
| | | | |
| | | | |
| \ \ \ \
*-. \ \ \ \ Merge #5154 #5157bors[bot]2020-07-0110-169/+291
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5154: Structured search debugging r=matklad a=davidlattimore Adds a "search" mode to the rust-analyzer binary that does structured search (SSR without the replace part). This is intended primarily for debugging why a bit of code isn't matching a pattern. 5157: Use dynamic dispatch in AstDiagnostic r=matklad a=lnicola Co-authored-by: David Lattimore <[email protected]> Co-authored-by: Laurențiu Nicola <[email protected]>
| | * | | | Use dynamic dispatch in AstDiagnosticLaurențiu Nicola2020-07-012-6/+6
| | | | | |
| * | | | | Structured search debuggingDavid Lattimore2020-07-018-163/+285
| | | | | |
* | | | | | Merge #5158bors[bot]2020-07-018-29/+45
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5158: Use CrateName correctly r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | | | Use Strings for display namesAleksey Kladov2020-07-015-15/+15
| | | | | |
| * | | | | Use CrateName for semantic namesAleksey Kladov2020-07-015-14/+30
| | | | | |
* | | | | | Merge #5156bors[bot]2020-07-0111-35/+37
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5156: Remove db from AssistsContext r=matklad a=lnicola Co-authored-by: Laurențiu Nicola <[email protected]>
| * | | | | | Remove db from AssistsContextLaurențiu Nicola2020-07-0111-35/+37
|/ / / / / /
* | | | | | Merge #5153bors[bot]2020-07-013-19/+15
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5153: Make SemanticsScope non-generic r=matklad a=lnicola This slightly reduces the build times: ![image](https://user-images.githubusercontent.com/308347/86210975-3a809480-bb7e-11ea-8975-788457f6b353.png) (compare to https://github.com/rust-analyzer/rust-analyzer/issues/1987#issuecomment-652202248) Co-authored-by: Laurențiu Nicola <[email protected]>
| * | | | | | Make SemanticsScope non-genericLaurențiu Nicola2020-07-013-19/+15
| | |/ / / / | |/| | | |
* | | | | | Merge #5155bors[bot]2020-07-011-1/+1
|\ \ \ \ \ \ | |/ / / / / |/| / / / / | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5155: FileSetConfig works with empty set of roots r=matklad a=matklad Closes #5139 bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * / / / FileSetConfig works with empty set of rootsAleksey Kladov2020-07-011-1/+1
|/ / / / | | | | | | | | | | | | Closes #5139
* | | | Merge #5142bors[bot]2020-06-305-5/+43
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5142: analysis-stats: allow parallel type inference r=matklad a=jonas-schievink This is mostly just for testing/fun, but it looks like type inference can be sped up massively with little to no effort (since it runs after the serial phases are already done). Without `--parallel`: ``` Item Collection: 16.43597698s, 683mb allocated 720mb resident Inference: 25.429774879s, 1720mb allocated 1781mb resident Total: 41.865866352s, 1720mb allocated 1781mb resident ``` With `--parallel`: ``` Item Collection: 16.380369815s, 683mb allocated 735mb resident Parallel Inference: 7.449166445s, 1721mb allocated 1812mb resident Inference: 143.437157ms, 1721mb allocated 1812mb resident Total: 23.973303611s, 1721mb allocated 1812mb resident ``` Co-authored-by: Jonas Schievink <[email protected]>
| * | | | analysis-stats: allow parallel type inferenceJonas Schievink2020-06-305-5/+43
| | | | |
* | | | | Merge #5152bors[bot]2020-06-301-4/+13
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5152: Don't crash on empty out_dirs with older cargos r=matklad a=matklad closes #5125 bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | | | Don't crash on empty out_dirs with older cargosAleksey Kladov2020-06-301-4/+13
|/ / / / / | | | | | | | | | | | | | | | closes #5125
* | | | | Merge #5151bors[bot]2020-06-301-74/+100
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5151: Switch to expect for the rest of inlay tests r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | | | Switch to expect for the rest of inlay testsAleksey Kladov2020-06-301-74/+100
| | |_|/ / | |/| | |
* | | | | Merge #5150bors[bot]2020-06-301-28/+4
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5150: Bump console and insta r=kjeremy a=kjeremy Removes clicolors-control and atty Co-authored-by: kjeremy <[email protected]>
| * | | | | Bump console and insta (removes clicolors-control and atty)kjeremy2020-06-301-28/+4
|/ / / / /
* | | | | Merge #5143bors[bot]2020-06-301-2/+2
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5143: Fix a typo r=kjeremy a=mbrobbel Co-authored-by: Matthijs Brobbel <[email protected]>
| * | | | Fix a typoMatthijs Brobbel2020-06-301-2/+2
| |/ / /
* | | | Merge #5146bors[bot]2020-06-302-631/+199
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5146: Simplify most of the inlay hints tests r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | Simplify most of the inlay hints testsAleksey Kladov2020-06-302-631/+199
|/ / /
* | | Merge #5138bors[bot]2020-06-301-525/+511
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5138: Refactor runnable tests r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | Refactor runnable testsAleksey Kladov2020-06-301-525/+511
| | | |
* | | | Merge #5136bors[bot]2020-06-302-44/+73
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5136: Split namespace maps in `ItemScope` r=jonas-schievink a=jonas-schievink Reduces memory usage of the CrateDefMap query by ~130 MB (50%) on r-a. I was also looking into handling glob imports more efficiently (storing scope chains instead of always duplicating everything into the glob-importing module's scope), but it seems that this already gives the most significant wins. Co-authored-by: Jonas Schievink <[email protected]>
| * | | Remove `entries_without_primitives`Jonas Schievink2020-06-302-11/+3
| | | |
| * | | Simplify entry API usageJonas Schievink2020-06-301-21/+12
| | | |
| * | | Reorder importsJonas Schievink2020-06-301-1/+2
| | | |
| * | | Split namespace maps in `ItemScope`Jonas Schievink2020-06-301-34/+79
| | | | | | | | | | | | | | | | Reduces memory usage of the CrateDefMap query by ~130 MB on r-a.
* | | | Merge #5137bors[bot]2020-06-3010-737/+639
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | 5137: Make gotodef tests more data-driven r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | Remove confusing APIAleksey Kladov2020-06-304-27/+32
| | | |
| * | | Rewrite goto implementation testsAleksey Kladov2020-06-303-104/+119
| | | |
| * | | Rewrite goto definition testsAleksey Kladov2020-06-305-614/+487
| | | |
| * | | Better factoringAleksey Kladov2020-06-302-9/+18
| | | |
* | | | Merge #5135bors[bot]2020-06-301-5/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5135: Generalize annotations r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | Generalize annotationsAleksey Kladov2020-06-301-5/+8
|/ / /
* | | Merge #5132bors[bot]2020-06-305-7/+7
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5132: Fix some typos r=matklad a=davidlattimore Co-authored-by: David Lattimore <[email protected]>
| * | | Fix some typosDavid Lattimore2020-06-305-7/+7
| | | |
* | | | Merge #5101bors[bot]2020-06-3010-13/+377
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5101: Add expect -- a light-weight alternative to insta r=matklad a=matklad This PR implements a small snapshot-testing library. Snapshot updating is done by setting an env var, or by using editor feature (which runs a test with env-var set). Here's workflow for updating a failing test: ![expect](https://user-images.githubusercontent.com/1711539/85926956-28afa080-b8a3-11ea-9260-c6d0d8914d0b.gif) Here's workflow for adding a new test: ![expect-fresh](https://user-images.githubusercontent.com/1711539/85926961-306f4500-b8a3-11ea-9369-f2373e327a3f.gif) Note that colorized diffs are not implemented in this PR, but should be easy to add (we already use them in test_utils). Main differences from insta (which is essential for rust-analyzer development, thanks @mitsuhiko!): * self-updating tests, no need for a separate tool * fewer features (only inline snapshots, no redactions) * fewer deps (no yaml, no persistence) * tighter integration with editor * first-class snapshot object, which can be used to write test functions (as opposed to testing macros) * trivial to tweak for rust-analyzer needs, by virtue of being a workspace member. I think eventually we should converge to a single snapshot testing library, but I am not sure that `expect` is exactly right, so I suggest rolling with both insta and expect for some time (if folks agree that expect might be better in the first place!). # Editor Integration Implementation The thing I am most excited about is the ability to update a specific snapshot from the editor. I want this to be available to other snapshot-testing libraries (cc @mitsuhiko, @aaronabramov), so I want to document how this works. The ideal UI here would be a code action (:bulb:). Unfortunately, it seems like it is impossible to implement without some kind of persistence (if you save test failures into some kind of a database, like insta does, than you can read the database from the editor plugin). Note that it is possible to highlight error by outputing error message in rustc's format. Unfortunately, one can't use the same trick to implement a quick fix. For this reason, expect makes use of another rust-analyzer feature -- ability to run a single test at the cursor position. This does need some expect-specific code in rust-analyzer unfortunately. Specifically, if rust-analyzer notices that the cursor is on `expect!` macro, it adds a special flag to runnable's JSON. However, given #5017 it is possible to approximate this well-enough without rust-analyzer integration. Specifically, an extension can register a special runner which checks (using regexes) if rust-anlyzer runnable covers text with specific macro invocation and do special magic in that case. closes #3835 Co-authored-by: Aleksey Kladov <[email protected]>