Swift on Windows - REPL does not start

Hello,

I have installed Swift on Windows 10 using the instruction from here

The installation went fine, but the REPL does not show up when I type swift command.

From the dev cmd from VS

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community>swift --version
compnerd.org Swift version 5.3.3-dev (LLVM 3093af41dd, Swift 266905108e)
Target: x86_64-unknown-windows-msvc

The output of the swift command without any flags. Maybe no errors are displayed, but the repl does not start.

Windows version is
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.19042 N/A Build 19042

Thank you,
Cosmin

Silly me :grin:

It requires Python (3.9)

Perhaps the Python recommendation should be put mandatory, or a message when the user try the command without Python being installed. :)

Yes, that was a bug in the original 5.3 builds (that I was hesitant to repair). The 5.4 and development snapshots should actually use 3.7 as documented. The reason for the explicit versioning here is simply that Visual Studio has a bundled Python, and I think that there is some value in just having Visual Studio serve as the distribution mechanism for all of the dependencies. I could also see some value in distributing python along with the toolchain, but that would require some investigation into licensing and packaging.

Unfortunately, as lldb links against python, we cannot execute code in lldb without Python being present, so you cannot really display an error message. If the toolchain had a lldb built without Python, the display of types would not function.

The terminology there is borrowed from RFCs and Debian:

  • required: this is not an option
  • recommended: you really should install this, if you don't, things may not work

Thank you for the answer :)

Terms of Service

Privacy Policy

Cookie Policy