[Haskell-cafe] Is there some tool for inferring wide dependency ranges?

Askar Safin safinaskar at mail.ru
Thu May 27 20:28:20 UTC 2021

Oleg Grenrus, thanks a lot for big answer! Please, give a link to your tool. Ideally with some free software license.

Let me repeat my needs.

My packages are smaller than lens. Currently I have very small package https://hackage.haskell.org/package/check-cfg-ambiguity . It has two dependencies only: base and containers. And I plan to publish 1-2 packages more, they will be small, too.

I use SourceHut as code hosting and continuous integration platform. CI config is specified in usual "shell script in YAML" form ( https://lobste.rs/s/v4crap/crustaceans_2021_will_be_year_technology#c_ker4jn ) in file ".build.yml". See https://git.sr.ht/~safinaskar/check-cfg-ambiguity/tree/a9fc453eb73250650f3458659344e1b902538027/item/.build.yml for an example.

Ideally, I want two different tools.

First tool should actually compute dependency ranges. It will rebuild my package a lot of times during this computation. I don't plan to run this tool often. I think I will run it one time before each release. So, it is not necessary to put it into continuous integration.

The second tool should simply check that package is compatible with specified range. To do this, the tool should build package exactly two times: one with all specified lower bounds and one with all specified upper bounds. So, there is no any kind of combinatoric explosion. And it is perfectly okay to run such tool in continuous integration at every commit.

Currently I have neither tool.

The second tool is very simple. Well, in some sense I don't need such tool at all, because I can just put to my .build.yml shell commands for building my package with two version sets. But then I have to specify versions two times: one in *.cabal and one in .build.yml. I. e. we got DRY violation. So here is my question: is there some existing tool, which extracts bounds from *.cabal and run that two builds?

> For example haskell-ci allows to specify constraint sets,
> and I have one for example in quickcheck-instances,
> https://github.com/haskellari/qc-instances/blob/master/cabal.haskell-ci
As I can see both cabal.haskell-ci and quickcheck-instances.cabal specify versions, so you got that DRY violation, too.

Askar Safin

More information about the Haskell-Cafe mailing list