re-configure when the .cabal file changes #470

bos opened this Issue May 24, 2012 · 2 comments

1 participant


(Imported from Trac #477, reported by @dcoutts on 2009-01-24)


One nice thing about Cabal is that it really helps you
appreciate the different parts of the build process. For
instance, suppose that I change my cabal metadata file, and
then attempt to build my project, for instance by saying
runghc Setup.hs build
Cabal will helpfully reply:
Setup.hs: interpreter.cabal has been changed, please re-configure.
Notice how Cabal has helpfully here noticed that there’s work
to be done, and not done it. I found that this really helped
me appreciate the details of the build, rather than
unhelpfully hiding those details behind some veneer of
We can and should do this. It is annoying.

The solution is to save the configure flags that the user gave originally and to use them again to re-configure. This could be a Read/Show style file like we have for the LocalBuildInfo or it could be a readable file like the cabal config file. A format and parser derived from the set of command line arguments.


(Imported comment by @dcoutts on 2009-01-24)

See also #294, #309 and #518.


(Imported comment by @dcoutts on 2009-03-09)

Wed Aug 25 14:11:06 BST 2010  Dmitry Astapov <>
  * Auto-reconfiguration when .cabal is newer than setup-config
  This patch adds "ConfigFlags" to the "LocalBuildInfo" and reuses them to
  perform "configureAction" when .cabal file is changed. This has
  the same effect as re-running "configure" with the most recent used
  set of options, which should be the sensible thing to do.
  Closes #294, #477, #309 and #518.
@bos bos closed this May 24, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment