Skip to content

Stop if cannot attain requested index-state, #8076. #8077

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

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cabal-install/src/Distribution/Client/IndexUtils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,11 @@ getSourcePackagesAtIndexState verbosity repoCtxt mb_idxState mb_activeRepos = do
IndexStateTime ts0 -> do
when (isiMaxTime isi /= ts0) $
if ts0 > isiMaxTime isi
then warn verbosity $
"Requested index-state " ++ prettyShow ts0
++ " is newer than '" ++ unRepoName rname ++ "'!"
++ " Falling back to older state ("
++ prettyShow (isiMaxTime isi) ++ ")."
then die' verbosity $
"Stopping this command as the requested index-state=" ++ prettyShow ts0
++ " is newer than " ++ prettyShow (isiMaxTime isi)
++ ", the most recent state of '" ++ unRepoName rname
++ "'. You could try 'cabal update' to bring down a later state or force the use of current local state with `--index-state=HEAD`."
else info verbosity $
"Requested index-state " ++ prettyShow ts0
++ " does not exist in '"++ unRepoName rname ++"'!"
Expand Down