Skip to content

Solver failure on 3.0 with distsdir from 2.4.1.0 due to outdated "compiler" cache #6163

@DanielG

Description

@DanielG

Describe the bug

When running v2-build from the current 3.0 branch in a project with any other-extensions declared and where the project was last built with cabal-install-2.4.1.0 a solver failure will occur.

It seems to me the dist-newstyle/cache/compiler cache is not getting invalidated even though the new cabal version expects more info to be in there. If I remove that file everything is fine.

To Reproduce
Steps to reproduce the behavior:

$ cabal init -m -n -p repro --is-executable
$ echo '  other-extensions: NondecreasingIndentation' >> repro.cabal

$ rm -r dist-newstyle
$ cabal-2.4.1.0 v2-build

$ cabal-3.0.0.0 v2-build # solver failure
Warning: Parsing the index cache failed (Unknown encoding for constructor).
Trying to regenerate the index cache...
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] next goal: repro (user goal)
[__0] rejecting: repro-0.1.0.0 (conflict: requires NondecreasingIndentation)
[__0] fail (backjumping, conflict set: repro)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: repro

$ rm dist-newstyle/cache/compiler
$ cabal-3.0.0.0 v2-build # works

System informataion

  • OS: Debian buster
  • ghc version: 8.4.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions