mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
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.  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:
commit
45f3a5f9c1
5 changed files with 70 additions and 50 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue