-
Notifications
You must be signed in to change notification settings - Fork 224
"kpm restore" prints out the dependency graph after restore #450
Conversation
Looks a little chatty, maybe we should only show a few levels instead of the entire graph. 2 or so. |
See an example of npm install for an app that references express, as an example for
summary
so it shows 3 levels: 1st is listed, 2nd is indented under 1st, 3rd is parenthetical in 2nd |
@lodejard , npm can make 3rd level dependencies parenthetical in 2nd because npm packages have short names. If we do the same thing, we will get a super long line if a 2nd level dependency has several dependencies:
@lodejard @davidfowl , the latest commit prints at most 3 levels of dependencies. Please find an example output below:
|
Moreover, do we want |
Prefer the flat list, wrapping is fine |
@davidfowl @lodejard , thanks for the feedbacks. Here is the output of latest version:
|
Get rid of the empty parenthesis |
Just use a smaller font |
var dependencyNum = dependencies.Count(); | ||
for (int i = 0; i < dependencyNum; i++) | ||
{ | ||
var branchChar = '\u251C'; |
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'd suggest having some const
s for the Unicode characters and to give them some nice names (maybe look up what Unicode calls them? Though those names are probably unwieldy...).
@davidfowl @Eilon thanks for feedbacks. Improved in the latest commit. |
Beautiful. |
parent #447
npm is using archy (https://github.com/substack/node-archy/blob/master/index.js) to print the dependency graph and I mimic the logic in archy to implement this feature.
Note that we print dependency graph for each target framework. Here are the dependency graphs for
PackageManager
itself: