wasyl
02/22/2023, 9:17 PMEclipse Temurin 17.0.6+10 (amd64)
. The other is an intel mac, build scan says toolchain is Eclipse Temurin 17.0.6+10 (x86_64)
Subsequent builds on the same machines produce the same keys as far as I can see.
The code to configure toolchains is:
kotlin {
jvmToolchain {
vendor.set(JvmVendorSpec.ADOPTIUM)
languageVersion.set(JavaLanguageVersion.of(17))
}
}
tasks.withType(KotlinCompile).configureEach {
compilerOptions.jvmTarget.set(JvmTarget.JVM_11)
}
tasks.withType(JavaCompile).configureEach {
options.release.set(Build.javaTargetVersion.majorVersion.toInteger())
}
I don't know what else could cause the differences and why the build cache between the two machines doesn't work. Unless it's not supposed to? This is all on Kotlin 1.8.10inaki
02/23/2023, 12:25 AMinaki
02/23/2023, 12:27 AM./gradle/GRADLE_VERSION
and execute compare again?wasyl
02/23/2023, 8:05 AMsettings.gradle
does contain rootProject.name=...
• after removing ./.gradle
the keys still differ (but are stable on both machines)wasyl
02/23/2023, 8:46 AMtapchicoma
02/23/2023, 9:35 AMKotlin compiler args:
wasyl
02/23/2023, 9:35 AM--debug
?tapchicoma
02/23/2023, 9:35 AMtapchicoma
02/23/2023, 9:36 AM./gradlew build --debug > build.log
inaki
02/23/2023, 3:31 PMinaki
02/23/2023, 3:31 PMclasspatahSnapshotProeprties
or compilerOptions
but you can observe there is a difference in the task class tooinaki
02/23/2023, 3:32 PMwasyl
02/23/2023, 3:34 PMwasyl
02/23/2023, 3:35 PMplugins {
id("kotlin")
id("java-test-fixtures")
id("com.apollographql.apollo")
}
directly. That leaves either the build script or settings.gradle
that might mess things up I think?inaki
02/23/2023, 3:38 PMinaki
02/23/2023, 3:39 PMwasyl
02/23/2023, 3:39 PMinaki
02/23/2023, 3:39 PMwasyl
02/23/2023, 3:40 PMLast week I had a similar investigation and at the end was one stale state of the .gradle root folderunfortunately during investigation I pretty much nuked everything and that didn’t help. Plus I observe the same cache keys on a second intel mbp, so at least that’s stable between the machines. Don’t have a second linux machine to check
wasyl
02/23/2023, 3:40 PMsorry I mean amd vs intelso, a simple project on two platforms 👍 will do that
inaki
02/23/2023, 3:41 PMmbonnin
02/23/2023, 3:42 PMThat leaves either the build script orI always wonder what goes into a given task cache key. My mental model is it's the full classpath? Sothat might mess things up I think?settings.gradle
build.gradle
, settings.gradle
but also buildscript.classpath
, plugins {}
, project accessors, version catalog accessors and gradle model accessorsmbonnin
02/23/2023, 3:42 PMwasyl
02/23/2023, 5:15 PMwasyl
02/23/2023, 5:16 PMwasyl
02/23/2023, 5:36 PM~/.gradle/gradle.properties
or init filestapchicoma
02/23/2023, 6:31 PMwasyl
02/23/2023, 6:32 PM./gradlew assemble -Dfile.encoding=UTF-8 -Dorg.gradle.caching.debug=true
?tapchicoma
02/23/2023, 6:32 PMwasyl
02/23/2023, 6:35 PM--scan
was ignored with -Dorg.gradle.cahing.debug=true
. I’ll try and make a scan separately too 👍inaki
02/23/2023, 6:41 PMwasyl
02/23/2023, 6:45 PM-Dfile.encoding=UTF-8
and I still see the differences, let me know if you still want a scan/output.Alexander.Likhachev
02/23/2023, 7:53 PMwasyl
02/23/2023, 8:03 PMAlexander.Likhachev
02/23/2023, 8:09 PMwasyl
02/23/2023, 8:19 PM:lib:compileKotlin
from my project matches 8f5c7f6ed33f6dc43c6c2f1ec2cd9289
or c2706adf8bd6a5a2c45cd078ece23d57
Alexander.Likhachev
02/23/2023, 8:21 PMAlexander.Likhachev
02/23/2023, 8:26 PMinaki
02/24/2023, 8:02 PMinaki
03/03/2023, 7:39 PMwasyl
03/03/2023, 9:14 PM