Chart-cario not in stackage snaphots

I am developing on nixos and the package Chart-cario worked fine with cabal. I thought I might want to give the option to build my library via stack, too, and then the error appeared when I ran stack build:

Chart-cairo needed, but the stack configuration has no specified version  (latest matching version is 1.9.3)
Chart-gtk3 needed, but the stack configuration has no specified version  (latest matching version is 1.9.3)

Following the recommendation and specifying extra-deps in stack.yaml didn’t lead anywhere as there a lot of dependencies that don’t seem to be in the recent stackage snapshots, either.

At least this is how it looks like to me:

https://www.stackage.org/package/Chart-cairo/snapshots

Here you can see that Chart-cairo has not been in any snapshot since March 2018. I don’t understand why. As I said, in my nixos/cabal setup the package works out of the box.

Is there a reason why a package gets lost like this? There is even a newer version 1.9.3 on hackage that never made it into any snapshot.

There are two main reasons that packages can get removed from stackage snapshots. Either the package gets outdated (outdated deps, missing new GHC support, compilation failures) or the package’s maintainer opted to remove it. You may be able to get some hints on what happened by searching for it in stackage/build-constraints.yaml at master · commercialhaskell/stackage · GitHub - it seems that one of its dependencies operational failed to compile at some point, and the packages were never reinstated once that was solved (this is a manual process triggered by the package’s maintainer or by the stackage curator).

It looks like this can be resolved, so i’ll file a PR

1 Like

But unfortunately Chart-cairo still seems to be blocked since cairo requires an older version of Cabal. Perhaps your cabal --version is < 3.3 and that’s why it works for you outside of stack? You may be able to override the Cabal version in your snapshots (with e.g. extra-deps: [Cabal-3.2.1.0] in your stack.yaml).

1 Like