haskell / hackage-security

Hackage security framework based on TUF (The Update Framework)
http://hackage.haskell.org/package/hackage-security
56 stars 48 forks source link

hackage-security does not support mtl-2.3 #288

Closed Bodigrim closed 1 year ago

Bodigrim commented 1 year ago

I'm not sure why the upper bound was relaxed in #272 / #273:

cabal build all -c 'transformers >= 0.6' -c 'mtl >= 2.3' --allow-newer='Cabal-syntax:mtl,Cabal-syntax:transformers,Cabal:mtl,Cabal:transformers'

fails with

src/Hackage/Security/Util/Exit.hs:33:22: error:
    Variable not in scope:
      liftM :: (Either a0 a0 -> a0) -> m (Either a a) -> m a
   |
33 | multipleExitPoints = liftM aux . runExceptT
   |                      ^^^^^
Mikolaj commented 1 year ago

Well spotted. We should tweak CI so that it detects such problems.

PR fixing this incompatibility would be welcome.

andreasabel commented 1 year ago

I ran into this trap before: I relaxed an upper bound and everything compiled fine, so I thought it was safe.
But nowadays I check the output of cabal-plan to see whether the new version of the dependency was actually picked up. If it wasn't, I abstain from making the relaxation (or go into more effort with allow-newer, constraint etc.).