For a research project I would like examples of packages which give the cabal solver some difficulty — ie for which solving dependencies (or failing to solve) takes a noticeable amount of time, say at least 30 seconds. I’m sure people have examples. Pleas share them here!
2 Likes
Couldn’t you just try all Hackage packages? I would expect a naive approach to take at most ten hours, especially if you add a timeout of 30 seconds.
Found the acme-everything author ![]()
Oh, well, it fails on the first step with a silly error
[__1] rejecting: ztail-1.2.0.2, ztail-1.2.0.1, ztail-1.2, ztail-1.1,
ztail-1.0.2, ztail-1.0.1, ztail-1.0 (does not contain library, which is
required by acme-everything)
But that can be a good start. With a few iterations on pruning you can even run the “largest buildable closure” contest with prizes (=
That would defeat the purpose. What I want is a realistic job that induces lots of backtracking.
You can build anything sizeable (say, cabal-install or better anything depending on TLS) with --prefer-oldest. This is guaranteed to cause a lot of backtracking.
1 Like
Indeed, HLS with --prefer-oldest takes a long time, so I suggest the HLS code base ![]()
> time cabal build --dry-run all -w ghc-9.10.3 --prefer-oldest
Resolving dependencies...
Build profile: -w ghc-9.10.3 -O1
In order, the following would be built (use -v for more details):
...
________________________________________________________
Executed in 39.18 secs fish external
usr time 37.70 secs 55.00 micros 37.70 secs
sys time 0.60 secs 999.00 micros 0.60 secs