4992: Never disable error logging on the frontend r=matklad a=Veetaha



4993: Make bootstrap error message more informative and better-fitting r=matklad a=Veetaha

Now this better fits standard vscode extension activation failure message and suggests enabling verbose logs.

![image](https://user-images.githubusercontent.com/36276403/85321828-ffbb9400-b4cd-11ea-8adf-4032b1f62dfd.png)


4994: Decouple http file stream logic from temp dir logic r=matklad a=Veetaha

Followup for #4989 

4997: Update manual.adoc r=matklad a=gwutz

GNOME Builder (Nightly) supports now rust-analyzer

4998: Disrecommend trace.server: "verbose" for regular users r=matklad a=Veetaha

This option has never been useful for me, I wonder if anyone finds regular users can use this for sending logs

Co-authored-by: Veetaha <veetaha2@gmail.com>
Co-authored-by: Günther Wagner <info@gunibert.de>
This commit is contained in:
bors[bot] 2020-06-23 10:09:58 +00:00 committed by GitHub
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 70 additions and 50 deletions

View file

@ -43,12 +43,16 @@ export async function activate(context: vscode.ExtensionContext) {
const config = new Config(context);
const state = new PersistentState(context.globalState);
const serverPath = await bootstrap(config, state).catch(err => {
let message = "Failed to bootstrap rust-analyzer.";
let message = "bootstrap error. ";
if (err.code === "EBUSY" || err.code === "ETXTBSY") {
message += " Other vscode windows might be using rust-analyzer, " +
"you should close them and reload this window to retry.";
message += "Other vscode windows might be using rust-analyzer, ";
message += "you should close them and reload this window to retry. ";
}
message += " Open \"Help > Toggle Developer Tools > Console\" to see the logs";
message += 'Open "Help > Toggle Developer Tools > Console" to see the logs ';
message += '(enable verbose logs with "rust-analyzer.trace.extension")';
log.error("Bootstrap error", err);
throw new Error(message);
});
@ -178,7 +182,11 @@ async function bootstrapExtension(config: Config, state: PersistentState): Promi
assert(!!artifact, `Bad release: ${JSON.stringify(release)}`);
const dest = path.join(config.globalStoragePath, "rust-analyzer.vsix");
await download(artifact.browser_download_url, dest, "Downloading rust-analyzer extension");
await download({
url: artifact.browser_download_url,
dest,
progressTitle: "Downloading rust-analyzer extension",
});
await vscode.commands.executeCommand("workbench.extensions.installExtension", vscode.Uri.file(dest));
await fs.unlink(dest);
@ -299,7 +307,12 @@ async function getServer(config: Config, state: PersistentState): Promise<string
if (err.code !== "ENOENT") throw err;
});
await download(artifact.browser_download_url, dest, "Downloading rust-analyzer server", { mode: 0o755 });
await download({
url: artifact.browser_download_url,
dest,
progressTitle: "Downloading rust-analyzer server",
mode: 0o755
});
// Patching executable if that's NixOS.
if (await fs.stat("/etc/nixos").then(_ => true).catch(_ => false)) {