From af84a5e088ddf176de611b397adcf2b49fa8a450 Mon Sep 17 00:00:00 2001 From: Michael Pollmeier Date: Tue, 27 Aug 2024 08:28:24 +0200 Subject: [PATCH 1/8] upgrade deps (#1784) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index cbaf5733a..0bb9bfe39 100644 --- a/build.sbt +++ b/build.sbt @@ -1,7 +1,7 @@ name := "codepropertygraph" // parsed by project/Versions.scala, updated by updateDependencies.sh -val flatgraphVersion = "0.0.86" +val flatgraphVersion = "0.0.87" inThisBuild( List( From 8f975f853c056f3b8d0d119f9b1e8c367ea5a753 Mon Sep 17 00:00:00 2001 From: maltek <1694194+maltek@users.noreply.github.com> Date: Thu, 12 Sep 2024 11:32:13 +0200 Subject: [PATCH 2/8] update flatgraph (#1785) also make updateDependencies.sh compatible with non-GNU sed variants --- build.sbt | 2 +- updateDependencies.sh | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index 0bb9bfe39..4756cd411 100644 --- a/build.sbt +++ b/build.sbt @@ -1,7 +1,7 @@ name := "codepropertygraph" // parsed by project/Versions.scala, updated by updateDependencies.sh -val flatgraphVersion = "0.0.87" +val flatgraphVersion = "0.0.88" inThisBuild( List( diff --git a/updateDependencies.sh b/updateDependencies.sh index f5c02c42b..f0f988f7b 100755 --- a/updateDependencies.sh +++ b/updateDependencies.sh @@ -9,6 +9,16 @@ check_installed() { fi } +function sedi() { + if sed --version 2> /dev/null | grep -q 'GNU' ; then + # GNU sed does not like a second argument for -i + sed -i "$@" + else + # but macOS (FreeBSD) sed needs it + sed -i '' "$@" + fi +} + check_installed curl # check if xmllint is installed @@ -57,13 +67,13 @@ function update { if [ "$NON_INTERACTIVE_OPTION" == "--non-interactive" ] then echo "non-interactive mode, auto-updating $NAME: $OLD_VERSION -> $VERSION" - sed -i "s/$SEARCH/$REPLACE/" build.sbt + sedi "s/$SEARCH/$REPLACE/" build.sbt else echo "update $NAME: $OLD_VERSION -> $VERSION? [Y/n]" read ANSWER if [ -z $ANSWER ] || [ "y" == $ANSWER ] || [ "Y" == $ANSWER ] then - sed -i "s/$SEARCH/$REPLACE/" build.sbt + sedi "s/$SEARCH/$REPLACE/" build.sbt fi fi fi From 25e82b1681d717176c43dd15c0a33007fe0b0bab Mon Sep 17 00:00:00 2001 From: bbrehm Date: Mon, 16 Sep 2024 19:12:32 +0200 Subject: [PATCH 3/8] bump flatgraph, properly log transitive changes (#1786) --- build.sbt | 2 +- .../src/main/scala/io/shiftleft/passes/CpgPass.scala | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/build.sbt b/build.sbt index 4756cd411..986af0300 100644 --- a/build.sbt +++ b/build.sbt @@ -1,7 +1,7 @@ name := "codepropertygraph" // parsed by project/Versions.scala, updated by updateDependencies.sh -val flatgraphVersion = "0.0.88" +val flatgraphVersion = "0.0.89" inThisBuild( List( diff --git a/codepropertygraph/src/main/scala/io/shiftleft/passes/CpgPass.scala b/codepropertygraph/src/main/scala/io/shiftleft/passes/CpgPass.scala index 42228d6cd..58509d6f3 100644 --- a/codepropertygraph/src/main/scala/io/shiftleft/passes/CpgPass.scala +++ b/codepropertygraph/src/main/scala/io/shiftleft/passes/CpgPass.scala @@ -75,12 +75,7 @@ abstract class ForkJoinParallelCpgPass[T <: AnyRef](cpg: Cpg, @nowarn outName: S nanosBuilt = System.nanoTime() nDiff = diffGraph.size - // TODO how about `nDiffT` which seems to count the number of modifications.. - // nDiffT = overflowdb.BatchedUpdate - // .applyDiff(cpg.graph, diffGraph, null) - // .transitiveModifications() - - flatgraph.DiffGraphApplier.applyDiff(cpg.graph, diffGraph) + nDiffT = flatgraph.DiffGraphApplier.applyDiff(cpg.graph, diffGraph) } catch { case exc: Exception => baseLogger.error(s"Pass ${name} failed", exc) From 9d3a2e2a539fdcd8d205272ab88cf15a52d92ee7 Mon Sep 17 00:00:00 2001 From: Michael Pollmeier Date: Thu, 17 Oct 2024 11:18:47 +0200 Subject: [PATCH 4/8] upgrade deps (#1787) --- build.sbt | 2 +- project/build.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 986af0300..30e900949 100644 --- a/build.sbt +++ b/build.sbt @@ -1,7 +1,7 @@ name := "codepropertygraph" // parsed by project/Versions.scala, updated by updateDependencies.sh -val flatgraphVersion = "0.0.89" +val flatgraphVersion = "0.0.90" inThisBuild( List( diff --git a/project/build.properties b/project/build.properties index ee4c672cd..0b699c305 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.10.1 +sbt.version=1.10.2 From 4044a85e07848b249a6fb1df2fde99e0afccb371 Mon Sep 17 00:00:00 2001 From: Michael Pollmeier Date: Tue, 5 Nov 2024 15:19:33 +0100 Subject: [PATCH 5/8] upgrade deps (#1790) --- build.sbt | 4 ++-- .../generated/neighboraccessors/Binding.scala | 6 ++++-- .../generated/neighboraccessors/Block.scala | 6 ++++-- .../generated/neighboraccessors/Call.scala | 3 ++- .../generated/neighboraccessors/FieldIdentifier.scala | 9 ++++++--- .../generated/neighboraccessors/Literal.scala | 3 ++- .../generated/neighboraccessors/Member.scala | 3 ++- .../generated/neighboraccessors/Method.scala | 6 ++++-- .../generated/neighboraccessors/MethodParameterIn.scala | 6 ++++-- .../generated/neighboraccessors/MethodParameterOut.scala | 3 ++- .../generated/neighboraccessors/MethodRef.scala | 6 ++++-- .../generated/neighboraccessors/MethodReturn.scala | 3 ++- .../generated/neighboraccessors/Modifier.scala | 6 ++++-- .../generated/neighboraccessors/Return.scala | 3 ++- .../generated/neighboraccessors/TypeParameter.scala | 3 ++- project/build.properties | 2 +- project/plugins.sbt | 6 +++--- 17 files changed, 50 insertions(+), 28 deletions(-) diff --git a/build.sbt b/build.sbt index 30e900949..433c8abb4 100644 --- a/build.sbt +++ b/build.sbt @@ -1,12 +1,12 @@ name := "codepropertygraph" // parsed by project/Versions.scala, updated by updateDependencies.sh -val flatgraphVersion = "0.0.90" +val flatgraphVersion = "0.0.97" inThisBuild( List( organization := "io.shiftleft", - scalaVersion := "3.4.2", + scalaVersion := "3.4.3", resolvers ++= Seq(Resolver.mavenLocal, "Sonatype OSS" at "https://oss.sonatype.org/content/repositories/public"), packageDoc / publishArtifact := true, packageSrc / publishArtifact := true, diff --git a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Binding.scala b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Binding.scala index 5634b1c79..710922305 100644 --- a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Binding.scala +++ b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Binding.scala @@ -16,8 +16,9 @@ final class AccessNeighborsForBinding(val node: nodes.Binding) extends AnyVal { try { refOut.collectAll[nodes.Method].next() } catch { case e: java.util.NoSuchElementException => + val nodeInfo = String.format("id=%d, (seq=%d)", node.id, node.seq) throw new flatgraph.SchemaViolationException( - "OUT edge with label REF to an adjacent METHOD is mandatory, but not defined for this BINDING node with seq=" + node.seq, + "OUT edge with label REF to an adjacent METHOD is mandatory, but not defined for this BINDING node with " + nodeInfo, e ) } @@ -34,8 +35,9 @@ final class AccessNeighborsForBinding(val node: nodes.Binding) extends AnyVal { try { bindsIn.collectAll[nodes.TypeDecl].next() } catch { case e: java.util.NoSuchElementException => + val nodeInfo = String.format("id=%d, (seq=%d)", node.id, node.seq) throw new flatgraph.SchemaViolationException( - "IN edge with label BINDS to an adjacent TYPE_DECL is mandatory, but not defined for this BINDING node with seq=" + node.seq, + "IN edge with label BINDS to an adjacent TYPE_DECL is mandatory, but not defined for this BINDING node with " + nodeInfo, e ) } diff --git a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Block.scala b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Block.scala index f88110eac..63e3bd591 100644 --- a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Block.scala +++ b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Block.scala @@ -11,8 +11,9 @@ final class AccessNeighborsForBlock(val node: nodes.Block) extends AnyVal { try { astIn.collectAll[nodes.Block].next() } catch { case e: java.util.NoSuchElementException => + val nodeInfo = String.format("id=%d, (seq=%d)", node.id, node.seq) throw new flatgraph.SchemaViolationException( - "IN edge with label AST to an adjacent BLOCK is mandatory, but not defined for this BLOCK node with seq=" + node.seq, + "IN edge with label AST to an adjacent BLOCK is mandatory, but not defined for this BLOCK node with " + nodeInfo, e ) } @@ -268,8 +269,9 @@ final class AccessNeighborsForBlock(val node: nodes.Block) extends AnyVal { try { astIn.collectAll[nodes.Method].next() } catch { case e: java.util.NoSuchElementException => + val nodeInfo = String.format("id=%d, (seq=%d)", node.id, node.seq) throw new flatgraph.SchemaViolationException( - "IN edge with label AST to an adjacent METHOD is mandatory, but not defined for this BLOCK node with seq=" + node.seq, + "IN edge with label AST to an adjacent METHOD is mandatory, but not defined for this BLOCK node with " + nodeInfo, e ) } diff --git a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Call.scala b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Call.scala index 090aabd50..33e10e97a 100644 --- a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Call.scala +++ b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Call.scala @@ -119,8 +119,9 @@ final class AccessNeighborsForCall(val node: nodes.Call) extends AnyVal { try { astIn.collectAll[nodes.ControlStructure].next() } catch { case e: java.util.NoSuchElementException => + val nodeInfo = String.format("id=%d, (seq=%d)", node.id, node.seq) throw new flatgraph.SchemaViolationException( - "IN edge with label AST to an adjacent CONTROL_STRUCTURE is mandatory, but not defined for this CALL node with seq=" + node.seq, + "IN edge with label AST to an adjacent CONTROL_STRUCTURE is mandatory, but not defined for this CALL node with " + nodeInfo, e ) } diff --git a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/FieldIdentifier.scala b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/FieldIdentifier.scala index d0d9f5a72..574497884 100644 --- a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/FieldIdentifier.scala +++ b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/FieldIdentifier.scala @@ -35,8 +35,9 @@ final class AccessNeighborsForFieldIdentifier(val node: nodes.FieldIdentifier) e try { argumentIn.collectAll[nodes.Call].next() } catch { case e: java.util.NoSuchElementException => + val nodeInfo = String.format("id=%d, (seq=%d)", node.id, node.seq) throw new flatgraph.SchemaViolationException( - "IN edge with label ARGUMENT to an adjacent CALL is mandatory, but not defined for this FIELD_IDENTIFIER node with seq=" + node.seq, + "IN edge with label ARGUMENT to an adjacent CALL is mandatory, but not defined for this FIELD_IDENTIFIER node with " + nodeInfo, e ) } @@ -48,8 +49,9 @@ final class AccessNeighborsForFieldIdentifier(val node: nodes.FieldIdentifier) e try { astIn.collectAll[nodes.Call].next() } catch { case e: java.util.NoSuchElementException => + val nodeInfo = String.format("id=%d, (seq=%d)", node.id, node.seq) throw new flatgraph.SchemaViolationException( - "IN edge with label AST to an adjacent CALL is mandatory, but not defined for this FIELD_IDENTIFIER node with seq=" + node.seq, + "IN edge with label AST to an adjacent CALL is mandatory, but not defined for this FIELD_IDENTIFIER node with " + nodeInfo, e ) } @@ -69,8 +71,9 @@ final class AccessNeighborsForFieldIdentifier(val node: nodes.FieldIdentifier) e try { cfgOut.collectAll[nodes.Call].next() } catch { case e: java.util.NoSuchElementException => + val nodeInfo = String.format("id=%d, (seq=%d)", node.id, node.seq) throw new flatgraph.SchemaViolationException( - "OUT edge with label CFG to an adjacent CALL is mandatory, but not defined for this FIELD_IDENTIFIER node with seq=" + node.seq, + "OUT edge with label CFG to an adjacent CALL is mandatory, but not defined for this FIELD_IDENTIFIER node with " + nodeInfo, e ) } diff --git a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Literal.scala b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Literal.scala index 32946b36a..84b733e1e 100644 --- a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Literal.scala +++ b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Literal.scala @@ -99,8 +99,9 @@ final class AccessNeighborsForLiteral(val node: nodes.Literal) extends AnyVal { try { astIn.collectAll[nodes.ControlStructure].next() } catch { case e: java.util.NoSuchElementException => + val nodeInfo = String.format("id=%d, (seq=%d)", node.id, node.seq) throw new flatgraph.SchemaViolationException( - "IN edge with label AST to an adjacent CONTROL_STRUCTURE is mandatory, but not defined for this LITERAL node with seq=" + node.seq, + "IN edge with label AST to an adjacent CONTROL_STRUCTURE is mandatory, but not defined for this LITERAL node with " + nodeInfo, e ) } diff --git a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Member.scala b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Member.scala index d8a69ce2b..2ae74df83 100644 --- a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Member.scala +++ b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Member.scala @@ -36,8 +36,9 @@ final class AccessNeighborsForMember(val node: nodes.Member) extends AnyVal { try { astIn.collectAll[nodes.TypeDecl].next() } catch { case e: java.util.NoSuchElementException => + val nodeInfo = String.format("id=%d, (seq=%d)", node.id, node.seq) throw new flatgraph.SchemaViolationException( - "IN edge with label AST to an adjacent TYPE_DECL is mandatory, but not defined for this MEMBER node with seq=" + node.seq, + "IN edge with label AST to an adjacent TYPE_DECL is mandatory, but not defined for this MEMBER node with " + nodeInfo, e ) } diff --git a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Method.scala b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Method.scala index 932490b5a..e76fc91e5 100644 --- a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Method.scala +++ b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Method.scala @@ -257,8 +257,9 @@ final class AccessNeighborsForMethod(val node: nodes.Method) extends AnyVal { try { astOut.collectAll[nodes.MethodReturn].next() } catch { case e: java.util.NoSuchElementException => + val nodeInfo = String.format("id=%d, (seq=%d)", node.id, node.seq) throw new flatgraph.SchemaViolationException( - "OUT edge with label AST to an adjacent METHOD_RETURN is mandatory, but not defined for this METHOD node with seq=" + node.seq, + "OUT edge with label AST to an adjacent METHOD_RETURN is mandatory, but not defined for this METHOD node with " + nodeInfo, e ) } @@ -293,8 +294,9 @@ final class AccessNeighborsForMethod(val node: nodes.Method) extends AnyVal { try { astOut.collectAll[nodes.Block].next() } catch { case e: java.util.NoSuchElementException => + val nodeInfo = String.format("id=%d, (seq=%d)", node.id, node.seq) throw new flatgraph.SchemaViolationException( - "OUT edge with label AST to an adjacent BLOCK is mandatory, but not defined for this METHOD node with seq=" + node.seq, + "OUT edge with label AST to an adjacent BLOCK is mandatory, but not defined for this METHOD node with " + nodeInfo, e ) } diff --git a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/MethodParameterIn.scala b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/MethodParameterIn.scala index 921e39a38..1cacc10c3 100644 --- a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/MethodParameterIn.scala +++ b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/MethodParameterIn.scala @@ -87,8 +87,9 @@ final class AccessNeighborsForMethodParameterIn(val node: nodes.MethodParameterI try { astIn.collectAll[nodes.Method].next() } catch { case e: java.util.NoSuchElementException => + val nodeInfo = String.format("id=%d, (seq=%d)", node.id, node.seq) throw new flatgraph.SchemaViolationException( - "IN edge with label AST to an adjacent METHOD is mandatory, but not defined for this METHOD_PARAMETER_IN node with seq=" + node.seq, + "IN edge with label AST to an adjacent METHOD is mandatory, but not defined for this METHOD_PARAMETER_IN node with " + nodeInfo, e ) } @@ -105,8 +106,9 @@ final class AccessNeighborsForMethodParameterIn(val node: nodes.MethodParameterI try { evalTypeOut.collectAll[nodes.Type].next() } catch { case e: java.util.NoSuchElementException => + val nodeInfo = String.format("id=%d, (seq=%d)", node.id, node.seq) throw new flatgraph.SchemaViolationException( - "OUT edge with label EVAL_TYPE to an adjacent TYPE is mandatory, but not defined for this METHOD_PARAMETER_IN node with seq=" + node.seq, + "OUT edge with label EVAL_TYPE to an adjacent TYPE is mandatory, but not defined for this METHOD_PARAMETER_IN node with " + nodeInfo, e ) } diff --git a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/MethodParameterOut.scala b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/MethodParameterOut.scala index 4f384adc6..919ef30a1 100644 --- a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/MethodParameterOut.scala +++ b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/MethodParameterOut.scala @@ -49,8 +49,9 @@ final class AccessNeighborsForMethodParameterOut(val node: nodes.MethodParameter try { astIn.collectAll[nodes.Method].next() } catch { case e: java.util.NoSuchElementException => + val nodeInfo = String.format("id=%d, (seq=%d)", node.id, node.seq) throw new flatgraph.SchemaViolationException( - "IN edge with label AST to an adjacent METHOD is mandatory, but not defined for this METHOD_PARAMETER_OUT node with seq=" + node.seq, + "IN edge with label AST to an adjacent METHOD is mandatory, but not defined for this METHOD_PARAMETER_OUT node with " + nodeInfo, e ) } diff --git a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/MethodRef.scala b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/MethodRef.scala index 3f02cef0b..7f9dd5c51 100644 --- a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/MethodRef.scala +++ b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/MethodRef.scala @@ -99,8 +99,9 @@ final class AccessNeighborsForMethodRef(val node: nodes.MethodRef) extends AnyVa try { astIn.collectAll[nodes.ControlStructure].next() } catch { case e: java.util.NoSuchElementException => + val nodeInfo = String.format("id=%d, (seq=%d)", node.id, node.seq) throw new flatgraph.SchemaViolationException( - "IN edge with label AST to an adjacent CONTROL_STRUCTURE is mandatory, but not defined for this METHOD_REF node with seq=" + node.seq, + "IN edge with label AST to an adjacent CONTROL_STRUCTURE is mandatory, but not defined for this METHOD_REF node with " + nodeInfo, e ) } @@ -449,8 +450,9 @@ final class AccessNeighborsForMethodRef(val node: nodes.MethodRef) extends AnyVa try { refOut.collectAll[nodes.Method].next() } catch { case e: java.util.NoSuchElementException => + val nodeInfo = String.format("id=%d, (seq=%d)", node.id, node.seq) throw new flatgraph.SchemaViolationException( - "OUT edge with label REF to an adjacent METHOD is mandatory, but not defined for this METHOD_REF node with seq=" + node.seq, + "OUT edge with label REF to an adjacent METHOD is mandatory, but not defined for this METHOD_REF node with " + nodeInfo, e ) } diff --git a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/MethodReturn.scala b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/MethodReturn.scala index df4d2d43c..28476e63a 100644 --- a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/MethodReturn.scala +++ b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/MethodReturn.scala @@ -97,8 +97,9 @@ final class AccessNeighborsForMethodReturn(val node: nodes.MethodReturn) extends try { astIn.collectAll[nodes.Method].next() } catch { case e: java.util.NoSuchElementException => + val nodeInfo = String.format("id=%d, (seq=%d)", node.id, node.seq) throw new flatgraph.SchemaViolationException( - "IN edge with label AST to an adjacent METHOD is mandatory, but not defined for this METHOD_RETURN node with seq=" + node.seq, + "IN edge with label AST to an adjacent METHOD is mandatory, but not defined for this METHOD_RETURN node with " + nodeInfo, e ) } diff --git a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Modifier.scala b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Modifier.scala index bf0cf4046..926a6b3af 100644 --- a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Modifier.scala +++ b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Modifier.scala @@ -19,8 +19,9 @@ final class AccessNeighborsForModifier(val node: nodes.Modifier) extends AnyVal try { astIn.collectAll[nodes.Method].next() } catch { case e: java.util.NoSuchElementException => + val nodeInfo = String.format("id=%d, (seq=%d)", node.id, node.seq) throw new flatgraph.SchemaViolationException( - "IN edge with label AST to an adjacent METHOD is mandatory, but not defined for this MODIFIER node with seq=" + node.seq, + "IN edge with label AST to an adjacent METHOD is mandatory, but not defined for this MODIFIER node with " + nodeInfo, e ) } @@ -32,8 +33,9 @@ final class AccessNeighborsForModifier(val node: nodes.Modifier) extends AnyVal try { astIn.collectAll[nodes.TypeDecl].next() } catch { case e: java.util.NoSuchElementException => + val nodeInfo = String.format("id=%d, (seq=%d)", node.id, node.seq) throw new flatgraph.SchemaViolationException( - "IN edge with label AST to an adjacent TYPE_DECL is mandatory, but not defined for this MODIFIER node with seq=" + node.seq, + "IN edge with label AST to an adjacent TYPE_DECL is mandatory, but not defined for this MODIFIER node with " + nodeInfo, e ) } diff --git a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Return.scala b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Return.scala index 58a3a79d5..7a58913dc 100644 --- a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Return.scala +++ b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Return.scala @@ -311,8 +311,9 @@ final class AccessNeighborsForReturn(val node: nodes.Return) extends AnyVal { try { cfgOut.collectAll[nodes.MethodReturn].next() } catch { case e: java.util.NoSuchElementException => + val nodeInfo = String.format("id=%d, (seq=%d)", node.id, node.seq) throw new flatgraph.SchemaViolationException( - "OUT edge with label CFG to an adjacent METHOD_RETURN is mandatory, but not defined for this RETURN node with seq=" + node.seq, + "OUT edge with label CFG to an adjacent METHOD_RETURN is mandatory, but not defined for this RETURN node with " + nodeInfo, e ) } diff --git a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/TypeParameter.scala b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/TypeParameter.scala index 1b1b7adc7..8caffc569 100644 --- a/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/TypeParameter.scala +++ b/domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/TypeParameter.scala @@ -11,8 +11,9 @@ final class AccessNeighborsForTypeParameter(val node: nodes.TypeParameter) exten try { astIn.collectAll[nodes.Method].next() } catch { case e: java.util.NoSuchElementException => + val nodeInfo = String.format("id=%d, (seq=%d)", node.id, node.seq) throw new flatgraph.SchemaViolationException( - "IN edge with label AST to an adjacent METHOD is mandatory, but not defined for this TYPE_PARAMETER node with seq=" + node.seq, + "IN edge with label AST to an adjacent METHOD is mandatory, but not defined for this TYPE_PARAMETER node with " + nodeInfo, e ) } diff --git a/project/build.properties b/project/build.properties index 0b699c305..09feeeed5 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.10.2 +sbt.version=1.10.4 diff --git a/project/plugins.sbt b/project/plugins.sbt index 89b523b44..45ec859f9 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,7 +1,7 @@ addSbtPlugin("com.github.sbt" % "sbt-protobuf" % "0.7.1") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6") addSbtPlugin("com.github.sbt" % "sbt-findbugs" % "2.0.0") -addSbtPlugin("io.shiftleft" % "sbt-ci-release-early" % "2.0.18") -addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1") -addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.5") +addSbtPlugin("io.shiftleft" % "sbt-ci-release-early" % "2.0.48") +addSbtPlugin("com.github.sbt" % "sbt-dynver" % "5.1.0") +addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.10.4") addSbtPlugin("io.joern" % "sbt-flatgraph" % Versions.flatgraph) From 7dbc1711e480657d501ac34cf10d5c143a5fdcf8 Mon Sep 17 00:00:00 2001 From: Michael Pollmeier Date: Thu, 7 Nov 2024 09:34:21 +0100 Subject: [PATCH 6/8] upgrade deps (#1791) --- build.sbt | 2 +- project/build.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 433c8abb4..9f911ab66 100644 --- a/build.sbt +++ b/build.sbt @@ -1,7 +1,7 @@ name := "codepropertygraph" // parsed by project/Versions.scala, updated by updateDependencies.sh -val flatgraphVersion = "0.0.97" +val flatgraphVersion = "0.0.99" inThisBuild( List( diff --git a/project/build.properties b/project/build.properties index 09feeeed5..db1723b08 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.10.4 +sbt.version=1.10.5 From 3e49ed19e4c7a46f9f9b6e827afde628303ca736 Mon Sep 17 00:00:00 2001 From: Michael Pollmeier Date: Wed, 11 Dec 2024 16:56:30 +0100 Subject: [PATCH 7/8] upgrade deps, scala 3.5.2 (#1793) --- build.sbt | 4 ++-- project/build.properties | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index 9f911ab66..b4fe642e3 100644 --- a/build.sbt +++ b/build.sbt @@ -1,12 +1,12 @@ name := "codepropertygraph" // parsed by project/Versions.scala, updated by updateDependencies.sh -val flatgraphVersion = "0.0.99" +val flatgraphVersion = "0.1.1" inThisBuild( List( organization := "io.shiftleft", - scalaVersion := "3.4.3", + scalaVersion := "3.5.2", resolvers ++= Seq(Resolver.mavenLocal, "Sonatype OSS" at "https://oss.sonatype.org/content/repositories/public"), packageDoc / publishArtifact := true, packageSrc / publishArtifact := true, diff --git a/project/build.properties b/project/build.properties index db1723b08..e88a0d817 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.10.5 +sbt.version=1.10.6 From 9ef1ccbe4ca3531c3a63eabf0e3a3489e7d111b5 Mon Sep 17 00:00:00 2001 From: Michael Pollmeier Date: Mon, 16 Dec 2024 16:37:49 +0100 Subject: [PATCH 8/8] upgrade deps (#1795) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index b4fe642e3..218d9f658 100644 --- a/build.sbt +++ b/build.sbt @@ -1,7 +1,7 @@ name := "codepropertygraph" // parsed by project/Versions.scala, updated by updateDependencies.sh -val flatgraphVersion = "0.1.1" +val flatgraphVersion = "0.1.2" inThisBuild( List(