swiftlang / vscode-swift

Visual Studio Code Extension for Swift
https://marketplace.visualstudio.com/items?itemName=sswg.swift-lang
Apache License 2.0
706 stars 47 forks source link

Confusing error if swift.path toolchain no longer exists #857

Closed award999 closed 3 weeks ago

award999 commented 3 weeks ago

Describe the bug Was in a situation where the toolchain foo the User set swift.path setting no longer existed, but the error message was "Unable to automatically discover your Swift toolchain. Either install a toolchain from Swift.org or provide the path to an existing toolchain." There was a swift in the path so took a while to realize what the problem was. A more descriptive error would help

To Reproduce Steps to reproduce the behavior:

  1. Set the User swift.path setting to some non-existent path, ex. "foo"
  2. Opened a new swift dev container
  3. Click on the "Create New Swift Project" button
  4. See error notification

Expected behavior Error message should indicate the set swift.path does not exist. Maybe with options to "Remove" and/or "Select Toolchain"

Environment

Additional context N/A

award999 commented 2 weeks ago

Verified with fed2fd734746827da29db216ce35ab881ff96f30