compnerd / compnerd/swift-win32

Package.swift is not used with Swift 5.9.1

Open
#771 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
1.2k
Forks
76
PR merge metrics
No merged PRs in 30d

Description

As already metioned [here](https://github.com/compnerd/swift-win32/issues/768#issuecomment-1783894205) I can not build this repo with Swift 5.9.1. I get the following error when I type `swift build --product UICatalog`.

```cmd
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](https://github.com/compnerd/swift-win32/issues/768#issuecomment-1783898506).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by comparing Package.swift and Package@swift-5.4.swift, then reproduce the issue with `swift build --product UICatalog` using Swift 5.9.1. Check how Swift selects the package manifest and verify that the build no longer treats the selected manifest as using Swift tools version 3.1.0.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.