
Hello libr, i think it's appropriate place to complain about Cabal? situation: ghc 6.4.2 (2006.06.09) with built-in Cabal. i install package with the following dependencies: Build-Depends: base, ArrayRef==0.1, fps>=0.7, template-haskell there are ArrayRef 0.1 (hidden) and ArrayRef 0.1.1 (exposed) installed Cabal correctly selects ArrayRef 0.1 when building the lib. but on installation it makes the following trick: Registering Streams-0.2.2... Reading package info from ".installed-pkg-config" ... done. Warning: hiding the following packages to avoid conflict: ArrayRef-0.1.1 Streams-0.1.6 hiding old version of Stream library is correct, but why the hell it hides old ArrayRef library??? as the final result, both old and new ArrayRef libraries are hidden:
ghc-pkg list C:/Base/Compiler/ghc-6.4\package.conf: (ArrayRef-0.1), (ArrayRef-0.1.1), Cabal-1.1.4, GLUT-2.0, HGL-3.1, HUnit-1.1, OpenGL-2.0, QuickCheck-1.0, (Streams-0.1.6), Streams-0.2.2, Win32-1.0, base-1.0, (concurrent-1.0), (data-1.0), fgl-5.2, fps-0.7, haskell-src-1.0, haskell98-1.0, (hssource-1.0), (lang-1.0), mtl-1.0, (net-1.0), network-1.0, objectio-1.0, parsec-1.0, readline-1.0, rts-1.0, stm-1.0, template-haskell-1.0, (text-1.0), (util-1.0), (win32-1.0)
-- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com

On Wed, 2006-09-20 at 15:51 +0400, Bulat Ziganshin wrote:
Hello libr,
i think it's appropriate place to complain about Cabal?
Sure. (Or the cabal bug tracker or the cabal-devel list)
situation: ghc 6.4.2 (2006.06.09) with built-in Cabal. i install package with the following dependencies:
Build-Depends: base, ArrayRef==0.1, fps>=0.7, template-haskell
there are ArrayRef 0.1 (hidden) and ArrayRef 0.1.1 (exposed) installed
Cabal correctly selects ArrayRef 0.1 when building the lib. but on installation it makes the following trick:
Registering Streams-0.2.2... Reading package info from ".installed-pkg-config" ... done. Warning: hiding the following packages to avoid conflict: ArrayRef-0.1.1 Streams-0.1.6
hiding old version of Stream library is correct, but why the hell it hides old ArrayRef library??? as the final result, both old and new ArrayRef libraries are hidden:
It is ghc-pkg that does this hiding upon registration, not Cabal. Try it manually, you'll get the same behaviour. The reason is as ghc-pkg explains: that there would be duplicate modules exposed otherwise if Streams-0.2.2 and ArrayRef-0.1.1 were exposed at once. This is because Streams-0.2.2 is exposed and depends on arrayRef-0.1. With the recent relaxation in GHC's package/module name space system ghc-pkg might be able to do something different in this case. Try asking about it on the ghc-users list. Duncan

Duncan Coutts wrote:
On Wed, 2006-09-20 at 15:51 +0400, Bulat Ziganshin wrote:
Hello libr,
i think it's appropriate place to complain about Cabal?
Sure. (Or the cabal bug tracker or the cabal-devel list)
situation: ghc 6.4.2 (2006.06.09) with built-in Cabal. i install package with the following dependencies:
Build-Depends: base, ArrayRef==0.1, fps>=0.7, template-haskell
there are ArrayRef 0.1 (hidden) and ArrayRef 0.1.1 (exposed) installed
Cabal correctly selects ArrayRef 0.1 when building the lib. but on installation it makes the following trick:
Registering Streams-0.2.2... Reading package info from ".installed-pkg-config" ... done. Warning: hiding the following packages to avoid conflict: ArrayRef-0.1.1 Streams-0.1.6
hiding old version of Stream library is correct, but why the hell it hides old ArrayRef library??? as the final result, both old and new ArrayRef libraries are hidden:
It is ghc-pkg that does this hiding upon registration, not Cabal. Try it manually, you'll get the same behaviour.
The reason is as ghc-pkg explains: that there would be duplicate modules exposed otherwise if Streams-0.2.2 and ArrayRef-0.1.1 were exposed at once. This is because Streams-0.2.2 is exposed and depends on arrayRef-0.1.
With the recent relaxation in GHC's package/module name space system ghc-pkg might be able to do something different in this case. Try asking about it on the ghc-users list.
In GHC 6.6 I ripped out that bit of code from ghc-pkg, so it no longer does any automatic hiding on registration. This behaviour is I hope less obscure, as GHC now has the ability to use multiple packages containing the same module names. However, if you have multiple exposed packages that expose the same module, you still won't be able to import that module in Haskell code unless you explicitly -hide-package one of the clashing packages. The exception is when there are multiple versions of a package exposed: GHC does what you probably want in this case, and hides all but the most recent exposed version automatically. Cheers, Simon
participants (3)
-
Bulat Ziganshin
-
Duncan Coutts
-
Simon Marlow