Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,14 @@ so do familiarize yourself with the following guidelines.

## Environment requirements

* JDK >= 11 referred to by the `JAVA_HOME` environment variable.
* JDK >= 21 referred to by the `JAVA_HOME` environment variable.

* Note, any version above 11 should work in theory, but JDK 11 is the only version we test with,
* Note, any version above 21 should work in theory, but JDK 21 is the only version we test with,
so it is the recommended version.

* JDK == 11 referred to by the `JDK_11_0` environment variable or `gradle.properties`/`local.properties`.
* This is used for testing our compiler plugins.

* We recommend using [IntelliJ IDEA](https://www.jetbrains.com/idea/download/) as the IDE. This
has the best support for Kotlin, compiler plugins, Gradle, and [Kotlin Notebook](https://kotlinlang.org/docs/kotlin-notebook-overview.html) of course.

Expand Down
12 changes: 2 additions & 10 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,8 @@ fun String.findVersion(): Version {

// these names of outdated dependencies will not show up in the table output
val dependencyUpdateExclusions = listOf(
// TODO Requires more work to be updated to 1.7.0+, https://github.com/Kotlin/dataframe/issues/594
libs.plugins.kover.get().pluginId,
// TODO 5.8.0 is not possible due to https://github.com/Kotlin/dataframe/issues/595
libs.kotestAssertions.get().name,
// Can't be updated to 7.4.0+ due to Java 8 compatibility
libs.android.gradle.api.get().group,
// Directly dependent on the Gradle version
"org.gradle.kotlin.kotlin-dsl",
// Can't be updated to 2.1.0+ due to Java 8 compatibility
libs.plugins.simpleGit.get().pluginId,
)

// run `./gradlew dependencyUpdates` to check for updates
Expand Down Expand Up @@ -139,7 +131,7 @@ tasks.named<DependencyUpdatesTask>("dependencyUpdates").configure {
}
}

kotlin.jvmToolchain(11)
kotlin.jvmToolchain(21)

allprojects {
tasks.withType<KotlinCompile> {
Expand All @@ -165,7 +157,7 @@ allprojects {
}

// set the java toolchain version to 11 for all subprojects for CI stability
extensions.findByType<KotlinJvmProjectExtension>()?.jvmToolchain(11)
extensions.findByType<KotlinJvmProjectExtension>()?.jvmToolchain(21)

// Attempts to configure buildConfig for each sub-project that uses it
try {
Expand Down
8 changes: 8 additions & 0 deletions core/api/core.api
Original file line number Diff line number Diff line change
Expand Up @@ -4742,6 +4742,10 @@ public final class org/jetbrains/kotlinx/dataframe/columns/ColumnPath : java/uti
public fun add (Ljava/lang/String;)Z
public fun addAll (ILjava/util/Collection;)Z
public fun addAll (Ljava/util/Collection;)Z
public synthetic fun addFirst (Ljava/lang/Object;)V
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, why it was added

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure either, probably because it extends List

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm.. It seems that target jdk is now Java 21 too: https://openjdk.org/jeps/431 and not 11 as we intend. Try Xjdk-release=11 in compileKotlin freeCompilerArgs

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure actually, do you think jvmToolChain overrides

tasks.withType<KotlinCompile> {
    compilerOptions {
        jvmTarget = JvmTarget.JVM_11
    }
}

tasks.withType<JavaCompile> {
    sourceCompatibility = JavaVersion.VERSION_11.toString()
    targetCompatibility = JavaVersion.VERSION_11.toString()
}

?

It could also be that apiDump simply runs with jvm 21 because it's a gradle plugin. I'll test this

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

@koperagen koperagen Mar 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://kotlinlang.org/docs/compiler-reference.html#jvm-target-version
JVM target only seems to affect bytecode. jdk release limits API too. I think binary validator is correct here and our library compiled against newer JDK API, while targeting JVM 11 bytecode

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see, but if the target jvm is 11, then it's okay to compile it against a newer version, right? Having the target at 11 allows our users to set their projects to 11 and DF still works

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we need to set jdk release to 11 and toolchain to 21

Copy link
Collaborator Author

@Jolanrensen Jolanrensen Mar 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think release and target overlap. I'll set it, but I think setting the target and sourceCompatibility does the same.
Edit: actually, I think the apiDump now works correctly :)

public fun addFirst (Ljava/lang/String;)V
public synthetic fun addLast (Ljava/lang/Object;)V
public fun addLast (Ljava/lang/String;)V
public fun clear ()V
public final fun component1 ()Ljava/util/List;
public final fun contains (Ljava/lang/Object;)Z
Expand Down Expand Up @@ -4785,6 +4789,10 @@ public final class org/jetbrains/kotlinx/dataframe/columns/ColumnPath : java/uti
public fun remove (I)Ljava/lang/String;
public fun remove (Ljava/lang/Object;)Z
public fun removeAll (Ljava/util/Collection;)Z
public synthetic fun removeFirst ()Ljava/lang/Object;
public fun removeFirst ()Ljava/lang/String;
public synthetic fun removeLast ()Ljava/lang/Object;
public fun removeLast ()Ljava/lang/String;
public synthetic fun rename (Ljava/lang/String;)Lorg/jetbrains/kotlinx/dataframe/columns/ColumnAccessor;
public fun rename (Ljava/lang/String;)Lorg/jetbrains/kotlinx/dataframe/columns/ColumnPath;
public synthetic fun rename (Ljava/lang/String;)Lorg/jetbrains/kotlinx/dataframe/columns/ColumnReference;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,7 @@ class JsonTests {
@Test
fun `serialize column with list of objects`() {
val df = dataFrameOf("col")(Regex(".+").findAll("abc").toList())
val json = shouldNotThrowAny { df.toJson() }
val json = shouldNotThrowAny { df.toJson() }!!
val list = DataFrame.readJsonStr(json)["col"][0].shouldBeInstanceOf<List<*>>()
list[0].shouldBeInstanceOf<String>()
}
Expand Down
Loading
Loading