JohnSundell / Marathon

[DEPRECATED] Marathon makes it easy to write, run and manage your Swift scripts 🏃
MIT License
1.86k stars 78 forks source link

PackageManager: Support Swift 4.2 #181

Closed JohnSundell closed 6 years ago

JohnSundell commented 6 years ago

Swift 4.2 introduces a new syntax to express Swift language versions in a SwiftPM manifest. To handle that, PackageManager now detects the Swift version used to compile a script, and adjusts the syntax accordingly.

Ideally we’d have a more declarative way to model these type of code paths, but that’s a refactor for the future :)

Also, to make these kind of changes able to take effect without requiring users to blast their ~/.marathon folder, a marathon-generation-version header is introduced into generated Package.swift manifests. This version can be bumped in order for Marathon to force-re-generate all Package manifests, in case of syntax changes like this one. This change is backwards compatible.