Create Swift package to separate command-line tool from core functionality #7
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.
unxip
is very impressive, I've personally seen a 3x speed improvement on my machine when unxipping Xcode.One use-case I have run into with
unxip
is wanting to use it from within any other tool or framework that needs to unxip something. With the current project structure, it meant copying overunxip.swift
into such a project or including this repository as a git submodule.A third option would be to create a Swift package around the core functionality of
unxip
, while still providing a quick way to build the command-line tool as well through anexecutableTarget
. This PR achieves such an option.I've tried to preserve the original structure of the code as much as possible, while trying my best to separate the concerns of the command-line tool from the core functionality. I'm using it over at my fork and wanted to open this pull request to see if you'd support this direction too. 馃槃
One caveat is that it has made the installation process a little more complicated, but we could publish a Homebrew formula to turn it back into one command, i.e.
brew install unxip
.