Skip to content

Commit

Permalink
Temp commit
Browse files Browse the repository at this point in the history
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
  • Loading branch information
prabhu committed Jan 14, 2024
1 parent 3d2c1a7 commit 71dde31
Show file tree
Hide file tree
Showing 10 changed files with 1,033 additions and 805 deletions.
10 changes: 5 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name := "atom"
ThisBuild / organization := "io.appthreat"
ThisBuild / version := "2.0.0"
ThisBuild / version := "2.0.1"
ThisBuild / scalaVersion := "3.3.1"

val chenVersion = "2.0.0"
val chenVersion = "2.0.1"

lazy val atom = Projects.atom

Expand All @@ -12,10 +12,10 @@ val astGenVersion = "3.5.0"
libraryDependencies ++= Seq(
"com.github.pathikrit" %% "better-files" % "3.9.2",
"com.github.scopt" %% "scopt" % "4.1.0",
"org.apache.logging.log4j" % "log4j-core" % "2.22.0" % Optional,
"org.apache.logging.log4j" % "log4j-slf4j2-impl" % "2.22.0" % Optional,
"org.slf4j" % "slf4j-simple" % "2.0.11" % Optional,
"io.appthreat" %% "c2cpg" % Versions.chen excludeAll (
ExclusionRule(organization = "com.ibm.icu", name = "icu4j"),
ExclusionRule(organization = "org.jline", name = "jline"),
ExclusionRule(organization = "org.eclipse.platform", name = "org.eclipse.jface"),
ExclusionRule(organization = "org.eclipse.platform", name = "org.eclipse.jface.text")
),
Expand Down Expand Up @@ -181,5 +181,5 @@ credentials +=
"appthreat",
sys.env.getOrElse("GITHUB_TOKEN", "N/A")
)
graalVMNativeImageGraalVersion := Some("22")
//graalVMNativeImageGraalVersion := Some("22")
graalVMNativeImageOptions := Seq("-H:+UnlockExperimentalVMOptions", "--no-fallback")
7 changes: 1 addition & 6 deletions ci/native-image.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
#!/usr/bin/env bash
# bash ci/native-image.sh

echo "Applying Java 21 patch"
git apply --ignore-space-change --ignore-whitespace contrib/java21.patch
if [ $? != 0 ]; then
echo "Unable to patch the codebase correctly. Please file a bug report for atom."
fi
echo "About to build the native image. This would take a few minutes ..."
sbt clean stage scalafmt "GraalVMNativeImage / packageBin"
sbt "GraalVMNativeImage / packageBin"

if [ -f "target/graalvm-native-image/atom" ]; then
chmod +x target/graalvm-native-image/atom
Expand Down
2 changes: 1 addition & 1 deletion ci/trace-native-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# bash ci/trace-native-image.sh py <file path>
# bash ci/trace-native-image.sh c <file path>

sbt stage
sbt clean stage
./atom.sh -J-agentlib:native-image-agent=config-output-dir=src/main/resources/META-INF/native-image reachables -l $1 -o /tmp/app.atom -s /tmp/reachables.slices.json $2

# bash ci/native-image.sh
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"downloadUrl": "https://github.com/AppThreat/atom",
"issueTracker": "https://github.com/AppThreat/atom/issues",
"name": "atom",
"version": "2.0.0",
"version": "2.0.1",
"description": "Atom is a novel intermediate representation for next-generation code analysis.",
"applicationCategory": "code-analysis",
"keywords": [
Expand Down
2 changes: 0 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always

addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1")
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.16")
addSbtPlugin("io.shiftleft" % "sbt-overflowdb" % "2.29")
addSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.5.3")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.1.5")
addSbtPlugin("org.wartremover" % "sbt-wartremover" % "3.1.5")
22 changes: 0 additions & 22 deletions src/main/resources/META-INF/native-image/jni-config.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,6 @@
[
{
"name":"[Lcom.sun.management.internal.DiagnosticCommandArgumentInfo;"
},
{
"name":"[Lcom.sun.management.internal.DiagnosticCommandInfo;"
},
{
"name":"com.sun.management.internal.DiagnosticCommandArgumentInfo",
"methods":[{"name":"<init>","parameterTypes":["java.lang.String","java.lang.String","java.lang.String","java.lang.String","boolean","boolean","boolean","int"] }]
},
{
"name":"com.sun.management.internal.DiagnosticCommandInfo",
"methods":[{"name":"<init>","parameterTypes":["java.lang.String","java.lang.String","java.lang.String","java.lang.String","java.lang.String","java.lang.String","boolean","java.util.List"] }]
},
{
"name":"java.lang.Boolean",
"methods":[{"name":"getBoolean","parameterTypes":["java.lang.String"] }]
},
{
"name":"java.util.Arrays",
"methods":[{"name":"asList","parameterTypes":["java.lang.Object[]"] }]
},
{
"name":"sun.management.VMManagementImpl",
"fields":[{"name":"compTimeMonitoringSupport"}, {"name":"currentThreadCpuTimeSupport"}, {"name":"objectMonitorUsageSupport"}, {"name":"otherThreadCpuTimeSupport"}, {"name":"remoteDiagnosticCommandsSupport"}, {"name":"synchronizerUsageSupport"}, {"name":"threadAllocatedMemorySupport"}, {"name":"threadContentionMonitoringSupport"}]
}
]
Loading

0 comments on commit 71dde31

Please sign in to comment.