Package.swift is not used with Swift 5.9.1
tonka3000 opened this issue · 9 comments
As already metioned here I can not build this repo with Swift 5.9.1. I get the following error when I type swift build --product UICatalog
.
error: 'swift-win32': package 'package@swift-5.9.swift' is using Swift tools version 3.1.0 which is no longer supported; consider using '// swift-tools-version: 5.9' to specify the current tools version
I was only able to fix it by copy Package@swift-5.4.swift
to Package@swift-5.9.swift
and change the swift-tools-version to 5.9.
Package.swift
should be chosen by swift and the swift-tools-version 5.7.0 there should be fine when working correctly as @compnerd mentioned.
This is definitely odd. #770 adds the 5.9 train on the CI and that seems to work fine without changes, so something is definitely different between your setup and CI. If we can isolate that, we might be able to resolve this.
The OS version is the only thing which is apparently. I'm on 22H2 Windows 10, windows-latest
GitHub Actions is Windows Server 2022
AFAIK. I think this is also the reason why I can not extract the installer packages like in your CI script with msiexec (I assume too old msiexec).
Not quite sure if this is related. I will try your builds from https://github.com/thebrowsercompany/swift-build
I have the same problem with https://github.com/thebrowsercompany/swift-build
It works when I remove all redirect files Package@swift-<version>.swift
which contains a redirect like Package@swift-5.4.swift
, in the current case Package@swift-5.5.swift
and Package@swift-5.6.swift
.
It seems that redirects does not work in my setup at all.
Ugh! I just replaced Windows 10 on my only device that was running it. I am pretty sure that I build swift-win32 on that when I did the changes for the SxS manifests here.
Do you have Developer Mode enabled?
Haha, might not be your decision, but it's still useful signal! There's something that I've missed and that's causing issues.
Okay, that's interesting that you have developer mode enabled and are still seeing that. I've heard of one other instance of this, but that has a slightly different message where they are unable to read the symlink.
Would you be able to test with the symlinks replaced with copies? If that works we can temporarily replace them.
Would you be able to test with the symlinks replaced with copies? If that works we can temporarily replace them.
This is already the case for me. My git config core.symlinks
was false
(maybe related with this) so I had already copies instead of symlinks. I set it to true
for your repo. After that git replaced the copies with symlink and it works now without issues.
It seems that the git copy of the symlink was the issue for me.
That is an awesome find, thank you for the info!