Wizek
Wizek

Reputation: 4993

Is there a way to find all the correct dependency-version-ranges for a .cabal file?

I would like to give just the right dependency ranges for a library published on hackage.

I would like to avoid being

So, is there a way (e.g. with a script) to automatically find the correct dependency-version-ranges for a cabal package with which build succeeds and all tests pass?

Upvotes: 2

Views: 372

Answers (1)

Ørjan Johansen
Ørjan Johansen

Reputation: 18189

Although I haven't used it myself, there is a tool cabal-rangefinder designed to help with this. Note that:

  • It essentially does this by recompiling several times to test what versions work.
  • It's not foolproof, as it makes some "reasonable" assumptions that aren't always true. (And without those, it would have to do a lot more recompiling to test every version.)
  • It's probably still experimental (the author hasn't released to Hackage yet.)
  • It doesn't yet run package tests, but there's an issue to add an option for this.

Upvotes: 3

Related Questions