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

Add `--index-state` support to `cabal get` #4115

Merged
merged 2 commits into from Nov 16, 2016

Conversation

Projects
None yet
3 participants
@hvr
Copy link
Member

hvr commented Nov 15, 2016

With this cabal get gains the ability to

a) unpack and update with the .cabal revision which was
active at the given index-state, as well as

b) allow to unpack the most recent package version
(while satisfying imposed version constraints) as of
the given index-state

The --index-state flag can be combined with --pristine if only b) is
desired.

Add `--index-state` support to `cabal get`
With this `cabal get` gains the ability to

 a) unpack and update with the .cabal revision which was
    active at the given index-state, as well as

 b) allow to unpack the most recent package version
    (while satisfying imposed version constraints) as of
    the given index-state

The `--index-state` flag can be combined with `--pristine` if only b) is
desired.
@mention-bot

This comment has been minimized.

Copy link

mention-bot commented Nov 15, 2016

@hvr, thanks for your PR! By analyzing the history of the files in this pull request, we identified @23Skidoo, @edsko and @dcoutts to be potential reviewers.

@23Skidoo

This comment has been minimized.

Copy link
Member

23Skidoo commented Nov 15, 2016

May be also worth adding --x-hackage-revision=REVNO.

@hvr

This comment has been minimized.

Copy link
Member

hvr commented Nov 15, 2016

@23Skidoo Yeah, but that's a bit harder to implement (and then there's the question whether to trust the x-revision field or rather the tar-entry ordering in the .tar.gz stream; there's a few unfortunate cases where it doesn't coincide) :-)

in any case, it would go beyond the scope of this PR as it would require some additional refactoring in the index-reading code

@hvr hvr self-assigned this Nov 15, 2016

@23Skidoo

This comment has been minimized.

Copy link
Member

23Skidoo commented Nov 15, 2016

(and then there's the question whether to trust the x-revision field or rather the tar-entry ordering in the .tar.gz stream; there's a few unfortunate cases where it doesn't coincide)

IMO it's best to fail loudly in such cases and point the user to --index-state.

in any case, it would go beyond the scope of this PR as it would require some additional refactoring in the index-reading code

Yep, implementing --x-hackage-revision is of course not a requirement for merging this PR. But can you please add a changelog note and expand the cabal get section in developing-packages.rst?

@hvr

This comment has been minimized.

Copy link
Member

hvr commented Nov 16, 2016

@23Skidoo I've updated changelog & manual; anything else?

@23Skidoo 23Skidoo merged commit 07a2725 into haskell:master Nov 16, 2016

@23Skidoo

This comment has been minimized.

Copy link
Member

23Skidoo commented Nov 16, 2016

Merged, thanks!

@hvr hvr deleted the hvr:pr/unpack-index-state branch Nov 16, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment