-
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 sometimes builds with the wrong flags. How to control its flags? #2182
Comments
What if instead of |
That seems to work! Well, rather, it fails properly ;-) -- the failures occur exactly where they should in the matrix. I hadn't tried this before because I thought rerunning cabal configure would necissitate recompiling, but it looks like it doesn't, so that is a good solution for us. |
No, |
Any idea why the extra |
Can I take a look at your build bot script? |
Sure, here is the line of code where we added the extra cabal configure. And the links earlier in this thread go to the Jenkins job for running that script. (It also should be possible to run |
Looks like this is caused by my fix to #1281. When you run A proper fix would be to stop using |
Well, it looks like it does "build" again, but that build is a noop (i.e. it uses the existing .o/.hi files...):
|
Which is strange, since if my analysis is correct this shouldn't happen. When I try to reproduce this on my machine, |
Oh wait a sec... it may well have done a full rebuild on mine too. If that version of cabal is doing a parallel build by default it wouldn't show the full output right? But it clearly ran the preprocessor because of that warning, so I assume it had to do a full compile then. So we are consistent then. Anyway, I don't mind if I have to build twice to test... as long as it works ;-). |
Yes, I considered that, but if it was doing a parallel build, it wouldn't have printed "Preprocessing"/"Linking" messages. |
Can we close this as there is a working solution? |
I think we can close this, since the configure command sets the correct flags, and new-build should help with the more general problem of statefulness across commands. |
We typically run Jenkins testing jobs with large matrices of configuration options.
We have been assuming that the following series of commands would guarantee that
A
andB
only get built once, and only with-fmyflag
(BTW, I don't know if there is any such "algebra" of command sequences that carry guarantees! But it would help to have "cabal laws", because I currently have no idea what the "semantics" of cabal test is.)
Unfortunately, it seems that cabal test is sometimes causing a recompile of the packages. When it does that the package seems like it gets built without the right flags.
-fmyflag
tocabal test
? Well, it doesn't support flag arguments!--run-tests
. Two reasons:--show-details=always
, but as far as I can tell we cannot get that throughcabal install
.So install doesn't take arguments meant for test and test doesn't take arguments meant for cabal. But these different modes call eachother! Fixing our problem could be accomplished either by fixing these argument limitations or guaranteeing that cabal test won't reinstall.
This is tangentially related to tickets: #1647, #2058, #2075, #2176
The text was updated successfully, but these errors were encountered: