Commit graph

620 commits

Author SHA1 Message Date
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
Emil Lauridsen
f5a2fcf8f5 Change existing OUT_DIR override config to make use of new infrastructure 2020-03-17 14:47:05 +01:00
Emil Lauridsen
33c6c7abc6 Support loading OUT_DIR from cargo check at launch 2020-03-17 14:47:05 +01:00
Aleksey Kladov
ae662617a2 Separate persistent mutable state from config
That way, we clearly see which things are not change, and we also
clearly see which things are persistent.
2020-03-16 22:02:11 +01:00
Aleksey Kladov
a00bab5781 ⬆️ npm 2020-03-16 14:57:32 +01:00
bors[bot]
200c275c2e
Merge #3534
3534: Feature: vscode impl nightlies download and installation r=Veetaha a=Veetaha

I need to test things more, but the core shape of the code is quite well-formed.
The main problem is that we save the release date only for nightlies and there are no means to get the release date of the stable extension (i.e. for this we would need to consult the github releases via a network request, or we would need to somehow save this info into package.json or any other file accessible from the extension code during the deployment step, but this will be very hard I guess).
So there is an invariant that the users can install nightly only from our extension and they can't do it manually, because when installing the nightly `.vsix` we actually save its release date to `globalState`

Closes: #3402

TODO:
- [x] More manual tests and documentation

cc @matklad @lnicola 

Co-authored-by: Veetaha <gerzoh1@gmail.com>
Co-authored-by: Veetaha <veetaha2@gmail.com>
2020-03-16 10:26:31 +00:00
Veetaha
5a0041c5aa
vscode-postrefactor: migrate to arrow functions 2020-03-16 12:19:26 +02:00
Veetaha
fc47274541
vscode-postrefactor: fix syntax error 2020-03-16 12:18:30 +02:00
Veetaha
d38d59fed8
vscode-postrefactor: prefer arrow functions 2020-03-16 12:17:36 +02:00
bors[bot]
a99cac671c
Merge #3540
3540: Swtches to rust SSR query check r=matklad a=mikhail-m1

related to #3186 

Co-authored-by: Mikhail Modin <mikhailm1@gmail.com>
2020-03-16 09:48:09 +00:00
Mikhail Modin
b150965ed7 Swtches to rust SSR query check 2020-03-15 21:23:18 +00:00
Veetaha
9789f984cb vscode: sync package-lock.json version with package.json 2020-03-14 03:20:39 +02:00
Veetaha
5e32a67c83 vscode-postrefactor: more logging and better error handling 2020-03-14 03:01:14 +02:00
Veetaha
d7b46e0527 vscode-postrefactor: enforcing more reentrancy 2020-03-14 02:01:46 +02:00
Veetaha
7f02d4657b vscode-postrefactor: minor config refactorings 2020-03-14 02:01:46 +02:00
Veetaha
607d017229 vscode-postrefactor: unhandled promise rejections shall not pass 2 2020-03-14 02:01:46 +02:00
Veetaha
c2b0fffe3d vscode-postrefactor: add achtung comment 2020-03-14 02:01:46 +02:00
Veetaha
abee777b6e vscode-postrefactor: remove remainders of debug logging 2020-03-14 02:01:46 +02:00
Veetaha
028a4aa99f vscode-postrefactor: unhandled promise rejections shall not pass 2020-03-14 02:01:46 +02:00
Veetaha
b0bf495262 vscode-postrefactor: compare dates by value, not by reference 2020-03-14 02:01:46 +02:00
Veetaha
c3ee8b10b8 vscode-postrefactor: eliminate my-mistake floating promise @matklad 2020-03-14 02:01:46 +02:00
Veetaha
bc87d6de86 vscode-postrefactor: global storages 2020-03-14 02:01:46 +02:00
Veetaha
77a206e0b2 vscode: put comma back 2020-03-14 02:01:46 +02:00
Veetaha
4d17152b31 vscode: make bailing out on custom serverPath more evident 2020-03-14 02:01:46 +02:00
Veetaha
7e6b1a60c3 vscode: npm run fix 2020-03-14 02:01:46 +02:00
Veetaha
1e73811fbe vscode: amend server installation logic to account for nightlies 2020-03-14 02:01:46 +02:00
Veetaha
601fc9d1ab vscode: add nightly extension installation logic 2020-03-14 02:01:46 +02:00
Veetaha
6d2d753677 vscode: prepare config for nightlies 2020-03-14 02:01:46 +02:00
Veetaha
bc98c02dd0 vscode: prepare package.json for nightlies 2020-03-14 02:01:46 +02:00
Veetaha
0f826aec82 vscode: get release date from release info 2020-03-14 02:01:46 +02:00
Veetaha
98b2a942d1 vscode-prerefactor: add some utility functions 2020-03-14 02:01:46 +02:00
Veetaha
8203828bb0 vscode-prerefactor: merge two files into downloads.ts 2020-03-14 02:01:46 +02:00
bors[bot]
4c85e53531
Merge #3561 #3577
3561: feat: add debug code lens r=matklad a=hdevalke

Refs #3539

3577: Protect against infinite macro expansion in def collector r=edwin0cheng a=flodiebold

Something I noticed while trying to make macro expansion more resilient against errors.

There was a test for this, but it wasn't actually working because the first recursive expansion failed. (The comma...)

Even with this limit, that test (when fixed) still takes some time to pass because of the exponential growth of the expansions, so I disabled it and added a different one without growth.

CC @edwin0cheng 

Co-authored-by: Hannes De Valkeneer <hannes@de-valkeneer.be>
Co-authored-by: hdevalke <2261239+hdevalke@users.noreply.github.com>
Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
2020-03-13 14:01:29 +00:00
hdevalke
fa655912b5
Update editors/code/src/config.ts
Co-Authored-By: Veetaha <veetaha2@gmail.com>
2020-03-12 22:56:37 +01:00
Hannes De Valkeneer
39c92b3872 fixup! feat: add debug code lens
autodetect vscode-lldb
2020-03-12 22:31:47 +01:00
Hannes De Valkeneer
e9d025b618 fixup! feat: add debug code lens
avoid repetition of `--no-run`
2020-03-12 21:28:26 +01:00
Hannes De Valkeneer
a034257e5e fixup! feat: add debug code lens 2020-03-12 21:00:40 +01:00