Skip to content

cabal build error, don't warn and fallback to older state. #8076

Closed
@philderbeast

Description

@philderbeast

If I have an index-state in the project file that is newer can we please make it an error rather than a warning when cabal build is invoked?

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) ++ ")."

-- cabal.project
packages: .
index-state: 2022-03-22T14:16:26Z
> cabal build all --enable-tests
Warning: Requested index-state 2022-03-22T14:16:26Z is newer than
'hackage.haskell.org'! Falling back to older state (2022-03-14T21:07:44Z).
Resolving dependencies..

We get a warning. It is on us to call cabal update. I'm unhappy that this is a warning and not an error as I don't think it makes sense for cabal build to proceed. Also often there is a lot of build output and it would be easy to miss this warning.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions