commercialhaskell / commercialhaskell/stack

Circular dependencies no longer working

Open
#3,892 2 comments 0 reactions 0 assignees View on GitHub
resolution: upstream issue type: bug
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

### 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.