-
Notifications
You must be signed in to change notification settings - Fork 842
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
Pretty printer + improved plan construction errors #2236
Conversation
Just (_, parents) -> map (\(pkgId, _) -> (packageIdentifierName pkgId, extendDepsPath pkgId dp)) parents | ||
|
||
data DepsPath = DepsPath Int Int [PackageIdentifier] | ||
deriving (Eq, Ord, Show) |
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.
I think this type could be improved with record syntax and/or a comment.
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.
Good point! Done
Awesome stuff! This will fix #1739 too! |
@@ -731,7 +749,8 @@ pprintExceptions exceptions stackYaml = | |||
vsep (map pprintExtra (Map.toList extras)) <> | |||
line <> | |||
line <> | |||
"You may also want to try the 'stack solver' command" <> line <> line | |||
"You may also want to try the 'stack solver' command" <> line <> line <> | |||
fromString (show parentMap) |
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.
The debug output here should be removed eventually.
Also, the line wrapping could be a bit cleaner IMO. Currently, readability at both 80 and 100 columns isn't that great. (Much better than before anyway, of course! :D) I'd prefer the output to be optimized for 80 columns but clean output at 100 columns would make me happy, too! ;) |
Pretty printer + improved plan construction errors
Sometimes when you select the wrong version of a package that a lot of things depend on, you can get gobs and gobs of output. For example, setting
containers-0.3.0.0
breaks pretty much every package in the build plan and you get hundreds of lines of output: https://gist.github.com/mgsloan/2a93bc5282f38d9b337e9571dbc8611aI've omitted info about which specific inter-package dependencies have failed. Instead, it tells you the root problem with color-coded info
The "needed due to" path gives the shortest path from a target to the package. Hopefully it's clear that this is not necessarily the only path (in this case, just one of many)