-
Notifications
You must be signed in to change notification settings - Fork 696
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
New build exception handling #3416
Conversation
When executing the install plan, the various failures are supposed to be caught and put into the residual install plan. This adds the main cases for that, including the configure and build cases. Download is still not covered. This is a step towards better reporting of what failed when there are failures in deps etc.
Travis failure is due to stale |
@@ -0,0 +1,258 @@ | |||
module Main where | |||
|
|||
import Distribution.Client.DistDirLayout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will slow down build times on Travis. Would be nice if we could use an internal library in cabal-install.cabal
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't depend on all the cabal-install modules, but yes fair point. Once we feel we can rely on the named internal libs feature in Cabal then we could use it here.
Or we could add this to the unit-tests test exe and find some way to skip the slow integration tests.
Looks OK. |
Ahh yes, thanks. Will fix. |
@23Skidoo so I updated the script so it catches |
@dcoutts Sure, let's merge. |
Fails due to
|
Include cabal.project files too.
These integration tests, unlike the existing ones, don't call cabal as an external processes. Instead they use the cabal code directly. This makes it possible to conveniently test catching exceptions. Add a couple tests for exceptions in finding projects. There should be a lot more for the various phases of planning. Also add a couple tests for exceptions in the configure and build phases. These test the previous patch that improves the exception handling so that failures are added into the residual plan rather than just propagating immediately.
ceec812
to
40846f0
Compare
Some improvements to the exception handling during new-build, plus tests.
Yet TODO: better reporting, handling download exceptions. Covering more cases in tests. Still, it should be a strict improvement.