Commit Graph

656 Commits

Author SHA1 Message Date
kjeremy
e88ee75ffb rollup 2.3.2 2020-04-01 14:44:30 -04:00
bors[bot]
f77fc158fc
Merge #3780 #3787
3780: Simplify r=matklad a=Veetaha

I absolutely love tha fact that removing `.clone()` simplifies the code comparing to other languages where it's actually the contrary (ahem ~~`std::move()`~~)

3787: vscode: add syntax tree inspection hovers and highlights r=matklad a=Veetaha

![inspect-tree](https://user-images.githubusercontent.com/36276403/78029767-c7426900-7369-11ea-9ed6-b8a0f8e05bac.gif)
I implemented the reverse mapping (when you hover in the rust editor), but it seems overcomplicated, so I removed it

Related #3682 

Co-authored-by: veetaha <veetaha2@gmail.com>
Co-authored-by: Veetaha <veetaha2@gmail.com>
2020-03-31 17:40:03 +00:00
veetaha
90cc8cc528 vscode: small refactor 2020-03-31 20:29:07 +03:00
veetaha
f3612b7024 vscode: scroll to the syntax node in rust editor when highlighting 2020-03-31 20:28:10 +03:00
Veetaha
3b09768ebc
vscode: apply review nits 2020-03-31 19:06:07 +03:00
Aleksey Kladov
6343ddd009 Revert accidental package.json changes 2020-03-31 17:00:15 +02:00
bors[bot]
fa3c7742af
Merge #3790
3790: Better names for config structs r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-03-31 14:06:03 +00:00
veetaha
4fbca1c64d vscode: use ctx.subscriptions instead of local .disposables 2020-03-31 16:57:03 +03:00
Aleksey Kladov
f5b01d6544 WIP: uniformalize external tools config 2020-03-31 15:55:05 +02:00
kjeremy
b3b8d31c5e Update node deps 2020-03-31 09:47:53 -04:00
veetaha
09a760e52e vscode: add syntax tree inspection hovers and highlights 2020-03-31 16:20:59 +03:00
Tim
3eb45b9922 Pass string instread of WorkspaceFolder 2020-03-31 10:24:01 +01:00
Tim
9ef1e9efc6 Remove unnecessary null check 2020-03-31 09:11:22 +01:00
Tim
a781a58fe2 Throw error if no folder is opened 2020-03-31 09:06:52 +01:00
Tim
6e535915bd Use namespace import 2020-03-31 09:06:46 +01:00
Tim
768aa4259f Add basic task support
This adds basic support for running `cargo build`, `cargo run`, etc.
2020-03-30 21:23:21 +01:00
Kirill Bulatov
b892a48740 Code review fixes
Co-Authored-By: Veetaha <veetaha2@gmail.com>
2020-03-30 13:39:14 +03:00
Kirill Bulatov
8a23bec2cd Style fixes 2020-03-30 13:39:14 +03:00
Kirill Bulatov
a9dd442733 Send the config from the client 2020-03-30 13:39:14 +03:00
Kirill Bulatov
019f269a0a Process configuration response draft 2020-03-30 13:39:14 +03:00
Kirill Bulatov
8c4aab0c80 Client side draft 2020-03-30 13:39:14 +03:00
Veetaha
51156cbf03
vscode: fix release tag retrieval
Co-Authored-By: Laurențiu Nicola <lnicola@users.noreply.github.com>
2020-03-27 11:05:37 +02:00
veetaha
0072aa31ed vscode: show release tag with along with the commit hash for RA version command 2020-03-27 00:38:03 +02:00
bors[bot]
d2619bf0ca
Merge #3725
3725: vscode: fix local devel and remove disposables memory leak on server restrart r=matklad a=Veetaha



Co-authored-by: veetaha <veetaha2@gmail.com>
2020-03-26 21:47:26 +00:00
veetaha
261ef1c455 vscode: small post-refactor 2020-03-26 23:45:01 +02:00
veetaha
e1a5e9565b vscode: fix memory leak on server restart
The memory leak was because on the server restrart the array of extensionContext.substiptions was not cleared
2020-03-26 23:44:19 +02:00
veetaha
68ff71e3ab vscode: fix local devel
The value of releaseTag is not undefined, but null in actual package.json
2020-03-26 23:42:40 +02:00
bors[bot]
ece8fa81bb
Merge #3726
3726: vscode: refactor analyzer status r=matklad a=Veetaha



Co-authored-by: veetaha <veetaha2@gmail.com>
2020-03-26 09:49:12 +00:00
veetaha
d1721021ef vscode: refactor analyzer status 2020-03-25 21:00:04 +02:00
Aleksey Kladov
aed535fa7a Use the right arch name for x86 (32 bit) 2020-03-25 10:51:03 +01:00
Matt Hooper
6f239a581a Extension types and rendering 2020-03-24 23:22:41 +01:00
bors[bot]
1d6024e460
Merge #3695
3695: vscode: simplify and refactor config r=matklad a=Veetaha

Removed unnecessary interfaces, changed `cfg` to be a getter to ensure the fresh values any time possible.
Migrated from explicit casts to implicit.

Co-authored-by: veetaha <veetaha2@gmail.com>
2020-03-24 09:03:40 +00:00
bors[bot]
c6db6e2352
Merge #3696 #3698 #3703
3696: vscode: more type safety r=matklad a=Veetaha



3698: Consider references when applying postfix completions r=matklad a=SomeoneToIgnore

Sometimes my RA debugging workflow breaks because `.dbg` is applied to the variable that is used later in the code.
It's safer to consider the refences to avoid this for completions that may trigger the move.

3703: Don't try to enable proposed API's on stable r=matklad a=matklad



bors r+
🤖

Co-authored-by: veetaha <veetaha2@gmail.com>
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-03-24 08:54:30 +00:00
Aleksey Kladov
be4977da7f Don't try to enable proposed API's on stable 2020-03-24 09:34:54 +01:00
veetaha
4cee3e9f22 vscode: more type safety 2020-03-24 01:11:36 +02:00
veetaha
65e2d8a0c8 vscode: simplify and refactor config 2020-03-24 01:00:57 +02:00
Veetaha
95b5129a8a
vscode: remove unnecessary code
This cancel is unnecessary since we cancel the previous inlay hints requests in `fetchHints()` method itself. This is not a hard error, we just called cancel() 2 times.
2020-03-20 21:23:56 +02:00
Aleksey Kladov
8ee7780ca9 ⬆️ npm 2020-03-20 13:07:43 +01:00
Aleksey Kladov
4b5435b52b Make from-source install use cargo installed binary by default 2020-03-20 13:07:12 +01:00
Aleksey Kladov
7adcadd279 Downgrade vscode-langaugeclient
Looks like it broke completion :(
2020-03-19 15:08:10 +01:00
Aleksey Kladov
13af63a403
Merge pull request #3641 from darinmorrison/rollup-typescript
Some improvements to rollup and ts config
2020-03-19 11:26:00 +01:00
Aleksey Kladov
8f8f6b47de ⬆️ npm 2020-03-19 10:30:41 +01:00
Aleksey Kladov
3d1cb5e20f Simplify extension tag sniffing 2020-03-19 09:37:03 +01:00
bors[bot]
aca3c3086e
Merge #3629
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 <aleksey.kladov@gmail.com>
2020-03-19 08:06:48 +00:00
Aleksey Kladov
fb6e655de8 Rewrite auto-update
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).
2020-03-19 09:04:59 +01:00
Darin Morrison
630888df5b Target es2019 (code 1.43 uses chromium 78) 2020-03-18 16:30:34 -06:00
Darin Morrison
0ec20234a7 Add typing annotations for rollup config 2020-03-18 16:30:34 -06:00
Darin Morrison
482a7c2262 Update deps; regen lock file; fix minimist CVE 2020-03-18 10:36:11 -06:00
Emil Lauridsen
e154132c91 Remove outDirOverrides 2020-03-17 14:55:44 +01:00
Emil Lauridsen
9e7dbb1abd Remove unused config from VSCode ext 2020-03-17 14:47:05 +01:00