sqldelight icon indicating copy to clipboard operation
sqldelight copied to clipboard

Don't use a toolchain unless the java version is incompatible

Open eygraber opened this issue 1 year ago • 8 comments

eygraber avatar Jul 20 '23 23:07 eygraber

~~Looks like the only test that is failing is PostgreSqlTest.testDateFunctions. For some reason it looks like date_part('hour', timestamp_with_timezone) is returning the minutes:~~

~~expected: SelectDatePart(date_part=21.0, date_part_=20.0) but was : SelectDatePart(date_part=21.0, date_part_=15.0) at app//app.cash.sqldelight.postgresql.integration.PostgreSqlTest.testDateFunctions(PostgreSqlTest.kt:205)~~

~~Not sure how this would affect that though :thinking:~~

Looks like this only happened locally?

eygraber avatar Jul 21 '23 04:07 eygraber

I'm updating to manually set the targets instead of using toolchains

eygraber avatar Jul 21 '23 19:07 eygraber

I noticed some flakiness with MappingJvmTest; is that a regression?

app.cash.sqldelight.coroutines.MappingJvmTest[jvm] > mapToOneNonNullUsesContext[jvm] FAILED
    org.junit.runners.model.TestTimedOutException: test timed out after 1 seconds

eygraber avatar Jul 21 '23 20:07 eygraber

Currently blocked by https://github.com/cashapp/sqldelight/pull/4338

eygraber avatar Aug 17 '23 23:08 eygraber

@hfhbd not sure this is the right approach for the project anymore. What do you think?

eygraber avatar Dec 04 '23 02:12 eygraber

Honestly, I don't understand why you want to remove the toolchain feature and not just set the build JDK to 21 and keep the target level to 8/17.

hfhbd avatar Dec 04 '23 08:12 hfhbd

See OP. I just took something Jake said and ran with it

eygraber avatar Dec 04 '23 09:12 eygraber

Toolchains are a deeply flawed concept in Gradle that undermine a core feature of javac. Their only good usage is for varying the JVM in test tasks.

JakeWharton avatar Dec 04 '23 12:12 JakeWharton