Skip to content

Commit

Permalink
kotlin2cpg: bump compiler version to 1.9.0 (#3059)
Browse files Browse the repository at this point in the history
the K2 compiler is still in heavy development, that is, we want the
latest version to be used for as long as it needs to come out of beta.
1.9.0 was released a few hours ago
  • Loading branch information
ursachec authored Jul 6, 2023
1 parent 508f043 commit 733716a
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion joern-cli/frontends/kotlin2cpg/build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name := "kotlin2cpg"

val kotlinVersion = "1.8.21"
val kotlinVersion = "1.9.0"

dependsOn(
Projects.dataflowengineoss,
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ class Kotlin2Cpg extends X2CpgFrontend[Config] with UsesService {
protected val logger = LoggerFactory.getLogger(getClass)
val parsingError = "KOTLIN2CPG_PARSING_ERROR"
private val defaultKotlinStdlibContentRootJarPaths = Seq(
DefaultContentRootJarPath("jars/kotlin-stdlib-1.8.21.jar", isResource = true),
DefaultContentRootJarPath("jars/kotlin-stdlib-common-1.8.21.jar", isResource = true),
DefaultContentRootJarPath("jars/kotlin-stdlib-jdk8-1.8.21.jar", isResource = true)
DefaultContentRootJarPath("jars/kotlin-stdlib-1.9.0.jar", isResource = true),
DefaultContentRootJarPath("jars/kotlin-stdlib-common-1.9.0.jar", isResource = true),
DefaultContentRootJarPath("jars/kotlin-stdlib-jdk8-1.9.0.jar", isResource = true)
)

def createCpg(config: Config): Try[Cpg] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ object CompilerAPI {
val config = new CompilerConfiguration()
config.put(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY, messageCollector)
forDirectories.foreach { p =>
config.add(CLIConfigurationKeys.CONTENT_ROOTS, new KotlinSourceRoot(p, true))
config.add(CLIConfigurationKeys.CONTENT_ROOTS, new KotlinSourceRoot(p, true, null))
}

val javaHome = File(System.getProperty("java.home"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ class CompilerAPITests extends AnyFreeSpec with Matchers {

"should not receive a compiler error message when the dependencies of the project have been provided" in {
val jarResources = Seq(
DefaultContentRootJarPath("jars/kotlin-stdlib-1.8.21.jar", isResource = true),
DefaultContentRootJarPath("jars/kotlin-stdlib-common-1.8.21.jar", isResource = true),
DefaultContentRootJarPath("jars/kotlin-stdlib-jdk8-1.8.21.jar", isResource = true)
DefaultContentRootJarPath("jars/kotlin-stdlib-1.9.0.jar", isResource = true),
DefaultContentRootJarPath("jars/kotlin-stdlib-common-1.9.0.jar", isResource = true),
DefaultContentRootJarPath("jars/kotlin-stdlib-jdk8-1.9.0.jar", isResource = true)
)

val defaultContentRootJarsDir = File(projectDependenciesPath)
Expand Down

0 comments on commit 733716a

Please sign in to comment.