Skip to content

Circular dependencies no longer working #3892

Open

Description

@tswelsh

General summary/comments (optional)

We have a project with package A that exposes a library and has a test module. Package B depends on A and exposes a library that is used by A's test suite (the reason for this is that package B is used by other packages). So there is a circularish dependency going on, which works when building with GHC 8.0.2 but not GHC 8.2.2. Not sure if this is stack or cabal or GHC or what, but I thought that stack has code to deal with this situation (checking whether it can do an all in one build, I think?), so perhaps something changed in GHC or cabal that stops it from working.

Steps to reproduce

Minimal example here: https://github.com/dten/CouldntMatchTypeRepro. Changing the resolver in the stack.yaml between LTS 9 and LTS 10 exhibits the change in behaviour.

Expected

stack builds the project regardless of LTS.

Actual

A configuration that uses GHC 8.2.2 fails to build the project.

Stack version

$ stack --version
Version 1.7.0, Git revision a6ae6a51e1b0b12c37786c27bdd3e0a7e9497c03 (dirty) (5697 commits) x86_64 hpack-0.21.2

Method of installation

Built from master.

Activity

  1. tswelsh commented on Feb 26, 2018

    @tswelsh
    ContributorAuthor

    Building with -v shows that stack is constructing the same build plan in both cases, and executing the plan in the same way. So it looks like an upstream change. The next place to poke around in is probably the cabal layer to look for a change from 1.24.2 to 2.0.1, I might take a look at that another day.

  2. mgsloan commented on Feb 27, 2018

    @mgsloan
    Contributor

    Thanks for investigating deeply, it may be worth opening up an issue on the cabal tracker for this.

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

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