
This is a quick summary of the results of building most of hackage using three combinations of ghc and Cabal. I reported the breakage due to Cabal-1.6 previously. This is a brief look at breakage introduced with ghc-6.10 and the associated library changes. I have build summary logs and individual package build logs. I will post those later. Anyway, here's the summary of the summary: ghc-6.8.2 & Cabal-1.4.0.2 1 UnpackFailed 3 InstallFailed 20 ConfigureFailed 27 DependencyFailed 87 BuildFailed 547 InstallOk ghc-6.8.2 & Cabal-1.5.6 1 UnpackFailed 3 InstallFailed 26 ConfigureFailed 27 DependencyFailed 87 BuildFailed 541 InstallOk ghc-6.10.0 (5th Oct version) & Cabal-1.6.0.0 1 InstallFailed 21 ConfigureFailed 121 DependencyFailed 126 BuildFailed 422 InstallOk If we look at a breakdown of the builds that caused three or more knock-on failures (ie the causes of the 121 DependencyFailed above): 3 hxt-8.1.0 4 hsql-1.7 4 hsx-0.4.4 4 plugins-1.3 4 TypeCompose-0.5 6 arrows-0.4 24 hslogger-1.0.5 46 time-1.1.2.1 Hmm, time and hslogger are big ones there. Let's look at the individual package build logs. First time: Data/Time/Clock/CTimeval.hs:1:11: Warning: -ffi is deprecated: use -XForeignFunctionInterface or pragma {-# LANGUAGE ForeignFunctionInterface#-} instead <no location info>: Failing due to -Werror. NOOOOooooooooooooooooooo!!!!!! This is the reason that hackage now rejects the use of -Werror in released packages. It causes unnecessary breakage when new compilers add new warnings. Ok, lets look at hslogger: src/System/Log/Logger.hs:333:20: Couldn't match expected type `Maybe Logger' against inferred type `IO Logger' In a stmt of a 'do' expression: result <- Map.lookup lname newlt Ah ok, so that's the change in Map.lookup to return Maybe rather than in any monad. So that's an easy source code fix: result <- maybe (fail "Arrgh!") return (Map.lookup lname newlt) Note of course this will also work with the previous implementation of lookup. Duncan

On Fri, 2008-10-10 at 09:08 -0700, Duncan Coutts wrote:
Data/Time/Clock/CTimeval.hs:1:11: Warning: -ffi is deprecated: use -XForeignFunctionInterface or pragma {-# LANGUAGE ForeignFunctionInterface#-} instead
<no location info>: Failing due to -Werror.
NOOOOooooooooooooooooooo!!!!!!
This is the reason that hackage now rejects the use of -Werror in released packages. It causes unnecessary breakage when new compilers add new warnings.
Warnings in a build process should be fixed, not ignored (and, I would say, fixed by whoever introduced the warning or otherwise broke the build). Hackage, on the other hand, is right to reject -Werror in .cabal files, as there the build is really part of the install process and should be as lenient as possible. I pass --ghc-options="-Wall -Werror" to cabal in a Makefile in most of my projects, so that my development build process is strict. -- Ashley Yakeley

Sorry Ashley, I hope you didn't feel I was picking on you in particular. I realise it might have looked that way. On Fri, 2008-10-10 at 11:08 -0700, Ashley Yakeley wrote:
On Fri, 2008-10-10 at 09:08 -0700, Duncan Coutts wrote:
Failing due to -Werror.
NOOOOooooooooooooooooooo!!!!!!
This is the reason that hackage now rejects the use of -Werror in released packages. It causes unnecessary breakage when new compilers add new warnings.
Warnings in a build process should be fixed, not ignored (and, I would say, fixed by whoever introduced the warning or otherwise broke the build).
Yes indeed. So it's appropriate for development builds.
Hackage, on the other hand, is right to reject -Werror in .cabal files, as there the build is really part of the install process and should be as lenient as possible. I pass --ghc-options="-Wall -Werror" to cabal in a Makefile in most of my projects, so that my development build process is strict.
Right. Putting -Wall in the ghc-options in the .cabal file is fine too of course. Lots of packages do that. Duncan

Duncan Coutts wrote:
Ok, lets look at hslogger:
src/System/Log/Logger.hs:333:20: Couldn't match expected type `Maybe Logger' against inferred type `IO Logger' In a stmt of a 'do' expression: result <- Map.lookup lname newlt
Ah ok, so that's the change in Map.lookup to return Maybe rather than in any monad. So that's an easy source code fix:
result <- maybe (fail "Arrgh!") return (Map.lookup lname newlt)
There are actually more instances than this in the code, but I already have fixed it in my git tree. I guess it's time to make a release. -- John
Note of course this will also work with the previous implementation of lookup.
Duncan

On Fri, 2008-10-10 at 13:29 -0500, John Goerzen wrote:
Duncan Coutts wrote:
Ok, lets look at hslogger:
src/System/Log/Logger.hs:333:20: Couldn't match expected type `Maybe Logger' against inferred type `IO Logger' In a stmt of a 'do' expression: result <- Map.lookup lname newlt
Ah ok, so that's the change in Map.lookup to return Maybe rather than in any monad. So that's an easy source code fix:
result <- maybe (fail "Arrgh!") return (Map.lookup lname newlt)
There are actually more instances than this in the code, but I already have fixed it in my git tree. I guess it's time to make a release.
Yay! Between that and a bump for the time lib we'll probably have another ~50 packages building with 6.10. Duncan

Duncan Coutts wrote:
There are actually more instances than this in the code, but I already have fixed it in my git tree. I guess it's time to make a release.
Yay!
Between that and a bump for the time lib we'll probably have another ~50 packages building with 6.10.
And on that note, hslogger 1.0.6 is now in Hackage. -- John

jgoerzen:
Duncan Coutts wrote:
There are actually more instances than this in the code, but I already have fixed it in my git tree. I guess it's time to make a release.
Yay!
Between that and a bump for the time lib we'll probably have another ~50 packages building with 6.10.
And on that note, hslogger 1.0.6 is now in Hackage.
Great! I'll do a new hackage build test. -- Don
participants (4)
-
Ashley Yakeley
-
Don Stewart
-
Duncan Coutts
-
John Goerzen