You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2020/01/16 00:26:01 UTC
[mynewt-newt] 02/02: Exclude `project.yml` as rev-depgraph node key
This is an automated email from the ASF dual-hosted git repository.
ccollins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newt.git
commit 83b9f570009b665f407032ff382746835847393d
Author: Christopher Collins <cc...@apache.org>
AuthorDate: Wed Jan 15 12:27:06 2020 -0800
Exclude `project.yml` as rev-depgraph node key
This commit changes the debug log output.
Nothing ever depends on `project.yml`, so don't include it as a node key
in reverse dependency graphs. This change removes some zero-information
lines from the debug output.
---
newt/deprepo/graph.go | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/newt/deprepo/graph.go b/newt/deprepo/graph.go
index e482562..557b2ce 100644
--- a/newt/deprepo/graph.go
+++ b/newt/deprepo/graph.go
@@ -192,11 +192,14 @@ func (dg DepGraph) Reverse() RevdepGraph {
for dependent, nodes := range dg {
for _, node := range nodes {
- rg[node.Name] = append(rg[node.Name], RevdepGraphNode{
- Name: dependent.Name,
- Ver: dependent.Ver,
- VerReqs: node.VerReqs,
- })
+ // Nothing depends on project.yml (""), so exclude it from the result.
+ if node.Name != "" {
+ rg[node.Name] = append(rg[node.Name], RevdepGraphNode{
+ Name: dependent.Name,
+ Ver: dependent.Ver,
+ VerReqs: node.VerReqs,
+ })
+ }
}
}