The problem is that `--allow-newer` tells cabal to ignore dependencies' upper bounds completely. If those bounds turn out to be necessary in some cases, the solver will produce a bad build plan. Using finer-grained (per-dependency) `--allow-newer` can avoid this by only permitting the solver to ignore specific constraints.

On Fri, May 31, 2024 at 4:57 PM Daniel Trstenjak <daniel.trstenjak@gmail.com> wrote:
Hi Andrew,

> --allow-newer is a blunt instrument, not much surprise it fails. Use a more precise incantation: cabal build --allow-newer='cabal-bounds:*,cabal-lenses:*’ works fine for me.

thanks for the hint, but how can this compile error occur if cabal can resolve the
dependencies? I would‘ve thought, that the dependency resolution would fail before.

Greetings,
Daniel
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.


--
brandon s allbery kf8nh
allbery.b@gmail.com