Closed RyanGlScott closed 7 years ago
@RyanGlScott This isn't actually a bug... that's the very reason I placed that CPP assertion in there ;-)
Fwiw, the unqualified --allow-newer
sledge-hammer is going to get deprecated or at least emit a big fat warning in future cabals. I've recently invested some time to significantly extend --allow-{older,newer}
capabilities to allow for fine-grained control, see http://cabal.readthedocs.io/en/latest/nix-local-build.html#cfg-field-allow-newer for current state. Specifically, --allow-newer: ^*
will be a safer way to relax "all" upper bounds. TLDR: don't use an unqualified --allow-newer
, it's almost always not what you want.
I'm still confused as to what exactly the problem would be with building cassava
with the most recent versions of all dependencies.
@RyanGlScott the problem is that you end up with a configuration which lacks class instances as the flag logic in the .cabal file which is considered as invariant wouldn't hold up anymore; this is because ignoring all upper bounds also removes bounds whose function is rather as predicates for the conditionals than dependency bounds. However, with the introduction of ^>=
-style bounds, we finally have a way to distinguish between hard (which you don't want to relax in general) and soft bounds (which can be relaxed with less problems) in a more natural way.
That makes sense. Thanks!
I recently ran into this issue when installing some packages with
--allow-newer
. One can reproduce the issue by installingcassava-0.5.1.0
by itself with--allow-newer
(I'm usingcabal-install-2.0.0.0
, if that makes a difference):