Integrate SwiftFormat into the swiftly project dependencies #158
+14
−25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The SwiftFormat that is run in the CI is a very specific version that is unlikely to be the one a dev has installed with homebrew or discovered for themselves and built from source. Discovering the version involves finding the magic in the lint.dockerfile.
SwiftPM provides a mechanism for bringing in product dependencies so that you can simply run using the toolchain. The dependencies can be specified using an exact match on a particular version. These products from the dependencies can be discovered using the
swift package describe
command, and perhaps someday Swift devs will discover a package's dev tools in this way.Add the SwiftFormat dependency as a package dependency in swiftly at the version that is currently used in the soundness CI checks. Use the the swift command to invoke the 'swiftformat' product from the dependency instead of manually git cloning and building it manually in the dockerfile.
Provide a rationale for the dependency in the Package.swift for anyone who is curious about it.