haskell-hvr / hslogger

Logging framework for Haskell
https://hackage.haskell.org/package/hslogger
BSD 3-Clause "New" or "Revised" License
64 stars 36 forks source link

Doesn't build with time 1.5 #27

Closed hesselink closed 9 years ago

hesselink commented 10 years ago

Hslogger doesn't build with time 1.5:

[2 of 8] Compiling System.Log.Formatter ( src/System/Log/Formatter.hs, dist/dist-sandbox-1b7e0ad6/build/System/Log/Formatter.o )

src/System/Log/Formatter.hs:74:37:
    Couldn't match expected type ‘time-1.5:Data.Time.Format.Locale.TimeLocale’
                with actual type ‘System.Locale.TimeLocale’
    NB: ‘time-1.5:Data.Time.Format.Locale.TimeLocale’
          is defined in ‘Data.Time.Format.Locale’ in package ‘time-1.5’
        ‘System.Locale.TimeLocale’
          is defined in ‘System.Locale’ in package ‘old-locale-1.0.0.6’
    In the first argument of ‘formatTime’, namely ‘defaultTimeLocale’
    In the first argument of ‘(<$>)’, namely
      ‘formatTime defaultTimeLocale timeFormat’

src/System/Log/Formatter.hs:75:40:
    Couldn't match expected type ‘time-1.5:Data.Time.Format.Locale.TimeLocale’
                with actual type ‘System.Locale.TimeLocale’
    NB: ‘time-1.5:Data.Time.Format.Locale.TimeLocale’
          is defined in ‘Data.Time.Format.Locale’ in package ‘time-1.5’
        ‘System.Locale.TimeLocale’
          is defined in ‘System.Locale’ in package ‘old-locale-1.0.0.6’
    In the first argument of ‘formatTime’, namely ‘defaultTimeLocale’
    In the first argument of ‘(<$>)’, namely
      ‘formatTime defaultTimeLocale timeFormat’

There's also no upper bound on the dependency, leading to broken builds for packages that depend on hslogger.

masterdezign commented 9 years ago

Hello,

any solutions?

jgoerzen commented 9 years ago

I uploaded 1.2.6 which requires an older version of time.

hesselink commented 9 years ago

Thanks, I don't think that will always work, though. Cabal is still free to pick and older version of hslogger, and build it against time 1.5. To prevent this, you could edit the package information of older versions in-place on hackage, or release a new version that works with 1.5.

hesselink commented 9 years ago

With GHC 7.10 around the corner, this is becoming more urgent, as it includes time 1.5 as one of the boot packages. Do you think you'll have time for a fix, or should someone else try?

Daniel-Diaz commented 9 years ago

See #28 for a pull request that would fix this issue.

bgamari commented 9 years ago

Or for that matter #29.

jgoerzen commented 9 years ago

29 / #28 merged and released. Thanks folks!

Daniel-Diaz commented 9 years ago

Thanks @jgoerzen !

Daniel-Diaz commented 9 years ago

However, the cabal file still requires time < 1.5.