theos / theos

A cross-platform suite of tools for building and deploying software for iOS and other platforms.
https://theos.dev
Other
4.5k stars 1.08k forks source link

Support for Swift 5 on iOS #547

Open demhademha opened 4 years ago

demhademha commented 4 years ago

(Thanks for reporting an issue! Please make sure you click the link above to view the issue guidelines, then fill out the blanks below.)

What are the steps to reproduce this issue?

  1. install theos from the wiki
  2. install the "swift toolchain package" and the "libswift" package"
  3. create a swift project and try to compile it

What happens? the following error:

Making all for tool swift… ==> Compiling main.swift (armv7)…

:0: error: invalid value '5' in '-swift-version 5' :0: note: valid arguments to '-swift-version' are '3', '4' make[3]: *** [/var/root/theos/makefiles/instance/rules.mk:250: /var/tweaks/swift/.theos/obj/debug/armv7/main.swift.b94d3812.o] Error 1 make[2]: *** [/var/root/theos/makefiles/instance/tool.mk:20: /var/tweaks/swift/.theos/obj/debug/armv7/swift] Error 2 make[1]: *** [/var/root/theos/makefiles/instance/tool.mk:11: internal-tool-all_] Error 2 make: *** [/var/root/theos/makefiles/master/rules.mk:116: swift.all.tool.variables] Error 2

What were you expecting to happen? I was expecting the swift tool to compile Any logs, error output, etc?

(If it’s long, please paste to https://ghostbin.com/ and insert the link here.) pasted above

Any other comments?

I know it worked on previous ios version, could something have been changed in theos to cause this issue?

What versions of software are you using?

Operating System: … iOS 13.5 Toolchain Version: … Toolchain from the procursus repo swift toolchain and libswift.,toolchain, SDK Version: … iOS 13.5 sdk

kabiroberai commented 4 years ago

The swift-toolchain package doesn't support Swift 5 (see https://github.com/kabiroberai/swift-toolchain-ios/issues/2, https://github.com/kabiroberai/swift-toolchain-ios/pull/3). It may, however, be possible to use the Swift toolchain available on the Procursus repo with Theos, possibly with a little modification. I'm leaving this issue open and will try to verify that when I get the chance.