Skip to content

Commit 1e75ccd

Browse files
authored
Remove logic around loadInverse (#1668)
1 parent 2b2b053 commit 1e75ccd

2 files changed

Lines changed: 0 additions & 24 deletions

File tree

codepropertygraph/src/main/scala/io/shiftleft/codepropertygraph/cpgloading/CpgLoader.scala

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ object CpgLoader {
5454
def addOverlays(overlayFilenames: Seq[String], cpg: Cpg): Unit =
5555
new CpgLoader().addOverlays(overlayFilenames, cpg)
5656

57-
def addDiffGraphs(diffGraphFilenames: Seq[String], cpg: Cpg): Unit =
58-
new CpgLoader().addDiffGraphs(diffGraphFilenames, cpg)
59-
6057
/** Determine whether the CPG is a legacy (proto) CPG
6158
*
6259
* @param filename
@@ -107,10 +104,4 @@ private class CpgLoader {
107104
}
108105
}
109106

110-
def addDiffGraphs(diffGraphFilenames: Seq[String], cpg: Cpg): Unit = {
111-
diffGraphFilenames.foreach { filename =>
112-
CpgOverlayLoader.loadInverse(filename, cpg)
113-
}
114-
}
115-
116107
}

codepropertygraph/src/main/scala/io/shiftleft/codepropertygraph/cpgloading/CpgOverlayLoader.scala

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,6 @@ private[cpgloading] object CpgOverlayLoader {
3232
.get
3333
}
3434

35-
def loadInverse(filename: String, baseCpg: Cpg): Unit = {
36-
ProtoCpgLoader
37-
.loadDiffGraphs(filename)
38-
.map { diffGraphs =>
39-
diffGraphs.toList.reverse.map { diffGraph =>
40-
DiffGraph.Applier.applyDiff(DiffGraph.fromProto(diffGraph, baseCpg), baseCpg)
41-
}
42-
}
43-
.recover { case e: IOException =>
44-
logger.error("Failed to load overlay from " + filename, e)
45-
Nil
46-
}
47-
.get
48-
}
49-
5035
}
5136

5237
/** Component to merge CPG overlay into existing graph

0 commit comments

Comments
 (0)