You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2019/02/12 11:13:39 UTC

[GitHub] utzig commented on a change in pull request #266: `newt target dump` command

utzig commented on a change in pull request #266: `newt target dump` command 
URL: https://github.com/apache/mynewt-newt/pull/266#discussion_r255907421
 
 

 ##########
 File path: newt/builder/depgraph.go
 ##########
 @@ -92,58 +91,86 @@ func revdepGraph(rs *resolve.ResolveSet) (DepGraph, error) {
 		return nil, err
 	}
 
-	revGm := graphMap{}
-	for parent, children := range graph {
-		// Make sure each node exists in the reverse graph.  This step is
-		// necessary for packages that have no dependers.
-		graphMapEnsure(revGm, parent)
-
-		// Add nodes for packages with with dependers.
-		for _, child := range children {
-			rParent := child.Rpkg
-			rChild := *child
-			rChild.Rpkg = parent
-			graphMapAdd(revGm, rParent, &rChild)
+	rgraph := DepGraph{}
+	for parent, entries := range graph {
+		// Ensure parent not is present in graph, even if no one depends on it.
 
 Review comment:
   Yoda comment style!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services