Skip to content

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

Closed

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

Activity

  1. DanielG commented on Jul 27, 2019

    @DanielG
    CollaboratorAuthor

    Seems this might actually be a problem with the NondecreasingIndentation extension specifically or at least some subset of options. DeriveFunction doesn't trigger this but ImpredicativeTypes also does.

    My guess would be 3f497f2 is related though.

  2. added 2 commits that reference this issue on Aug 17, 2019
    ffb6cc5
    dfabd1f
  3. TomMD commented on Aug 28, 2019

    @TomMD
    Contributor

    I've seen similar behavior but with ViewPatterns:

    [__0] trying: analysis-data-0.1.0.0 (user goal)
    [__1] trying: turtle-1.5.14 (dependency of analysis-data)
    [__2] next goal: clock (dependency of turtle)
    [__2] rejecting: clock-0.8 (conflict: requires ViewPatterns)
    [__2] rejecting: clock-0.7.2, clock-0.7.1.1, clock-0.7.1, clock-0.6.0.1,
    clock-0.6.0, clock-0.5.2, clock-0.5.1, clock-0.5.0.1, clock-0.5.0.0,
    clock-0.4.6.0, clock-0.4.5.0, clock-0.4.4.0, clock-0.4.3.0, clock-0.4.2.0,
    clock-0.4.1.3, clock-0.4.1.2, clock-0.4.1.1, clock-0.4.0.1, clock-0.3,
    clock-0.2.0.0, clock-0.1.2.1, clock-0.1.2, clock-0.1.1, clock-0.1 (constraint
    from project config TODO requires ==0.8)
    [__2] fail (backjumping, conflict set: clock, turtle)
    

    This is when using cabal-install 3.0.0.0 and new-test on a project that was previously driven using cabal 2.4.1.0.

  4. hvr commented on Aug 28, 2019

    @hvr
    Member

    Duplicate of #6099

    (see specifically my comment #6099 (comment) on how to fix this)

  5. marked this as a duplicate of 3.0 Solver issue #6099 on Aug 28, 2019
  6. 23Skidoo commented on Oct 16, 2019

    @23Skidoo
    Member

    Closing in favour of #6099.

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

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