Skip to content

Commit

Permalink
Dependency Housekeeping: Removed circe, jackson & Organised Versi…
Browse files Browse the repository at this point in the history
…ons (joernio#4472)

Joern has **a lot** of dependencies, and I've found `meta-build` out of sync with some `build.sbt` files specifying the same dependencies.

Also, `Versions.scala` is used haphazardly and is inconsistent. This change congregates all versions there, so we can see all versions of dependencies in Joern.

This all started by wondering why we have `jackson-databind`, `ujson`, and `circe` to deserialize JSON, so I removed `circe` and `jackson-databind` while keeping `ujson`. In any-case, this organizes dependencies and paves the way for removing unused ones.

Note, some code in `jssrc2cpg` (@max-leuthaeuser) and `gosrc2cpg` (@pandurangpatil) were modified for the migration to deserialize with `ujson` instead of the existing libraries.
  • Loading branch information
DavidBakerEffendi authored Apr 19, 2024
1 parent bb4732e commit eb57f60
Show file tree
Hide file tree
Showing 23 changed files with 245 additions and 386 deletions.
8 changes: 4 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ lazy val aggregatedProjects: Seq[ProjectReference] = Seq(
)

ThisBuild / libraryDependencies ++= Seq(
"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
"org.slf4j" % "slf4j-api" % Versions.slf4j,
"org.apache.logging.log4j" % "log4j-slf4j2-impl" % Versions.log4j % Optional,
"org.apache.logging.log4j" % "log4j-core" % Versions.log4j % Optional
// `Optional` means "not transitive", but still included in "stage/lib"
)

Expand Down Expand Up @@ -110,6 +110,6 @@ publish / skip := true // don't publish the root project
// Avoids running root tasks on the benchmarks project
lazy val root = project
.in(file("."))
.aggregate(aggregatedProjects*)
.aggregate(aggregatedProjects *)

ThisBuild / Test / packageBin / publishArtifact := true
24 changes: 7 additions & 17 deletions console/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@ name := "console"

enablePlugins(JavaAppPackaging)

val ScoptVersion = "4.1.0"
val CaskVersion = "0.9.2"
val CirceVersion = "0.14.6"
val ZeroturnaroundVersion = "1.17"
val OsLibVersion = "0.9.3"
val PprintVersion = "0.8.1"
val CommonsLangVersion = "3.14.0"

dependsOn(
Projects.semanticcpg,
Projects.macros,
Expand All @@ -25,15 +17,13 @@ dependsOn(
libraryDependencies ++= Seq(
"io.shiftleft" %% "codepropertygraph" % Versions.cpg,
"com.michaelpollmeier" %% "scala-repl-pp-server" % Versions.scalaReplPP,
"com.github.scopt" %% "scopt" % ScoptVersion,
"org.typelevel" %% "cats-effect" % Versions.cats,
"io.circe" %% "circe-generic" % CirceVersion,
"io.circe" %% "circe-parser" % CirceVersion,
"org.zeroturnaround" % "zt-zip" % ZeroturnaroundVersion,
"com.lihaoyi" %% "os-lib" % OsLibVersion,
"com.lihaoyi" %% "pprint" % PprintVersion,
"com.lihaoyi" %% "cask" % CaskVersion,
"org.apache.commons" % "commons-lang3" % CommonsLangVersion,
"com.github.scopt" %% "scopt" % Versions.scopt,
"org.typelevel" %% "cats-effect" % Versions.catsEffect,
"org.zeroturnaround" % "zt-zip" % Versions.zeroTurnaround,
"com.lihaoyi" %% "os-lib" % Versions.osLib,
"com.lihaoyi" %% "pprint" % Versions.pPrint,
"com.lihaoyi" %% "cask" % Versions.cask,
"org.apache.commons" % "commons-lang3" % Versions.commonsLang,
"org.scalatest" %% "scalatest" % Versions.scalatest % Test
)

Expand Down
7 changes: 3 additions & 4 deletions dataflowengineoss/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ dependsOn(Projects.semanticcpg, Projects.x2cpg % "compile->compile;test->test")
libraryDependencies ++= Seq(
"org.antlr" % "antlr4" % Versions.antlr,
"org.antlr" % "antlr4-runtime" % Versions.antlr,
"io.circe" %% "circe-core" % Versions.circe,
"io.circe" %% "circe-generic" % Versions.circe,
"io.circe" %% "circe-parser" % Versions.circe,
"com.lihaoyi" %% "upickle" % Versions.upickle,
"com.lihaoyi" %% "ujson" % Versions.upickle,
"org.scalatest" %% "scalatest" % Versions.scalatest % Test,
"org.scala-lang.modules" %% "scala-parallel-collections" % "1.0.4"
"org.scala-lang.modules" %% "scala-parallel-collections" % Versions.scalaParallel
)

enablePlugins(Antlr4Plugin)
Expand Down
Loading

0 comments on commit eb57f60

Please sign in to comment.