Skip to content

Commit

Permalink
Add workflow for rustup concurrency failure. Bump to 0.3.18
Browse files Browse the repository at this point in the history
  • Loading branch information
willcrichton committed Sep 30, 2021
1 parent 6ad1137 commit 2f0f843
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ["Will Crichton <[email protected]>"]
edition = "2018"
name = "flowistry"
version = "0.3.17"
version = "0.3.18"
description = "Powerful IDE tools for Rust"
repository = "https://github.com/willcrichton/flowistry"
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion ide/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"type": "git"
},
"description": "Powerful IDE tools for Rust",
"version": "0.3.17",
"version": "0.3.18",
"engines": {
"vscode": "^1.54.0"
},
Expand Down
23 changes: 20 additions & 3 deletions ide/src/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as vscode from "vscode";
import * as cp from "child_process";
import _ from "lodash";
import { Readable } from "stream";
import open from "open";

import { Result } from "./types";
import { log, CallFlowistry } from "./vsc_utils";
Expand Down Expand Up @@ -106,9 +107,25 @@ export async function setup(
}

if (version != VERSION) {
let components = TOOLCHAIN.components.join(",");
let rustup_cmd = `rustup toolchain install ${TOOLCHAIN.channel} -c ${components}`;
await exec_notify(rustup_cmd, "Installing nightly Rust...");
let components = TOOLCHAIN.components.map(c => `-c ${c}`).join(" ");
let rustup_cmd = `rustup toolchain install ${TOOLCHAIN.channel} ${components}`;
try {
await exec_notify(rustup_cmd, "Installing nightly Rust...");
} catch (e: any) {
let choice = await vscode.window.showErrorMessage(
"Flowistry failed to install because rustup failed. Click \"Show fix\" to resolve, or click \"Dismiss\ to attempt installation later.",
"Show fix",
"Dismiss"
);

if (choice == "Show fix") {
open("https://github.com/willcrichton/flowistry/blob/master/README.md#rustup-fails-on-installation");
await vscode.window.showInformationMessage("Click \"Continue\" once you have completed the fix.", "Continue");
} else {
return null;
}
}


try {
await download();
Expand Down
2 changes: 1 addition & 1 deletion src/core/aliases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ where

elapsed("Alias compute", start);

debug!(
trace!(
"Aliases: {}",
aliases
.loans
Expand Down

0 comments on commit 2f0f843

Please sign in to comment.