[Hackage] #128: cabal building broken libraries when module
list is not complete
Hackage
trac at galois.com
Wed Jun 25 10:30:44 EDT 2008
#128: cabal building broken libraries when module list is not complete
----------------------------------+-----------------------------------------
Reporter: m at tel.netbeisser.de | Owner:
Type: defect | Status: new
Priority: normal | Milestone: Cabal-2.0
Component: Cabal library | Version: 1.1.6
Severity: major | Resolution:
Keywords: | Difficulty: normal
Ghcversion: 6.6 | Platform:
----------------------------------+-----------------------------------------
Comment (by claus):
Replying to [comment:6 claus]:
> Replying to [comment:5 duncan]:
> > Sure it's a bug but it's a bug that depends on a huge new feature.
> > The problem is exactly that we're using the compiler's dependency
chasing. It can find modules that we did not know about which makes it
work at build time but then we miss things in the link phase.
> Btw, even while you're using the compiler's dependency chasing, doesn't
that tell you which modules it finds and uses (GHC does)?
simply adding `-v2` to `build` should give dependency info to `stdout`,
among other info, eg, for some mini-dummy package `p` that only imports
its own `Paths_p` we get:
{{{
$ runhaskell.exe Setup.hs build -v --ghc-options="-v2"
Creating dist\build (and its parents)
Creating dist\build\autogen (and its parents)
Preprocessing library p-0...
Building p-0...
Building library...
Creating dist\build (and its parents)
c:\ghc\ghc-6.9.20080514\bin\ghc.exe -v2 -package-name p-0 --make -hide-
all-packages -i -idist\build
-i. -idist\build\autogen -Idist\build -odir dist\build -hidir dist\build
-stubdir dist\build -packag
e base-3.0 -O P Paths_p
Glasgow Haskell Compiler, Version 6.9.20080514, for Haskell 98, stage 2
booted by GHC version 6.6.1
Using package config file: C:\ghc\ghc-6.9.20080514\package.conf
wired-in package ghc-prim mapped to ghc-prim-0.1
wired-in package integer mapped to integer-0.1
wired-in package base mapped to base-3.0
wired-in package rts mapped to rts-1.0
wired-in package haskell98 mapped to haskell98-1.0.1
wired-in package template-haskell mapped to template-haskell-2.2
wired-in package ndp not found.
*** Chasing dependencies:
Chasing modules from: P.hs,Paths_p
Stable obj: [P, Paths_p]
Stable BCO: []
Ready for upsweep
[NONREC
ModSummary {
ms_hs_date = Wed Jun 25 15:05:33 GMT Daylight Time 2008
ms_mod = p-0:Paths_p,
ms_imps = [System.Environment, Data.Version]
ms_srcimps = []
},
NONREC
ModSummary {
ms_hs_date = Tue Jun 24 15:00:42 GMT Daylight Time 2008
ms_mod = p-0:P,
ms_imps = [Paths_p]
ms_srcimps = []
}]
}}}
The `ms_imps` in the `ModSummary`s seem to give the basic dependency info
you're looking for. There's also a `--include-pkg-deps` option, but I
can't figure out how to make that make a difference:
http://www.haskell.org/ghc/docs/latest/html/users_guide/separate-
compilation.html#makefile-dependencies
--
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/128#comment:7>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects
More information about the cabal-devel
mailing list