[Resolved] Main & 6.0 Snapshots broken on Windows

UPDATE:
The August 7th snapshots are now usable!

The current (August 6th) 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.

1 Like

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.

Can someone suggest a place to open an issue to get a new Windows snapshot posted to swift.org? @mishal_shah?

Can anyone in here suggest how to successfully use a new Swift 6.0 or Main snapshot?

Where should I raise the issue? GitHub - swiftlang/swift: The Swift Programming Language?

Depends on what's crashing. I've been successfully using the x86_64 Windows toolchain from Aug 7 on swift-package-manager. ARM has a compiler crash that I've raised against swiftlang/swift. Anything else you can raise on swiftlang/swift-package-manager and I can reroute as necessary. I'm currently working on making the Window swiftpm better and would love to hear if there are issues I'm not running into.

Take a look at my original post up top. That's the issue I'm running into with the August 7th distribution from swift.org.

1 Like

Yes please raise an issue on swift since it appears to be the compiler frontend crashing.

@compnerd claims the issue has been fixed actually, but we just need a newer release posted. Where do I ask for that?

That'll come when the builds pass. But I'm confused why it's working for me. Mind you I'm running Windows 11 ARM in Parallels. I'll double check on a x86 machine we have around here.

Nope, works for me there too. I can run swift --version and get

Swift version 6.0-dev (LLVM 73a346c9caf32cc, Swift 3e21fc6610cc917)
Target: x86_64-unknown-windows-msvc

I still suggest raising an issue and capturing your configuration so we can see what's different.

Indeed you're right. It must have been the August 6th snapshots that were failing which were the latest available at the time of my posting. I've updated the original post to reflect this.