nomeata / cabal-plan-bounds

Calculate Haskell dependency ranges from multiple build plans
BSD 2-Clause "Simplified" License
33 stars 3 forks source link

Does `--also` work? #19

Closed sellout closed 7 months ago

sellout commented 7 months ago
cabal-plan-bounds --dry-run --also yaya-0.5.0.0 plans/*.json --cabal containers/yaya-containers.cabal
yaya
    - ^>=0.5.0 || ^>=0.6.0
    + ^>=0.6.0

I would have expected at least

    + ==0.5.0.0 || ^>=0.6.0

but, given PVP, I would hope that adding yaya-0.5.0.0 would result in the original bound (^>=0.5.0 || ^>=0.6.0).

nomeata commented 7 months ago

It should, using Cabal's extendVersionRanges, but I think I only used it to extend the range above.

It should, not sure why it doesn't.W Will have to have a closer look.

nomeata commented 7 months ago

I pushed a likely fix. Are you able to check if it works for you now? You should be able to clone the repo and run

cabal run cabal-plan-bounds -- --also yaya-0.5.0.0 ...

in it.

sellout commented 7 months ago

Perfect! Looks like that did it.

Thanks for the quick solve!