[Haskell-cafe] cabal build command and package versions

Nicolas Frisby nicolas.frisby at gmail.com
Wed Aug 20 14:53:07 EDT 2008


I have a question about cabal's behavior for the build command. When
using the build command on a cabalized project, any version changes
for installed packages go unnoticed - the necessary modules in the
project are not re-compiled. If however, you run the configure command
(though the .cabal file for the project has not changed) and then the
build command, the appropriate modules (and only the appropriate
modules) are re-compiled.

Not knowing that the configure command is necessary to detect changes
in package that the current project depends on and proceeding only
with the build command has led to BusErrors and GHC incurring the
impossible in my exploration.

Is there a reason that the build command does not check the packages
for version changes? It seems fair to expect package-sensitivity of
the process that determines if modules need to be re-compiled. This
process, I think, is part of the build command and not the configure
command.

Here's an example scenario:

 - Imagine package Q depends on package P.

 - We "runhaskell Setup.hs clean/configure/build/install" them both,
from scratch, at version 0.

 - Then we change package P (by, say, introducing new fields to a
constructor that Q cases over), bump its version to 1, and "runhaskell
Setup.hs clean/configure/build/install" on it.

 - If we now "runhaskell build" on package Q, nothing is re-compiled,
though a package dependency has changed. "runhaskell Setup.hs build"
does not notice this.

 - However, if we "runhaskell configure/build" on package Q, then the
(necessary) modules are re-compiled.

Thanks for your time.


More information about the Haskell-Cafe mailing list