kareman / Moderator

A simple, modular command line argument parser in Swift.
MIT License
21 stars 2 forks source link

Enable Dual Compilation for Swift 3.1.1 and 4.1.2 #5

Closed Kaiede closed 6 years ago

Kaiede commented 6 years ago

This enables building for both Swift 3/4 from the same source, and tweaks Travis CI so it builds both to ensure someone doesn’t break one or the other.

Kaiede commented 6 years ago

Keep in mind here that the changes are meant to make it possible to use this package as a dependency in a Swift 3 Package. Since Swift 3’s PM doesn’t support branches, it is either dual version compilation, which I think is doable for a smaller project like this, or using different versions for each. The latter would require some cleanup since 0.4 has both Swift 3 and Swift 4 releases.

Dual compilation has the advantage of getting new features for both at the cost of the compatibility extensions that get compiled for Swift 3 only when a Swift 4-only API is used.

kareman commented 6 years ago

Thank you, this is great. A nice way to support both Swift 3 and 4.

kareman commented 6 years ago

@Kaiede I just released version 0.5 with these changes.

Kaiede commented 6 years ago

Sounds good. That’s one less forked repo I’m using.

Kaiede commented 6 years ago

@kareman So, bad news is that the repo isn't quite tagged correctly for the release. It should be 0.5.0 rather than 0.5, or SPM can't find it. It's pretty picky about following semantic versioning, as I've learned myself.

kareman commented 6 years ago

I was a bit too quick there. Thanks for the reminder, I've pointed this out to other repositories myself. It should be fixed now.

  1. aug. 2018 kl. 23:32 skrev Kaiede notifications@github.com:

@kareman https://github.com/kareman So, bad news is that the repo isn't quite tagged correctly for the release. It should be 0.5.0 rather than 0.5, or SPM can't find it. It's pretty picky about following semantic versioning, as I've learned myself.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kareman/Moderator/pull/5#issuecomment-413993743, or mute the thread https://github.com/notifications/unsubscribe-auth/AACz-J5npOF5MUiT0X8gTmHfcrRPX0ORks5uRzZ1gaJpZM4V_1fW.

Kaiede commented 6 years ago

No worries. Thanks. I'm getting clean travis builds from my project, everything works, looks good.