Closed idcrook closed 7 years ago
@idcrook Thanks for the very detailed issue! Super awesome π I'd love for SwiftPlate to support Linux as well! π
One thing is that not all libraries can support Linux (for example, if you're building a framework that depends on UIKit
or some other Apple platforms-only API). So we should probably ask if the user wants to support Linux when running SwiftPlate - and if so perform the changes you listed above to the project. What do you think?
I think that makes a lot of sense. π I hadn't tried all the SwiftPM init types (current 3.0.1 bundled swift package
has (type: empty|library|executable|system-module)
), but it already has a command line switch/option to guard it. I think being prompted about it makes sense. π
Alright, so let's go with that! π Let me know if you want to do the implementation as well π
I'll look into it in a day or two if I can.
@idcrook Awesome, no preasure - just post here if you start working on it - otherwise I (or someone else) might pick it up - would be a great feature to have π
I created PR #20 that add the Linux library testing support. However, there a a few caveats outlined in the PR.
@idcrook Can we close this now that #20 has been merged? π
Closing, with PR #20
Noticed that Swift libraries that are to be run on Linux have one slight variation in the testing that is missing from SwiftPlate.
Swift Package Manager (
swift package init --type library
) does additionally the following:In
Tests/{PROJECT}Tests/{PROJECT}Tests.swift
it adds:the example assert is related to boilerplate code in the Sources/ implementation, but the allTests is more interesting, as that is the convention for the slightly different testing flow for Swift encountered under Linux.
For Linux it adds another, related file
Tests/LinuxMain.swift
. Its contents:Could the "cross-platformness" of SwiftPlate be updated to include libraries on Linux?