apply-refact icon indicating copy to clipboard operation
apply-refact copied to clipboard

Missing upper bounds on `ghc` on hackage

Open andreasabel opened this issue 3 years ago • 4 comments
trafficstars

Leaving through the releases of apply-refact on hackage, I see no upper bounds on ghc starting with release 0.7.0.0. This may not reflect buildability correctly, see e.g. #114. What would be the correct upper bound for the released versions?

andreasabel avatar Dec 24 '21 11:12 andreasabel

@andreasabel Thanks for catching this. I've updated the upper bounds of base for the latest several versions on Hackage. Since ghc versions map 1:1 to base versions, will remove bounds on ghc in future releases.

zliu41 avatar Jan 02 '22 07:01 zliu41

@zliu41 wrote:

Since ghc versions map 1:1 to base versions, will remove bounds on ghc in future releases.

Are you sure about this? Aren't there two GHCs to consider?

  • The GHC you are compiling apply-refact with (here, a bound on base can be used to restrict compilability---although I do not see why one would restrict this way).
  • The GHC library you are using (to parse, print, manipulate Haskell code). This is the ghc package, I suppose.

andreasabel avatar Jan 04 '22 13:01 andreasabel

My understanding is that you can't depend on a different version of the GHC library than the GHC compiler version you are using. That is the whole reason why ghc-lib exists.

So there's no need to have bounds on both base and ghc. While I don't have a preference on which one to put the bounds on, almost all Hackage packages have bounds on base so I chose base.

zliu41 avatar Jan 05 '22 08:01 zliu41

I think because build failures (e.g., https://github.com/ndmitchell/hlint/runs/4691040973?check_suite_focus=true#step:8:286) happen due to changes in the ghc module rather than changes in base, it would make more sense to put the relevant bounds on ghc.

andreasabel avatar Jan 05 '22 14:01 andreasabel