Skip to content
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

Add solver failure reporting to cabal-install #2008

Closed
wants to merge 2 commits into from
Closed

Add solver failure reporting to cabal-install #2008

wants to merge 2 commits into from

Conversation

lambda-fairy
Copy link
Contributor

This patch adds build reporting for dependency solver failures. It is motivated by Hackage, where such failures would leave no indication of what went wrong.

To simplify implementation, only targets with an exact name and version are reported. This includes e.g. hello-1.0, but not hello > 1.0 or hello. This is good enough for Hackage, as we specify packages exactly anyway.

The feature is guarded behind a flag (--report-planning-failure), as most users don't need it.

@tibbe
Copy link
Member

tibbe commented Jul 22, 2014

Could you give an example of what this would output and how it's different from running e.g. cabal install -v3? Thanks!

@lambda-fairy
Copy link
Contributor Author

@tibbe Sure!

If we give cabal-install an impossible set of constraints, such as:

cabal install hello-1.0 --constraint='base < 4' --constraint='base > 4' --build-summary=summary.txt --report-planning-failure

Then summary.txt will be populated with the following:

package: hello-1.0
os: linux
arch: x86_64
compiler: ghc-7.6.3
client: cabal-install-1.21.0.0
install-outcome: PlanningFailed
docs-outcome: NotTried
tests-outcome: NotTried

I'm not sure what -v3 has to do with this patch, as it doesn't affect what is written to the console.

@tibbe
Copy link
Member

tibbe commented Jul 23, 2014

👍

@dcoutts does this make sense to you?

@lambda-fairy
Copy link
Contributor Author

I'm taking a different approach to this, so closing for now.

@lambda-fairy lambda-fairy deleted the report-solver-failure branch October 21, 2014 07:36
@lambda-fairy lambda-fairy restored the report-solver-failure branch October 21, 2014 07:36
@lambda-fairy lambda-fairy deleted the report-solver-failure branch October 21, 2014 07:36
@lambda-fairy lambda-fairy restored the report-solver-failure branch October 21, 2014 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants