swift-win32 icon indicating copy to clipboard operation
swift-win32 copied to clipboard

Package.swift is not used with Swift 5.9.1

Open tonka3000 opened this issue 2 years ago • 9 comments
trafficstars

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 '[email protected]' 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 [email protected] to [email protected] 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.

tonka3000 avatar Oct 29 '23 13:10 tonka3000

This is definitely odd. https://github.com/compnerd/swift-win32/pull/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.

compnerd avatar Oct 29 '23 16:10 compnerd

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

tonka3000 avatar Nov 01 '23 09:11 tonka3000

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 [email protected], in the current case [email protected] and [email protected].

It seems that redirects does not work in my setup at all.

tonka3000 avatar Nov 01 '23 09:11 tonka3000

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?

compnerd avatar Nov 01 '23 14:11 compnerd

I just replaced Windows 10 on my only device

Not my decision to use Windows 10 :smile:

Do you have Developer Mode enabled?

Yes

image

tonka3000 avatar Nov 01 '23 17:11 tonka3000

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.

compnerd avatar Nov 02 '23 13:11 compnerd

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.

tonka3000 avatar Nov 02 '23 18:11 tonka3000

That is an awesome find, thank you for the info!

compnerd avatar Nov 02 '23 19:11 compnerd

CC: @libewa

compnerd avatar Apr 05 '24 15:04 compnerd