Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

re-configure when the .cabal file changes #470

Closed
bos opened this Issue · 2 comments

1 participant

@bos
Owner

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

From http://trevion.blogspot.com/2008/11/cabal-is-fine-piece-of-software.html:

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
“automation”.
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.

@bos
Owner

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

See also #294, #309 and #518.

@bos
Owner

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

Wed Aug 25 14:11:06 BST 2010  Dmitry Astapov <dastapov@gmail.com>
  * 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.