Skip to content

Conversation

swankjesse
Copy link
Collaborator

This crash impacts people using FakeFileSystem in code that runs in a Gradle plugin.

This crash impacts people using FakeFileSystem in code
that runs in a Gradle plugin.
@swankjesse swankjesse force-pushed the jwilson.0630.dont_crash branch from 1231947 to dd4c01b Compare June 30, 2025 20:51
public fun <init> ()V
public fun <init> (Lkotlin/time/Clock;)V
public synthetic fun <init> (Lkotlin/time/Clock;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Lkotlinx/datetime/Clock;)V
public synthetic fun <init> (Lkotlinx/datetime/Clock;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the function I very much want to restore.

9db5ee3...jwilson.0630.dont_crash

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Without it, lots of downstream tests fail like this:

java.lang.NoSuchMethodError: 'void okio.fakefilesystem.FakeFileSystem.<init>(kotlinx.datetime.Clock, int, kotlin.jvm.internal.DefaultConstructorMarker)'
	at com.squareup.wire.SchemaBuilder.<init>(SchemaBuilder.kt:32)
	at app.cash.api.ProguardRulesGeneratorTest.stuff(ProguardRulesGeneratorTest.kt:68)
	```

@@ -1,8 +1,9 @@
public final class okio/fakefilesystem/FakeFileSystem : okio/FileSystem {
public final field clock Lkotlin/time/Clock;
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 can’t have this field and maintain compatibility with Gradle 8.x.

@@ -20,6 +21,7 @@ public final class okio/fakefilesystem/FakeFileSystem : okio/FileSystem {
public final fun getAllowReadsWhileWriting ()Z
public final fun getAllowSymlinks ()Z
public final fun getAllowWritesWhileWriting ()Z
public final fun getClock ()Lkotlin/time/Clock;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

...But this property should be fine.

@@ -18,7 +18,7 @@ jmh-gradle-plugin = { module = "me.champeau.jmh:jmh-gradle-plugin", version = "0
kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test" }
kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit" }
kotlin-time = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version = "0.7.0" }
kotlin-time = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version = "0.7.0-0.6.x-compat" }
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This compat version is a nice bridge

@swankjesse swankjesse merged commit 50bb8d4 into master Jul 1, 2025
21 of 22 checks passed
@swankjesse swankjesse deleted the jwilson.0630.dont_crash branch July 1, 2025 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants