Skip to content

Circular dependencies no longer working #3892

Open
@tswelsh

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.

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