Skip to content
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

Package.swift is not used with Swift 5.9.1 #771

Open
tonka3000 opened this issue Oct 29, 2023 · 9 comments
Open

Package.swift is not used with Swift 5.9.1 #771

tonka3000 opened this issue Oct 29, 2023 · 9 comments

Comments

@tonka3000
Copy link
Contributor

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.

@compnerd
Copy link
Owner

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.

@tonka3000
Copy link
Contributor Author

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
Copy link
Contributor Author

tonka3000 commented Nov 1, 2023

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.

@compnerd
Copy link
Owner

compnerd commented Nov 1, 2023

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?

@tonka3000
Copy link
Contributor Author

I just replaced Windows 10 on my only device

Not my decision to use Windows 10 😄

Do you have Developer Mode enabled?

Yes

image

@compnerd
Copy link
Owner

compnerd commented Nov 2, 2023

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.

@tonka3000
Copy link
Contributor Author

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.

@compnerd
Copy link
Owner

compnerd commented Nov 2, 2023

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

@compnerd
Copy link
Owner

compnerd commented Apr 5, 2024

CC: @libewa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants