-
Notifications
You must be signed in to change notification settings - Fork 710
cabal test does not detect that cabal build needs to be re-run #585
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
Comments
(Imported comment by guest on 2009-09-29) I think this may be a symptom of a slightly more general issue. As a user of cabal-install it is not always obvious which commands depend on other commands. Also, I would imagine some users like the current behavior of cabal test, and perhaps ideally cabal could read my mind and magically behave in the way I prefer. So, if it turns out this is a controversial change, perhaps we could get an option in the cabal config to toggle this behavior? Thanks! |
(Imported comment by @dcoutts on 2009-09-29) I'm inclined not to do anything here until the test hook is replaced by something useful, see #215. At that point it becomes clear what needs to be rebuilt because we actually have accurate information about it. |
(Imported comment by @tibbe on 2009-09-29) We now have a test-suite section so this should be feasible to address. Thomas, what do you think? |
(Imported comment by @ttuegel on 2012-02-29) Replying to @tibbe: We now have a test-suite section so this should be feasible to address. Thomas, what do you think? We've discussed this before, and I think the conclusion we came to was that 'cabal test' should run 'cabal build' if necessary, but we should not change the behavior of './Setup test'. Is that still the consensus? I'm not sure what was meant by "it becomes clear what needs to be rebuild because we actually have accurate information about it." Maybe this is naive, but I think if we simply call 'cabal build' before running 'cabal test', it will only rebuild what needs rebuilding. That is, I think all the checks we need are in place already. Am I missing something? |
(Imported comment by @tibbe on 2012-03-01) Replying to @ttuegel: We've discussed this before, and I think the conclusion we came to was that 'cabal test' should run 'cabal build' if necessary, but we should not change the behavior of './Setup test'. Is that still the consensus? Sounds good to me. I'm not sure what was meant by "it becomes clear what needs to be rebuild because we actually have accurate information about it." Maybe this is naive, but I think if we simply call 'cabal build' before running 'cabal test', it will only rebuild what needs rebuilding. That is, I think all the checks we need are in place already. Am I missing something? Nope. Just run cabal build before. |
(Imported comment by @tibbe on 2012-03-01) Could you make sure cabal bench also implies cabal build while you're at it? |
(Imported comment by @ttuegel on 2012-03-02) Patch changing behavior of cabal tool to run 'cabal build' before 'cabal test' and 'cabal bench'. |
(Imported comment by @ttuegel on 2012-04-21) Even with the patch I just attached, 'cabal configure' needs to be run first, but I doubt we want to change that behavior. |
(Imported comment by @tibbe on 2012-04-21) Replying to @ttuegel: Even with the patch I just attached, 'cabal configure' needs to be run first, but I doubt we want to change that behavior. I think we do! We already run configure automatically before build in most cases. I think we should always do that. |
(Imported comment by @ttuegel on 2012-04-22) Replying to @tibbe: Replying to @ttuegel:That's a good point. I need to remake the patch for the new Git repo anyway; I'll make sure that's included.Even with the patch I just attached, 'cabal configure' needs to be run first, but I doubt we want to change that behavior. |
(Imported comment by @ttuegel on 2012-04-22) Replying to @tibbe: Replying to @ttuegel:OK, it's easy enough to configure and build before 'cabal test' or 'cabal benchmark'. Obviously, these commands have been updated to take the 'cabal configure' options, as well. I thought about installing dependencies, too, but decided against it: I don't think people expect 'cabal test' to install packages on their system, so it's probably not a good idea. Just checking, but is this the behavior you would expect, i.e., configure and build, but don't install missing dependencies?Even with the patch I just attached, 'cabal configure' needs to be run first, but I doubt we want to change that behavior. |
(Imported comment by @tibbe on 2012-04-25) Replying to @ttuegel: OK, it's easy enough to configure and build before 'cabal test' or 'cabal benchmark'. Obviously, these commands have been updated to take the 'cabal configure' options, as well. I thought about installing dependencies, too, but decided against it: I don't think people expect 'cabal test' to install packages on their system, so it's probably not a good idea. Just checking, but is this the behavior you would expect, i.e., configure and build, but don't install missing dependencies? I think it's a good compromise for now. I'd prefer if (and have argued for) cabal build/test/bench to "do what I mean." Until we all agree that they should install dependencies etc I think having cabal test imply cabal configure and cabal build is a good compromise for now. |
Fixed by #995. |
(Imported from Trac #592, reported by @kowey on 2009-09-29)
This is a frequently recurring source of confusion in the Darcs team.
A: Such and such test fails
B: Have you re-run cabal build?
A: Oh, no I haven't
First seen on http://bugs.darcs.net/issue1299
The text was updated successfully, but these errors were encountered: