Slackbot
02/10/2025, 10:40 AMCaleb B
02/24/2025, 3:58 PMMap<Class<T>, Supplier<T>>, where T is NOT a type parameter of the enclosing class but instead "pinning" the type of the supplier to the type of the class for runtime type validation?  Instead of Map<Class<*>, Supplier<*>>  and having to suppress constant type coercion warningsRaj Paliwal
02/28/2025, 5:40 PMOTHER_REASON
• Description: ScreenOffCheckKill 26m3s4ms (26.33344%) threshold 2.0%
The issue occurs when a*fter screen turns off, app in background.*
The description in the exit logs suggests ScreenOffCheckKill, but I couldn’t find any official documentation explaining this behavior.
• What exactly does ScreenOffCheckKill mean, and why does it happen?
• Is this a system-level restriction or a configurable setting?
• How can I prevent my app from getting killed due to this reason?
• Any pointers to official documentation or similar cases would be highly appreciated.
Thanks in advance for any insights!Amir H. Ebrahimnezhad
03/20/2025, 3:12 PMAmir H. Ebrahimnezhad
04/04/2025, 6:17 PMSebastian Schuberth
04/05/2025, 8:16 PMAutoClosables) but for Kotlin code and use?christophsturm
05/25/2025, 6:38 PMCaleb B
05/28/2025, 9:06 PMMyBuilder.() -> Unit parameter, you can obviously have the extensions be members of the builder class to be implicitly available, but I can't figure out how to do that with someone else's without making the end user either import them manually or use a with block like below.
Does anyone know how I could implicitly let people use this bundle of extensions in the DSL without the with block?
[Comment = original builder, code = my WIP syntax]Caleb B
06/11/2025, 8:27 PMfun foo(arg1: String, arg2: String) {
  // ...
}
// Known:
fun bar(arg1: String, arg2: String) = foo(arg1, arg2)
// Ideal?
fun bar = fooCaleb B
06/11/2025, 8:58 PMval default: Int
  set(value: Int) { field = value }
  set(value: IntSupplier) { field = value.get() }
// so this can happen:
mybuilder {
  // either this:
  default = 10
  // or this:
  default = { longOperationToFetchDefault() }
}aishwaryabhishek3
06/25/2025, 6:35 AM// Sealed class without generics
sealed class Result
// Subclass with a generic type
data class Success<T>(val data: T) : Result()
// Subclass without a generic type
object Loading : Result()
Or
sealed class Result<T>
class Success<T>(val data: T) : Result<T>()
// Some other subclass that doesn't need T can be defined as
class Error(val message: String) : Result<Nothing>()Manuel Lorenzo
07/09/2025, 1:40 PMCaleb B
07/09/2025, 11:55 PM"foo" in ("bar", "baz", "qux")  instead of "foo" in listOf("bar, "baz", "qux") so it doesn't read as cluttered.
This one might actually be impossible since it would require fun (vararg T).contains, but it would be nice to do myList -= "x", "y", "z"Caleb B
07/10/2025, 12:01 AM=) with kotlin-assignment-plugin, but is there a way to do the same for is?
I love making DSLs. It's so much fun to screw with the language to make code more readable.Kev
08/03/2025, 7:57 AMdecision.first is a DecisionResult.Next without a manual class? Its not getting inferred for some reason.Amir H. Ebrahimnezhad
08/10/2025, 4:49 PMGeorgeS-Litesoft
08/20/2025, 5:59 PMZyle Moore
08/29/2025, 4:44 AMval properties. It's defined in a core module. I'm using it in a web module. Sometimes it can be smart-cast to its non-nullable version, but other times it can't. I thought that if I wrap usage in an if (nullableProp != null) { doSomethingWith(nullableProp.toString()) }, it would be safe, but it's not. Browsing for answers points to cases where it's a var, which could be reassigned between dereferencing calls. Or, the other module can be recompiled(?) and not be nullable anymore. But surely, a simple data class with `val`s is safe, right?
I was able to swap a `forEach`'s it with the deconstructed props, and it works fine then, so it seems like it's related to dereferencing it more than once, since deconstructing (having a single variable for the property) can smart cast, even though it's still a Public API in a different moduleHunter
09/15/2025, 5:08 PMunmmodifiableMap?Jeronimo Coello
09/16/2025, 12:53 AMbuild.gradle example that can compile and call an OpenAI or Anthropic agent with SpringBoot?
I’m attaching my current build.gradle, the service class I’m using, and the error I’m seeing.
Beyond this error, I’ve had several other dependency issues and tried different version combinations, but I haven’t managed to get a working example yet.
What I need right now is just a minimal build.gradle with up-to-date dependencies that lets me call an LLM successfully.
Thanks in advance! 🙏David Beer
09/25/2025, 12:13 PMrawUserData.select { cols(0..2) }.head(3) but the following doesn't `rawUserData.select {   firstName and address.cols("city", "state")}.tail()`the compiler can't find the values firstName and insits on import some other address value.Marvin
09/26/2025, 12:09 PMJustin Tullgren
09/29/2025, 2:44 PMStephcraft
10/06/2025, 8:47 PMwindows-x86_64 on Windows 11 ARM 64?!
Is there anyway I can 'override' a property to allow this?
build.gradle.kts
plugins {
    kotlin("multiplatform") version "2.2.20" // "2.0.0"
}
repositories {
    mavenCentral()
}
kotlin {
    // windows
    mingwX64("native") {
        binaries {
            executable {
                entryPoint = "main"
            }
        }
    }
    sourceSets {
        val nativeMain by getting
    }
}
Error:
Execution failed for task ':commonizeNativeDistribution'.
> Could not isolate value org.jetbrains.kotlin.gradle.targets.native.toolchain.NativeVersionValueSource$Params_Decorated@26bb7cb5 of type NativeVersionValueSource.Params
   > Could not resolve all files for configuration ':kotlinNativeBundleConfiguration'.
      > Failed to transform kotlin-native-prebuilt-2.2.20-windows-aarch64.zip (org.jetbrains.kotlin:kotlin-native-prebuilt:2.2.20) to match attributes {artifactType=zip, kotlin.native.bundle.type=DIRECTORY, org.gradle.status=release}.
         > Could not find kotlin-native-prebuilt-2.2.20-windows-aarch64.zip (org.jetbrains.kotlin:kotlin-native-prebuilt:2.2.20).
           Searched in the following locations:
               <https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-native-prebuilt/2.2.20/kotlin-native-prebuilt-2.2.20-windows-aarch64.zip>
Possible solution:
 - Declare repository providing the artifact, see the documentation at <https://docs.gradle.org/current/userguide/declaring_repositories.html>
References:
• https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-native-prebuilt/2.2.20/
• https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-compatibility-and-versioning.html#supported-platforms
• https://youtrack.jetbrains.com/issue/KT-68504/Kotlin-Native-mingwArm64-target-support
• https://youtrack.jetbrains.com/issue/KT-48420/Kotlin-Native-Support-win-arm64-hostVivek Modi
10/15/2025, 3:13 PMSlackbot
10/16/2025, 7:09 PMMax
10/19/2025, 11:50 AMAadarsh
10/21/2025, 5:52 AMShaun Wild
10/24/2025, 5:39 PMChris
10/28/2025, 9:34 AMmain and then I was presented with this:
Kotlin: kotlinc-jvm 1.8.20 (JRE 24.0.2+12)
Kotlin: [Internal Error] java.lang.NoSuchMethodError: 'org.jetbrains.kotlin.com.intellij.psi.PsiElement org.jetbrains.kotlin.resolve.lazy.data.KtClassLikeInfo.getScopeAnchor()'
	at org.jetbrains.kotlinx.serialization.compiler.resolve.KSerializerDescriptorResolver.addSerializerImplClass(KSerializerDescriptorResolver.kt:75)
	at org.jetbrains.kotlinx.serialization.compiler.extensions.SerializationResolveExtension.generateSyntheticClasses(SerializationResolveExtension.kt:78)
	at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassMemberScope.getNonDeclaredClasses(LazyClassMemberScope.kt:287)
Must be some sort of version mismatch but I didn't change the versions in the supplied build.gradle. Is this an issue with newer versions of IDEA?