-
Notifications
You must be signed in to change notification settings - Fork 83
Install Toolchain #1780
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Install Toolchain #1780
Conversation
845d30a
to
3b13b09
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking really good so far! Here are some things I noticed while testing this out locally:
- The toolchain selection dialog is getting really big with this change. I think it makes more sense to make the Swiftly install a separate VS Code command and add it as an action to the toolchain selection dialog. Toolchain selection is more about switching between already installed toolchains anyway.
- Toolchains should be ordered most recent first rather than earliest. E.g. 6.1.1 should be at the top.
src/toolchain/swiftly.ts
Outdated
): Promise<void> { | ||
logger?.info(`Executing post-install script for toolchain ${version}`); | ||
|
||
const outputChannel = new SwiftOutputChannel( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: was this a suggestion from someone? Not sure if we want to open a new output channel, but at very least wouldn't we want this to be in our log folder so it's archived?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ya still don't think we'd want to create an output channel for each install, they're meant to be longer term, not just quicker operations. We could have a single "Swiftly" output channel we share between installs though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a temporary vscode.window.createOutputChannel
, we will not log it.
5cd66b3
to
76f3df7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, some smaller things
@@ -111,6 +115,8 @@ export enum Commands { | |||
OPEN_MANIFEST = "swift.openManifest", | |||
RESTART_LSP = "swift.restartLSPServer", | |||
SELECT_TOOLCHAIN = "swift.selectToolchain", | |||
INSTALL_SWIFTLY_TOOLCHAIN = "swift.installSwiftlyToolchain", | |||
INSTALL_SWIFTLY_SNAPSHOT_TOOLCHAIN = "swift.installSwiftlySnapshotToolchain", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Seems like this command was not registered in the package.json above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed adding, but it still shows up in the command palette, which I'm not sure how. I have added it.
const quickPickItems = sortedToolchains.map(toolchain => ({ | ||
label: `$(cloud-download) ${toolchain.version.name}`, | ||
description: "snapshot", | ||
detail: `Install snapshot version • Date: ${toolchain.version.type === "snapshot" ? toolchain.version.date || "Unknown" : "Unknown"} • Branch: ${toolchain.version.type === "snapshot" ? toolchain.version.branch || "Unknown" : "Unknown"}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: If the VSCode window is smaller, does it start to truncate this?
suggestion: Since the command is "Install Snapshot Toolchain..." we can drop "Install snapshot version" and just have "Date: • Branch: "
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this makes more sense.
src/toolchain/swiftly.ts
Outdated
): Promise<void> { | ||
logger?.info(`Executing post-install script for toolchain ${version}`); | ||
|
||
const outputChannel = new SwiftOutputChannel( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ya still don't think we'd want to create an output channel for each install, they're meant to be longer term, not just quicker operations. We could have a single "Swiftly" output channel we share between installs though
80b67fe
to
a1515c6
Compare
a1515c6
to
9ef0ecf
Compare
Feature Issue #1778
Description
Issue: 1778
Tasks