-
Notifications
You must be signed in to change notification settings - Fork 701
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
cabal test sucks #2058
Comments
/cc @ttuegel |
Thank you for taking the time to report these! I think most people don't bother with so many documentation bugs. Each of these deserves it's own ticket, so I'm going to split them up later and we can use this thread as a checklist. Right now I'm just going to leave some notes below. Also, you should know that (2) has an undocumented fix (see below).
|
Thanks. Do we avoid running preprocessors when there is definitely no need for them? I personally care a lot about fixed costs for compilation (instantaneous for me) so if there are things we can do to speed this up that would be great. I can submit doc patches for some of these, but since I'm not a committer and they seem small, it might be easier for you to just fix them directly. |
@ezyang |
@ezyang you're in the collaborators group, so feel free to push doc fixes directly to the repo. Thomas addressed most of your points, so I will just add whatever extra tidbits I have:
|
@ezyang In response to your question about preprocessors, Cabal always runs them. Cabal doesn't keep track of source dependencies between the modules in a package, so it has no way of knowing if sources need to be re-preprocessed or not. The only thing we can do is re-run everything and check if GHC wants to rebuild anything. |
@ttuegel I think that we do at least check whether the target is newer than the source. Or do we? |
@23Skidoo Yes, you're right. It's still needlessly slow because we have to search the filesystem for all the modules that could be used. Even if we've built it, we don't know which modules were actually involved in compilation. But what I was actually thinking of is module autogeneration. We check the autogenerated modules by regenerating them and comparing the contents. This is probably silly, because they shouldn't change unless the LBI changes. |
I stand corrected: for a do-nothing build, GHC accounts for 94% of the time. Another 5% of runtime is spent in the |
We now have separate issues for the problems enumerated in this ticket, so I will close this one. |
How does it suck? Let me count the ways:
--show-details=always
. It always waits until the test executable is done running before printing the output.cabal build test-name
)--help
. The help text doesn't give any advice on how to do this.--test-option
is really nonsense when there are multiple test suites, since you really wanted to feed separate options to each test suite.-v
, which reports that Cabal is just running the relevant commandThe text was updated successfully, but these errors were encountered: