-
Notifications
You must be signed in to change notification settings - Fork 66
Add --verbose arg and show how package dependency is being solved #177
Conversation
+1, I like it. Only comment would be that adding a |
The UI seems a bit hard to read, but it's a start. 👍 |
+1 to @eeue56's comment - any time I get a failed dependency resolution, this is exactly what I want to know next, so might as well just tell me right away. 😄 |
Note: this PR breaks elm-make. This patch unbreaks elm-make. |
Why isn't this already merged, after more than 5 months? NOT the way to go... |
I think this PR points in a good direction (thank you!) but I do not think the approach can really give hints that will be helpful for resolving the issue. Recording the entire search has two major problems:
So ultimately, this would mean that users get very long dumps of information that do not make any constructive recommendations. It will just say "we tried everything" but for a really long time. I believe the search space is exponential (or at least very bad) in the number of constraints, so this gets out of control in any larger scenario. Towards hintsI used this PR as motivation for "better hints" though, and I just got done taking a first pass. Given this bad elm-package.json, the latest version produces the following message: Targeted suggestions that will help the user take the next steps. So I think the root motivation of this PR is coming through, but must take a different form to get to the heart of things. This approach also gives better hints for the particular scenario you showed in the original comment. I show it in #176 (comment) |
Motivation
Sometimes why elm-package is "unable to find a set of packages that will work with your constraints" is pretty nebulous. While not the most friendly interface, adding verbose logging will help diagnosing the problem by hands and eyes.
Changes
--verbose
argumentThis is my first Haskell code ever, so if something's not quite right, then it's most likely unintentional. Also I'm not familiar with the internals of Solver, so the way I phrased the logs may not be accurate.
Output sample
For
elm-package.json
found in #176: