-
Notifications
You must be signed in to change notification settings - Fork 696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace the 'unpack' command with a more general 'get'. #1075
Conversation
Ah hah, great. Will have a close look. |
Ok, it looks good. One further thing that I think we need: some degree of backwards compat for the 'unpack' ui. The unpack command has been around for ages and people are familiar with it. We shouldn't have it simply disappear instantly. So one option is to make unpack just an alias for get, or alternatively keep unpack as a separate thing command, that just calls the same code. We can decide later if we want to remove unpack from the list of commands listed in --help. |
@dcoutts Fixed in dac5d47. |
Cool. I'll apply that. Though I might drop the deprecation warning part, it's pretty cheap for us to keep it as a hidden alias indefinitely. |
Yes, we can keep it indefinitely, but I think that nudging people to use |
Is there something else I can do to get this merged in? |
@dcoutts Can I merge this in? You can always remove the deprecation warning later if you want. |
Ok, I've got through many of the other patches / pull reqs, I guess this one is next for review. We ought to be able to get it into this next release... |
@dcoutts - do you have any objections if I merge this in? |
'cabal get PACKAGE' is the new name of 'cabal unpack'. 'cabal get --source-repository' reads the source-repositories from a package's description, determines which VCS to use, and then creates a local repository or branch of the package's repository. 'cabal get --source-repository=[head|this|...]' additionally allows to specify which source-repository to use. Based on the code originally written by John Millikin <[email protected]>.
I'm merging this in. The only slightly controversial issue here is the deprecation warning for |
Replace the 'unpack' command with a more general 'get'.
This is @jmillikin's
cabal fork
implementation (#2) with the UI changes requested by @dcoutts.The first patch contains John's original implementation of
cabal fork
. The only differences are cosmetic: UI commandsfork
andunpack
are merged (this is the newcabal get
command), and the code for forking and unpacking is moved to a single module (Distribution.Client.Get
).The second patch removes duplication between the functions
fork
andunpack
.The third patch adds support for the repo kind argument to
--source-repository
(cabal get --source-repository=this PACKAGENAME
now works).