@@ -2,9 +2,8 @@ package io.shiftleft.passes
22
33import com .google .protobuf .GeneratedMessageV3
44import io .shiftleft .SerializedCpg
5- import io .shiftleft .codepropertygraph .generated .Cpg
5+ import io .shiftleft .codepropertygraph .generated .{ Cpg , DiffGraphBuilder }
66import org .slf4j .{Logger , LoggerFactory , MDC }
7- import overflowdb .BatchedUpdate
87
98import java .util .function .{BiConsumer , Supplier }
109import scala .annotation .nowarn
@@ -19,11 +18,11 @@ import scala.util.{Failure, Success, Try}
1918abstract class CpgPass (cpg : Cpg , outName : String = " " , keyPool : Option [KeyPool ] = None )
2019 extends ForkJoinParallelCpgPass [AnyRef ](cpg, outName, keyPool) {
2120
22- def run (builder : overflowdb. BatchedUpdate . DiffGraphBuilder ): Unit
21+ def run (builder : DiffGraphBuilder ): Unit
2322
2423 final override def generateParts (): Array [? <: AnyRef ] = Array [AnyRef ](null )
2524
26- final override def runOnPart (builder : overflowdb. BatchedUpdate . DiffGraphBuilder , part : AnyRef ): Unit =
25+ final override def runOnPart (builder : DiffGraphBuilder , part : AnyRef ): Unit =
2726 run(builder)
2827
2928 override def isParallel : Boolean = false
@@ -109,7 +108,7 @@ abstract class ForkJoinParallelCpgPass[T <: AnyRef](
109108 * hierarchy.
110109 */
111110abstract class NewStyleCpgPassBase [T <: AnyRef ] extends CpgPassBase {
112- type DiffGraphBuilder = overflowdb. BatchedUpdate .DiffGraphBuilder
111+ type DiffGraphBuilder = io.shiftleft.codepropertygraph.generated .DiffGraphBuilder
113112 // generate Array of parts that can be processed in parallel
114113 def generateParts (): Array [? <: AnyRef ]
115114 // setup large data structures, acquire external resources
@@ -123,7 +122,7 @@ abstract class NewStyleCpgPassBase[T <: AnyRef] extends CpgPassBase {
123122
124123 override def createAndApply (): Unit = createApplySerializeAndStore(null )
125124
126- override def runWithBuilder (externalBuilder : BatchedUpdate . DiffGraphBuilder ): Int = {
125+ override def runWithBuilder (externalBuilder : DiffGraphBuilder ): Int = {
127126 try {
128127 init()
129128 val parts = generateParts()
@@ -185,12 +184,12 @@ trait CpgPassBase {
185184 * 1), where nParts is either the number of parallel parts, or the number of iterarator elements in case of legacy
186185 * passes. Includes init() and finish() logic.
187186 */
188- def runWithBuilder (builder : overflowdb. BatchedUpdate . DiffGraphBuilder ): Int
187+ def runWithBuilder (builder : DiffGraphBuilder ): Int
189188
190189 /** Wraps runWithBuilder with logging, and swallows raised exceptions. Use with caution -- API is unstable. A return
191190 * value of -1 indicates failure, otherwise the return value of runWithBuilder is passed through.
192191 */
193- def runWithBuilderLogged (builder : overflowdb. BatchedUpdate . DiffGraphBuilder ): Int = {
192+ def runWithBuilderLogged (builder : DiffGraphBuilder ): Int = {
194193 baseLogger.info(s " Start of pass: $name" )
195194 val nanoStart = System .nanoTime()
196195 val size0 = builder.size()
0 commit comments