Cabal package name patch

Hi, Simon's recent changes to the package system have the effect that cabal-built packages cannot be used. Example error (from lambdabot, using fps that was previously built using cabal): scripts/BotPP.hs:20:0: Failed to load interface for `Data.ByteString.Char8': Bad interface file: /opt/ghc/lib/fps-0.7/ghc-6.5/Data/ByteString/Char8.hi Something is amiss; requested module fps-0.7:Data.ByteString.Char8 differs from name found in the interface file fps:Data.ByteString.Char8 The attached patch fixes this in Cabal by passing the full package name (including version) to the -package-name option. I expect that it breaks on older ghc versions, and thus should not be applied to the official darcs repository. But I hope it's still useful for someone while the underlying issue is resolved. (Maybe ghc shouldn't be unhappy about this in the first place?) regards, Bertram

Thanks Bertram. Simon: is this definitely what we will need for GHC 6.6? If so we can make Cabal pass it depending on the GHC version. Duncan On Sun, 2006-07-30 at 07:20 +0200, Bertram Felgenhauer wrote:
Simon's recent changes to the package system have the effect that cabal-built packages cannot be used. Example error (from lambdabot, using fps that was previously built using cabal):
scripts/BotPP.hs:20:0: Failed to load interface for `Data.ByteString.Char8': Bad interface file: /opt/ghc/lib/fps-0.7/ghc-6.5/Data/ByteString/Char8.hi Something is amiss; requested module fps-0.7:Data.ByteString.Char8 differs from name found in the interface file fps:Data.ByteString.Char8
The attached patch fixes this in Cabal by passing the full package name (including version) to the -package-name option. I expect that it breaks on older ghc versions, and thus should not be applied to the official darcs repository. But I hope it's still useful for someone while the underlying issue is resolved. (Maybe ghc shouldn't be unhappy about this in the first place?)

Simon Marlow
Duncan Coutts wrote:
Simon: is this definitely what we will need for GHC 6.6?
If so we can make Cabal pass it depending on the GHC version.
My apologies, I had already fixed this but forgot to push. Now pushed.
Bertram, it seems that you can read Simon's mind. You two should pair program ;) Sorry for the patches not going in right away. Please keep up the great work! We need more folks like you working to make Cabal better in these important ways. Thanks! peace, isaac
participants (4)
-
Bertram Felgenhauer
-
Duncan Coutts
-
Isaac Jones
-
Simon Marlow