Skip to content

Commit

Permalink
drop joern-generated domain classes (#190)
Browse files Browse the repository at this point in the history
now that we have generic sample schemas, we'll see the effects of
changing the codegen straight away, and the process is much simpler
because the (re-) generation of code is automated. Also, the schemas are
much smaller which is good for reviewing.
  • Loading branch information
mpollmeier authored May 3, 2024
1 parent 9eef887 commit d93d87e
Show file tree
Hide file tree
Showing 109 changed files with 3 additions and 77,721 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
target
/project/project/
/codescience-generated/src/main/scala
/cpg.bin
/cpg.bin.tmp
/cpg.fg
Expand Down
9 changes: 0 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1797,15 +1797,6 @@ The runtime for counting all edges with 110 ns/node is a bit faster than odbv1 1
It is still a disaster and completely unacceptable. We'll see how this fares with a real
generated schema (as opposed to an ad-hoc schema infered from the graph data).

# Generating domain classes
joern domain (open source): regenerate using `./generateDomainClasses.sh`. The classes are checked into [joern-generated/src/main/scala/generated](joern-generated/src/main/scala/generated)

codescience domain (closed source, qwiet.ai internal): regenerate using `./generateDomainClassesCodescience.sh`. The classes are not checked into this repository.

N.b. there are many debates about whether to check generated code into repositories.
In this specific case, it is essential to be able to talk about the generated code,
and track its changes over time.

# FAQ

## What JDK does flatgraph support?
Expand Down
28 changes: 3 additions & 25 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -129,39 +129,17 @@ lazy val testSchemasDomainClasses = project
publish / skip := true
)

/** temporarily we still want to keep the generated files for the cpg domain in here,
* in order to be able to quickly see the differences in the generated files if we
* change the codegen
* n.b. relies on a manually published version of cpg-schema from https://github.com/ShiftLeftSecurity/codepropertygraph/tree/michael/flatgraph
*/
lazy val domainClassesGeneratorJoern = project
.in(file("domain-classes-generator-joern"))
.dependsOn(domainClassesGenerator_3)
.settings(
name := "domain-classes-generator-joern",
scalaVersion := scala3,
publish / skip := true,
libraryDependencies += "io.shiftleft" %% "codepropertygraph-schema" % "1.6.6+21-c6774ab5"
)

lazy val joernGenerated = project
.in(file("joern-generated"))
.dependsOn(core)
.settings(
name := "joern-generated",
publish / skip := true
)

// currently relies on a self-published version of codepropertygraph and joern based on the respective `michael/flatgraph` branches
lazy val benchmarks = project
.in(file("benchmarks"))
.dependsOn(joernGenerated)
.enablePlugins(JavaAppPackaging, JmhPlugin)
.settings(
name := "benchmarks",
//Jmh / compile := (Jmh / compile)
//Jmh / run := (Jmh / run).dependsOn(Jmh / compile).evaluated
libraryDependencies ++= Seq(
"io.joern" %% "semanticcpg" % "2.0.157",
// TODO upgrade to released version
"io.joern" %% "semanticcpg" % "2.0.350+18-f76162b1",
"com.jerolba" % "jmnemohistosyne" % "0.2.3",
"org.openjdk.jol" % "jol-core" % "0.17",
"org.slf4j" % "slf4j-simple" % slf4jVersion % Optional,
Expand Down
19 changes: 0 additions & 19 deletions domain-classes-generator-joern/src/main/scala/Main.scala

This file was deleted.

3 changes: 0 additions & 3 deletions generateDomainClasses.sh

This file was deleted.

This file was deleted.

Loading

0 comments on commit d93d87e

Please sign in to comment.