aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 'Fill match arms' should work with existing match armsSteffen Lyngbaek2020-03-191-25/+281
| | | | | | | | | | | | | | | | | | | | | | | | | | | Addresses #3039 This essentially adds missing match arms. The algorithm for this can get complicated rather quickly so bail in certain conditions and rely on a PlaceholderPat. The algorighm works as such: - Iterate through the Enum Def Variants - Attempt to see if the variant already exists as a match arm - If yes, skip the enum variant. If no, include it. - If it becomes complicated, rather than exhaustively deal with every branch, mark it as a "partial match" and simply include the placeholder. Conditions for "complication": - The match arm contains a match guard - Any kind of nested destrucuring Order the resulting merged match branches as such: 1. Provided match arms 2. Missing enum variant branch arms 3. End with Placeholder if required - Add extra tests
* Merge #3656bors[bot]2020-03-1917-185/+175
|\ | | | | | | | | | | | | | | | | | | | | | | 3656: Simplify arenas r=matklad a=matklad At the moment, Arena is paranetrized by two types: index and data. The original motivation was to allow index to be defined in the downstream crate, so that you can add inherent impls to the index. However, it seems like we've never actually used that capability, so perhaps we should switch to a generic Index impl? This PR tries this out, switching only `raw.rs` and parts of `hir_def`. wdyt? Co-authored-by: Aleksey Kladov <[email protected]>
| * Simplify Arena to use a generic indexAleksey Kladov2020-03-1917-185/+175
|/
* Merge #3658bors[bot]2020-03-194-109/+84
|\ | | | | | | | | | | | | | | | | | | | | 3658: More direct CargoWorkspace r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * Simplify SysrootAleksey Kladov2020-03-192-22/+20
| |
| * More direct CargoWorkspaceAleksey Kladov2020-03-193-87/+64
|/
* Merge #3655bors[bot]2020-03-192-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | 3655: Downgrade vscode-langaugeclient r=matklad a=matklad Looks like it broke completion :( bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * Downgrade vscode-langaugeclientAleksey Kladov2020-03-192-4/+4
|/ | | | Looks like it broke completion :(
* Merge #3652bors[bot]2020-03-196-13/+17
|\ | | | | | | | | | | | | | | | | | | | | 3652: Cleanup imports r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * Cleanup importsAleksey Kladov2020-03-196-13/+17
| |
* | Merge #3651bors[bot]2020-03-191-20/+52
|\| | | | | | | | | | | | | | | | | | | | | 3651: Merge nested use trees r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * Merge nested use treesAleksey Kladov2020-03-191-20/+52
| |
* | Merge #3650bors[bot]2020-03-193-13/+14
|\| | | | | | | | | | | | | | | | | | | | | 3650: Generalize r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * GeneralizeAleksey Kladov2020-03-193-13/+14
| |
* | Merge pull request #3641 from darinmorrison/rollup-typescriptAleksey Kladov2020-03-192-1/+4
|\ \ | |/ |/| Some improvements to rollup and ts config
| * Target es2019 (code 1.43 uses chromium 78)Darin Morrison2020-03-181-1/+1
| |
| * Add typing annotations for rollup configDarin Morrison2020-03-181-0/+3
| |
* | Merge #3649bors[bot]2020-03-192-5/+5
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3649: :arrow_up: npm r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | :arrow_up: npmAleksey Kladov2020-03-192-5/+5
|/ /
* | Don't trigger stable release when pushing to nightly branchAleksey Kladov2020-03-191-5/+5
| |
* | Merge pull request #3635 from matklad/tagsAleksey Kladov2020-03-196-34/+27
|\ \ | | | | | | Simplify extension tag sniffing
| * | Simplify extension tag sniffingAleksey Kladov2020-03-196-34/+27
|/ /
* | Merge #3629bors[bot]2020-03-1913-691/+265
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3629: Alternative aproach to plugin auto update r=matklad a=matklad This is very much WIP (as in, I haven't run this once), but I like the result so far. cc @Veetaha The primary focus here on simplification: * local simplification of data structures and control-flow: using union of strings instead of an enum, using unwrapped GitHub API responses * global simplification of control flow: all logic is now in `main.ts`, implemented as linear functions without abstractions. This is stateful side-effective code, so arguments from [Carmack](http://number-none.com/blow/john_carmack_on_inlined_code.html) very much apply. We need all user interractions, all mutations, and all network requests to happen in a single file. * as a side-effect of condensing everything to functions, we can get rid of various enums. The enums were basically a reified control flow: ``` enum E { A, B } fn foo() -> E { if cond { E::A } else { E::B } } fn bar(e: E) { match e { E::A => do_a(), E::B => do_b(), } } ==>> fn all() { if cond { do_a() } else { do_b() } } ``` * simplification of model: we don't need to reinstall on settings update, we can just ask the user to reload, we don't need to handle nightly=>stable fallback, we can ask the user to reinstall extension, (todo) we don't need to parse out the date from the version, we can use build id for nightly and for stable we can write the info directly into package.json. Co-authored-by: Aleksey Kladov <[email protected]>
| * | Rewrite auto-updateAleksey Kladov2020-03-1913-691/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Everything now happens in main.ts, in the bootstrap family of functions. The current flow is: * check everything only on extension installation. * if the user is on nightly channel, try to download the nightly extension and reload. * when we install nightly extension, we persist its release id, so that we can check if the current release is different. * if server binary was not downloaded by the current version of the extension, redownload it (we persist the version of ext that downloaded the server).
* | | Merge pull request #3646 from Veetaha/feature/revive-npm-auditAleksey Kladov2020-03-181-2/+2
|\ \ \ | |_|/ |/| | cicd: revive npm audit
| * | cicd: revive npm auditveetaha2020-03-181-2/+2
| | |
* | | Merge #3645bors[bot]2020-03-181-10/+10
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | 3645: cargo update r=matklad a=CAD97 Closes #3644 as well. Would setting up [dependabot](https://dependabot.com/) make sense for this repository? Co-authored-by: CAD97 <[email protected]>
| * | cargo updateCAD972020-03-181-10/+10
|/ /
* | Merge #3643bors[bot]2020-03-182-12/+15
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3643: Use match_ast r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | Use match_astAleksey Kladov2020-03-182-12/+15
|/ /
* | Merge #3640bors[bot]2020-03-188-72/+274
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3640: Merge imports assist r=matklad a=matklad Work towards #2220 bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | Merge imports assistAleksey Kladov2020-03-188-25/+225
| | | | | | | | | | | | Work towards #2220
| * | Strongly-typed generic methods for editing nodesAleksey Kladov2020-03-181-47/+49
|/ /
* | Merge #3637bors[bot]2020-03-182-91/+158
|\ \ | | | | | | | | | | | | | | | | | | | | | 3637: Update dependencies and fix minimist CVE r=matklad a=darinmorrison This PR just updates some dependencies and also regenerates the `package-lock.json` to fix the recent [minimist CVE](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-7598) (a dependency of eslint). Co-authored-by: Darin Morrison <[email protected]>
| * | Update deps; regen lock file; fix minimist CVEDarin Morrison2020-03-182-91/+158
|/ /
* | Merge #3636bors[bot]2020-03-181-28/+28
|\ \ | |/ |/| | | | | | | | | | | | | | | | | 3636: Reduce visibility r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * Reduce visibilityAleksey Kladov2020-03-181-28/+28
|/
* Merge #3634bors[bot]2020-03-181-12/+29
|\ | | | | | | | | | | | | | | | | | | | | 3634: Make xtask dist more reliable r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * Make xtask dist more reliableAleksey Kladov2020-03-181-12/+29
|/
* Merge #3630bors[bot]2020-03-181-1/+0
|\ | | | | | | | | | | | | | | 3630: Feature: remove dat fixme r=matklad a=Veetaha Co-authored-by: veetaha <[email protected]>
| * ra_hir_def: remove dat fixmeveetaha2020-03-181-1/+0
| |
* | Don't filter release by forkAleksey Kladov2020-03-181-1/+0
|/ | | | | | This syntax does not work for some reason https://github.com/rust-analyzer/rust-analyzer/runs/515231288?check_suite_focus=true
* Disable npm audit, as it blocks unrelated PR without a way to fixAleksey Kladov2020-03-171-2/+2
| | | | https://github.com/rust-analyzer/rust-analyzer/pull/3582#issuecomment-600107117
* Merge pull request #3582 from kiljacken/out-dir-from-checkAleksey Kladov2020-03-1718-176/+315
|\ | | | | Update OUT_DIR based on `cargo check` output
| * Use dyn-ref instead of impl to impact compile times the leastEmil Lauridsen2020-03-172-3/+3
| |
| * Slight readablity improvementEmil Lauridsen2020-03-171-1/+1
| |
| * Remove outDirOverridesEmil Lauridsen2020-03-173-15/+0
| |
| * Support loading OUT_DIR for CLI runsEmil Lauridsen2020-03-175-48/+81
| |
| * Remove unused config from VSCode extEmil Lauridsen2020-03-171-1/+0
| |
| * Support specifying OUT_DIR in json projectEmil Lauridsen2020-03-172-3/+22
| |