Hi list,

I've got a number of modules in a project set up like this:

project
|-- foo
|-- bar
|-- baz
`-- sandbox

where 'foo', 'bar' and 'baz' are modules which depend on one another, and 'sandbox' is a sandbox. Before building from scratch, I do a $(cabal sandbox init --sandbox=../sandbox) in each of the module folders.

If I run $(cabal install ./foo ./bar ./baz) from the projects/ directory, everything is happy. However, if I reconfigure one of the sub-modules with different flags, it fails with missing dependencies:

# in foo/
$ cabal build
Package has never been configured. Configuring with default flags. If this
fails, please run configure manually.
# module builds correctly

$ cabal configure --enable-tests
Resolving dependencies...
Configuring foo-0.1...

$ cabal build

dist/setup/setup.hs:13:8:
    Could not find module ‘System.FilePath.Glob’
    Perhaps you meant
      System.FilePath (from filepath-1.3.0.2)
      System.FilePath.Posix (from filepath-1.3.0.2)
    Use -v to see a list of the files searched for.

Glob is installed in the sandbox.

I've tried pointing to the sandbox config file manually with both $(cabal --sandbox-config-file=project/foo/cabal.sandbox.config) and $(cabal --sandbox-config-file=project/cabal.sandbox.config) with the same result. Cabal insists that Glob isn't installed until I nuke the foo/dist directory and start over.

I figure there's some flag I need to pass to `cabal configure` that I'm missing, but I can't figure out what it is. Anybody have any hints?

Cheers,
Alex