On Tue, 2005-04-05 at 23:34 +0100, Simon Marlow wrote:
> > Well it turns out that we had another package installed that depends
> > on the util package (cabal-0.5 as it happens) and that package is
> > exposed by default. It seems that this implicitly exposes the util
> > package. 
> 
> This is the right behaviour, although I agree it's a little confusing.
> The util package has not been exposed as a result of being depended on
> by cabal-0.5, but GHC has correctly inferred that it is part of the
> program, and so its modules cannot clash with any others in the program.

But it's not part of the program. In our test program we do not import
any module from the dummy package (which is the exposed package that
depends on util).

Our example was compiling happy. happy does not import anything from
cabal-0.5 and yet it was hit by this problem. Unless we consider 'part
of the program' to be all modules in all exposed packages (and all
modules in 'efectively exposed' packages like util via the cabal-0.5
dep).

If this is not a bug, the only thing we can do is make sure we never
create an ebuild for anything that installs an exposed package that
depends on one of the old hslibs packages. Otherwise several other
unrelated programs will fail to build.

> The documentation does describe this (section 4.8.1):
> 
>   There must be no overlaps in the modules provided by all of the
>   exposed packages, and the packages they depend on, and so on.
> 
> it doesn't mention the modules of the program though.  Perhaps it
> should, I'm open to suggestions for better wording.

So is it all modules provided by exposed packages or all modules
included (directly or indirectly) in the program?

> It would be nice if the error message said something like "util-1.0 is
> included because it is a dependency of ...".

That would help. We were left wondering how on earth util was getting
included into the program.

> I'm surprised that you could use -ignore-package util, I would have
> expected that to cause an error due to the dependency from cabal to
> util.  That might be a bug - can you confirm?

Yes indeed. Until recently we compiled happy with -ignore-package util
to work around this issue. Our new solution is to declare cabal-0.5 to
be incompatible with GHC 6.4.

Duncan

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to