-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swift on Windows from Winget is apparently too old for Visual Studio #79439
Comments
This is expected - we need a newer clang distribution which requires a rebranch. I believe that the main snapshot might be new enough. CC: @shahmishal @etcwilde |
Hmm, I have this config and it works fine. Let me dig a bit more. |
Yeah, I just tried it and it's working (you have 27 tests that are failing mind you :)). I use the Visual Studio Installer to install the C++ environment and to make sure both the x86_64 and arm64 MSVC toolchains are installed. It's also useful to run it once in a while for updates. Though you seem to have the latest MSVC - 14.43, so I'm very confused why you're seeing this. |
Yeah, the failing tests are why I was trying to do this. Did you try this with winget or with out-of-band toolchain installs? |
No, I just have the latest Community 2022 and then installed the 6.0.2 swift package to match what you had. One important thing is that you can only have one swift toolchain installed at a time. If you have multiple the path turns into a mess. |
It should match what Winget gives you since all it does is run the same installers. I'm just wondering if you still have an old toolchain lying around getting in the way. |
Oh interesting, on my Parallels VM, I am seeing this. It was working fine on my x86 real machine. |
Now I'm seeing it there too. I'm not sure how it was working before now. |
Sorry about that, I must have been mixing up my environments. Good news is that the 6.1 snapshots are working. They move up to clang 19 by the looks of it. |
Came here to see if anyone was having this issue too. Clean Windows 11 install, Visual Studio Community 2022 17.13 (MSVC build tools 14.43 / latest). Swift 6.0.3 (and before) just don't work due to this issue. I discovered you can download the VisualStudioSetup.exe from https://visualstudio.microsoft.com/ (Community installer), and run this to get an older version, which they disclose absolutely nowhere:
If you want to stick with VS 17.13, you can use older MSVC build tools by going to the "Visual Studio Installer" app, click modify on the install, click "Individual Components", uncheck MSVC build tools latest (on the right side) and select an older MSVC from the list such as 14.42, which seems to work! |
Description
After installing Swift via Winget, I attempted to build swift-crypto. The build immediately failed, complaining clang was too old.
Reproduction
winget install --id Microsoft.VisualStudio.2022.Community --exact --force --custom "--add Microsoft.VisualStudio.Component.Windows11SDK.22000 --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.VC.Tools.ARM64"
winget install --id Swift.Toolchain -e
git clone https://github.com/apple/swift-crypto
cd swift-crypto
swift test
Expected behavior
The tests to build and run, or some kind of Swift error, or any meaningful progress on the Swift side of things.
Environment
Swift version 6.0.2 (swift-6.0.2-RELEASE)
Target: x86_64-unknown-windows-msvc
Additional information
No response
The text was updated successfully, but these errors were encountered: