fulldecent / swift5-module-template

An opinionated starting point for awesome, reusable Swift 5 modules

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update Package.swift to use Swift 5+

yaroslav-zhurakovskiy opened this issue · comments

Upgrade Package.swift so it can take advantage of the latest features.

  • Use swift-tools-version:5+ instead of swift-tools-version:4.2
  • Add "platform" parameter to the package declaration
  • Add "swiftLanguageVersions" parameter to the package declaration

Documentation references:
https://developer.apple.com/documentation/swift_packages/package
https://developer.apple.com/documentation/swift_packages/platform
https://developer.apple.com/documentation/swift_packages/package/3197887-swiftlanguageversions
https://developer.apple.com/documentation/swift_packages/swiftversion

Right now I am seeing 5.1 at https://github.com/fulldecent/swift5-module-template/blob/master/xxPROJECTxNAMExx/Package.swift#L1

Are you seeing 4.2 somewhere?


Regarding platform and swiftLanguageVersions. Perhaps we can add a note into the Package.swift file. But since this is a default file intended to be used by everybody programming in Swift then perhaps we should not limit the default by choosing these defaults.

Sorry, I just added the issue concerning the usage of new parameters. I though it was using the old version of swift because I did not see "platform" param.

thank you, closing