The current x86_64 snapshots for main and 6.0 are completely unusable on Windows. I uninstalled 5.10.1 (working great) and then ran the installer exe from Swift.org - Install Swift.

A simple swift --version results in

remark: In-process target-info query failed (open("LoadLibraryW failure: 126")). Using fallback mechanism.

Then a prompt from swift-frontend.exe
image

And then an additional line in the console:

error: frontend job retrieving target info failed with code 309:

What's going on?

Swift 6.0 adds a bunch of new libraries to the toolchain (part of Swift toolchain modularization, I would say). For tarballs we’re simply copying the whole built directory, but Windows installer (WiX) requires a list of files to collect, so most added files will appear in the Windows installer a few days later, causing frequent breakage on the toolchain.

I do agree that we need to add full testing on the Windows installer package, instead of the built toolchain, before a toolchain is released.

This was broken recently with some changes that @Douglas_Gregor made, and then @Alex_L fixed subsequently. I suspect that we haven't had a newer release (CC: @mishal_shah).

@stevapple yes, a simple smoke test would be great (e.g. building a docker container with the installer and building say swift-win32 and running its test suite within the container). We do this in the builds that we do at The Browser Company, but have not managed to integrate that into the Apple CI.

Is there a way to derive the list of libraries for WiX from CMake, since CMake is the source of truth for what libraries we're linking? Yes, we can throw a specialized CI job at it, but better to define away the problem if we can.

Doug

No, unfortunately that is not. Furthermore, we do not perform the proper installation in CMake either, and until we can completely change the build and install process for the toolchain and all it’s components, I fear that CMake is not a good source for the information.

Well folks, I wonder if a band-aid patch in the interim is in order... It would be very useful to run the latest and greatest Swift on Windows.