1

I have two stack projects, A and B. B depends on A; B's stack.yaml is the following:

resolver: lts-12.10
packages:
- .
- ../path/to/A/

where there exists a file ../path/to/A/stack.yaml, and stack build in A's directory builds successfully.

In B's directory, I stack build --ghc-options -v, and stack builds A, then proceeds to trying to build B, failing to find A's modules. I don't know how stack works, but the verbose output shows that GHC is looking only in ./.stack-work and ./src/ - not in A's directory. Running stack dot produces a diagram with nodes A and B, but no arrows between them. It's like stack is seeing A but not as a dependency of B.

stack solver reports that no changes need to be made.

Using latest stack (v1.7.1)

1 Answers1

0

Found the answer on another SO article: the piece I was missing was adding A's package name to the dependencies list in B's package.yaml file. This hadn't occured to be earlier, as I'd incorrectly assumed that dependencies was for upstream repository packages only.