Skip to content

Commit

Permalink
Updated joern, cpg, and re-used x2cpg API (#337)
Browse files Browse the repository at this point in the history
* Updated joern, cpg, and re-used x2cpg API

This is a rather large change as we have to update joern which brings in a lot of new stuff.

FILE.content and offset calculation is NOT part of this PR.

* More dep updates

* Update build.sbt

* Update build.sbt

* Update build.sbt

* Update build.sbt
  • Loading branch information
max-leuthaeuser authored Jun 3, 2024
1 parent 62ef84f commit 6c2c3a5
Show file tree
Hide file tree
Showing 50 changed files with 1,010 additions and 1,353 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
java-version: '11'
cache: 'sbt'
- name: Compile and run tests
run: sbt clean +test
run: sbt test
formatting:
runs-on: ubuntu-22.04
steps:
Expand All @@ -34,6 +34,6 @@ jobs:
java-version: '11'
cache: 'sbt'
- name: Check formatting
run: sbt scalafmtCheck test:scalafmtCheck
run: sbt scalafmtCheck Test/scalafmtCheck
- run: echo "Previous step failed because code is not formatted. Run 'sbt scalafmt'"
if: ${{ failure() }}
11 changes: 6 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
val cpgVersion = "1.6.11"
val joernVersion = "2.0.335"
val cpgVersion = "1.6.13"
val joernVersion = "2.0.392"

val gitCommitString = SettingKey[String]("gitSha")

Expand Down Expand Up @@ -27,10 +27,11 @@ lazy val commonSettings = Seq(
"io.shiftleft" %% "codepropertygraph" % cpgVersion,
"io.joern" %% "x2cpg" % joernVersion,
"com.github.scopt" %% "scopt" % "4.1.0",
"org.graalvm.js" % "js" % "22.3.4",
"com.fasterxml.jackson.core" % "jackson-databind" % "2.15.3",
// do not update to 23.x as this requires JDK >= 19
"org.graalvm.js" % "js" % "22.3.5",
"com.fasterxml.jackson.core" % "jackson-databind" % "2.17.1",
"com.atlassian.sourcemap" % "sourcemap" % "2.0.0",
"commons-io" % "commons-io" % "2.13.0",
"commons-io" % "commons-io" % "2.16.1",
"org.slf4j" % "slf4j-api" % "2.0.7",
"org.apache.logging.log4j" % "log4j-slf4j2-impl" % "2.20.0" % Optional,
"org.apache.logging.log4j" % "log4j-core" % "2.20.0" % Optional,
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.16")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0")
addSbtPlugin("io.shiftleft" % "sbt-ci-release-early" % "2.0.27")
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.12.0")
742 changes: 331 additions & 411 deletions src/main/scala/io/shiftleft/js2cpg/astcreation/AstCreator.scala

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import io.shiftleft.js2cpg.datastructures.OrderTracker
import overflowdb.BatchedUpdate.DiffGraphBuilder
import org.slf4j.LoggerFactory

class AstEdgeBuilder(private val diffGraph: DiffGraphBuilder) {
trait AstEdgeBuilder { this: AstCreator =>

private val logger = LoggerFactory.getLogger(getClass)

Expand Down
Loading

0 comments on commit 6c2c3a5

Please sign in to comment.