Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

re-configure when the .cabal file changes #470

Closed
bos opened this issue May 24, 2012 · 2 comments
Closed

re-configure when the .cabal file changes #470

bos opened this issue May 24, 2012 · 2 comments

Comments

@bos
Copy link
Contributor

bos commented May 24, 2012

(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
Copy link
Contributor Author

bos commented May 24, 2012

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

See also #294, #309 and #518.

@bos
Copy link
Contributor Author

bos commented May 24, 2012

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

Wed Aug 25 14:11:06 BST 2010  Dmitry Astapov <[email protected]>
  * 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant