Skip to content

Commit

Permalink
Make the resolver error a bit more clear - references #156
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Sep 24, 2014
1 parent 1923bee commit 164815b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#### 0.3.0-alpha002 - 23.09.2014
#### 0.3.0-alpha003 - 23.09.2014
* New command: paket add [--interactive] - http://fsprojects.github.io/Paket/paket-add.html
* New command: paket simplify - http://fsprojects.github.io/Paket/paket-simplify.html
* New package resolver algorithm
Expand Down
20 changes: 13 additions & 7 deletions src/Paket/UpdateProcess.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,27 @@
module Paket.UpdateProcess

open Paket
open Paket.Logging
open System

let getResolvedPackagesOrFail resolution =
match resolution with
| Ok model -> model
| Conflict(closed,stillOpen) ->
traceErrorfn "Resolved:"
| Conflict(closed,stillOpen) ->

let errorText = ref ""

let addToError text = errorText := !errorText + Environment.NewLine + text

addToError "Error in resolution."
addToError " Resolved:"
for x in closed do
traceErrorfn " - %s %s" x.Name (x.VersionRange.ToString())
addToError <| sprintf " - %s %s" x.Name (x.VersionRange.ToString())

traceErrorfn "Still open:"
addToError " Still open:"
for x in stillOpen do
traceErrorfn " - %s %s" x.Name (x.VersionRange.ToString())
addToError <| sprintf " - %s %s" x.Name (x.VersionRange.ToString())

failwithf "Error in resolution."
failwith !errorText


/// Update command
Expand Down

0 comments on commit 164815b

Please sign in to comment.