-
Notifications
You must be signed in to change notification settings - Fork 724
Description
Context
Consider three packages: Alice, Bob, and Spike. Alice is a normal package. Bob is a normal package that depends on Spike. Spike depends on Alice like so:
-- Spike.cabal
...
library
mixins:
Alice hiding (Alice.Foo)
graph LR;
Bob --> Spike;
Spike -->|via mixin| Alice;
All packages are listed in cabal.project:
packages:
./Alice
./Bob
./Spike
Problem
If I run cabal repl --enable-multi-repl all, I get the following error:
Error:
Mix-in refers to non-existent library 'Alice'
(did you forget to add the package to build-depends?)
Error: [Cabal-7125]
Failed to build Spike-0.4.1 (which is required by exe:Bob from Bob-0.1.6). The failure occurred during the configure step.
Gotchas
This is sometimes hard to reproduce. If I run cabal repl --enable-multi-repl Bob, Spike may get built successfully. Same with cabal repl --enable-multi-repl Spike, which usually works.
Furthermore, I don't understand it, but sometimes cabal repl decides it needs to rebuild dependencies. (Spuriously, in my view.) If Spike needs to get rebuilt, it'll likely fail again.
This example is taken from a much larger project with a deep tree of dependencies between the component packages. I don't know if it is easy to reproduce or not.