Files that are only used by cabal setup are not recompiled when they change between runs of 'cabal build' #601

Open
bos opened this Issue May 24, 2012 · 3 comments

Comments

Projects
None yet
1 participant
Contributor

bos commented May 24, 2012

(Imported from Trac #608, reported by guest on 2009-11-15)

Files that are only used by cabal setup are not recompiled when they change between runs of 'cabal build'.

Reproduction steps for the included cabal package:

  • Run 'cabal configure && cabal build && cabal test'
  • The test output should be "I helped with lots of stuff!"
  • Change the string in Distribution/Helper.hs to "I didn't help with "
  • Rerun 'cabal configure && cabal build && cabal test' -- the output should change to "I didn't help with lots of stuff!", but nothing recompiles and the output doesn't change.
Although the attached cabal package is minimal, I've observed this behavior with darcs's Distribution/ShellHarness.
Contributor

bos commented May 24, 2012

(Imported comment by guest on 2009-11-15)

Minimal cabal package that illustrates the problem

Contributor

bos commented May 24, 2012

(Imported comment by @dcoutts on 2009-11-15)

Specifically, it recompiles if Setup.hs changes but not if any of the things that Setup.hs imports change. This because Cabal itself does not track module dependencies and because we do not call ghc --make on it every single time.

Contributor

bos commented May 24, 2012

(Imported comment by @kosmikus on 2009-11-16)

Verified that this problem still exists. So it sounds like calling ghc --make on the setup script at least every time we configure would be a simple fix.

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