Does cabal update force recompilation of everything?

Actually, maybe this is possible? I haven’t tried it, and I don’t know if it works, but if it does what is documented, then I think it might be a solution!

https://cabal.readthedocs.io/en/stable/cabal-project.html#cfg-field-preferences

One way to use preferences is to take a known working set of constraints (e.g., via cabal freeze) and record them as preferences. In this case, the solver will first attempt to use this configuration, and if this violates hard constraints, it will try to find the minimal number of upgrades to satisfy the hard constraints again.

Of course, for it to really work with the output of a freeze file, one would hope that there would be a preferences-file option.

1 Like