Commit Graph

493 Commits

Author SHA1 Message Date
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
Aleksey Kladov be4977da7f Don't try to enable proposed API's on stable 2020-03-24 09:34:54 +01: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 4b5435b52b Make from-source install use cargo installed binary by default 2020-03-20 13:07:12 +01:00
Aleksey Kladov 3d1cb5e20f Simplify extension tag sniffing 2020-03-19 09:37:03 +01: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
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
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 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