SDGGiesbrecht/Workspace

Scripts (& Install) Fail with Swift 5

SDGGiesbrecht opened this issue · 5 comments

Issue:

With Swift 5, build and linker errors occur when trying to use the Refresh, Validate or installation scripts.


Explanation:

Workspace 0.14.2 must be paired with Swift 4.2.1:

  • The executable requires Swift 4.2.1 to be present, but not necessarily active. (If it cannot find it, the error message provides more detailed instructions.) The Swift Version Manager can be used to manage side‐by‐side Swift installations.
  • The scripts require a version of Swift compatible with 4.2.1. to be active. (Specifically, $ swift --version in a brand new terminal window must report a compatible version). Unfortunately many inadvertently breaking changes tend to find their way into minor versions of Swift, so often versions Swift intended to be compatible actually aren’t.

Some of Swift’s implementation details make it impossible for Workspace to reliably support more than one version of Swift from the same version of Workspace. These may be weeded out when/if it becomes possible, but at the moment it is not.

I might add that side‐by‐side installations of different versions of the the Workspace executable are also possible, if there is a desire to do so to use them with their corresponding side‐by‐side Swift versions. There is no tool to automate this though, so it would have to be set up manually by saving the package build products somewhere and switching them in and out of $PATH.

Now that Swift 5 is released, Workspace is switching to Swift 5. This is a top priority and as soon as Swift 5 has made its way up the dependency tree a compatible update will be released.

All dependencies are now compatible with Swift 5. Progress on Workspace itself can be tracked in #262.

Workspace 0.18.0 will be released once #263 is merged.

Workspace 0.18.0 uses Swift 5.