Install Swiftly UX Flow Change

@rbenegal raised an issue a few days ago about how the Swift VS Code extension handles incorrect or unavailable toolchains. I wanted to ask for ideas on how this can be fixed.

Currently, when Swiftly is installed correctly, but the installation of a specific version of Swift fails, the user gets a prompt to restart VS Code with a tiny error message in the corner:

This is not a good UX. It's super easy to miss that error message, and get confused on why Swiftly installed correctly, but the version of Swift you wanted was not installed. Here's how I was thinking about fixing it:

  1. When Swiftly isn't installed and .swift-version is present, the user is prompted to install Swiftly
  2. The user is presses a button to install Swiftly, then restart VS Code so it can be added to the PATH.
  3. On restart, the extension gets the Swift version given in .swift-version, and installs it.

This decouples the Swiftly installation from the Swift (no -ly :upside_down_face:) installation.

Hopefully that makes sense :sweat_smile:. Let me know if you have other ideas on how this UX annoyance can be handled. It's a low-priority thing, but worth fixing imo.

3 Likes