betterclever
07/01/2021, 5:08 PMmartmists
07/02/2021, 11:11 AMrnett
07/03/2021, 2:38 AMRequiresOptIn
annotations on parameters even when VALUE_PARAMETER
is not one of the annotation's targets (it's on a constructor property). Should I report these now, or wait for EAP releases?benkuly
07/06/2021, 9:46 AMMaik
07/08/2021, 7:22 AM@ErrorID
val errorID: Long = 0x10A
The ID's are found using the annotation and then their value is checked.
But now I have encountered a problem. I want to do the check in a project with multiple modules and I am not clear how to manage or persist data in the plugin across modules.
Are there any possible solutions for such use cases and if so, what do they look like?
I would be very happy about some helpful comments!mcpiroman
07/10/2021, 11:23 AM> Task :libraries:tools:mutability-annotations-compat:compileJava FAILED
error: Source option 6 is no longer supported. Use 7 or later.
error: Target option 6 is no longer supported. Use 7 or later.
on most recent master branch (de22a467a12714505a6f66f0a01bd7d7fc0ca9e2). Is it a know problem or something on my side?Marcello Lelio Albano
07/10/2021, 4:48 PMSlackbot
07/12/2021, 12:13 AMIaroslav Postovalov
07/12/2021, 9:53 AMLuca Piccinelli
07/14/2021, 10:39 AMClaus Rørbech
07/16/2021, 10:15 AMSyntheticResolveExtension
:
override fun getSyntheticCompanionObjectNameIfNeeded(descriptor: ClassDescriptor): Name? {
return descriptor.getSuperInterfaces().firstOrNull { it.fqNameSafe == FqName("SOME_INTERFACE") }
?.let { DEFAULT_NAME_FOR_COMPANION_OBJECT }
}
It works for most cases but when having inner classes as generic type parameters, like:
interface Generic<T>
interface Outer : Generic<Outer.Inner> {
class Inner
}
The check fails due to recursion in resolving the super interfaces (stack trace is in thread).
Any suggestions on how to trigger generation of companion classes (or not) that would also work for this case by other means (APIs, phases, etc)?ventura
07/20/2021, 4:07 PMClaudiu-Vlad Ursache
07/29/2021, 12:47 PMKtNamedFunction
from a KtCallExpression
, or something similar. Is that possible at all, maybe with a Resolver or something? I followed the instructions in the documentation about getReferences()
, but I get a null value for a very simple example like this one:
fun add(x: Int, y: Int): Int {
return x + y
}
fun main(args : Array<String>) {
println(add(1 + 2, 3)) // <- How do I get from the PSI node of add to the PSI node of add's declaration
}
Zac Sweers
08/01/2021, 6:55 PMjimn
08/02/2021, 1:32 AMval foo by delegate::foo
or inline val foo get()=delegate.foo
I know which one shows up in the icicle graph like a bag of cinder blockslouiscad
08/04/2021, 2:07 PM1..5
), or to generate unique values for constants?
Use cases I have in mind:
• Notifications ids, tags, and channel ids on Android
• Loading steps to show how many there are and what is the current one
• Ensured uniqueness of whatever id (number based, string based, or even primitive backed single property value class), across an app version, or through multiple updates of the same system (useful for communication between systems)louiscad
08/04/2021, 2:15 PMval stuff1: Stuff
val stuff2: Something
val nameOfWhatever: String
withLoading("Doing something long") {
stuff1 = step { getStuff(someInput) }
stuff2 = step { getSomething(stuff1) }
nameOfWhatever = step { fetchThing(someInput, stuff2) }
}
In the snippet above, I'd like withLoading
to know how many calls to step
there are in the lambda it's been passed, so it can show somewhere "Step 1/3" while getStuff(…)
is executing.
Currently, it's impossible to do, and having the desired result requires quite a bit of unsafe boilerplate, unsafe in that if I do a mistake like starting with step 3 instead of 1, the compiler won't spot it.
Of course, there'd be concerns about having conditionally called step { … }
calls, and possible nesting, plus one might want to provide some info to step
to show on a UI what the next steps are (e.g. their title, some icon…)Ryan Kay
08/05/2021, 8:00 PMmbonnin
08/06/2021, 10:00 AM@Metadata
, *.kotlin_modules
, *.kotlin_metadata
, *.kotlin_builtins
, what's safe to strip and what am I exposing myself to if I strip too much?Marc Knaup
08/09/2021, 9:48 PMmbonnin
08/13/2021, 11:32 AMFoo::class.qualifiedName()
at compile type and save them as constant strings to make sure they are not touched by proguard but still get intelliJ "FindUsages" if needed?Youssef Shoaib [MOD]
08/17/2021, 4:57 AMStrum355
08/18/2021, 5:10 PMorg.jetbrains.kotlin:kotlin-stdlib:1.5.21
, but Im getting a lot of errors about /tmp/kotlin-stdlib/kotlin/util/Synchronized.kt:16:18: error: cannot access 'InlineOnly': it is internal in 'kotlin.internal'
in the files that use these internal symbols./tmp/kotlin-stdlib/kotlin/util/NumbersJVM.kt:185:31: error: actual function 'countLeadingZeroBits' has no corresponding expected declaration
and the same for other symbols.
The args to K2JVMCompiler are as follows:
-Xplugin=/home/noah/Sourcegraph/lsif-kotlin/semanticdb-kotlinc-1.0-SNAPSHOT.jar -P plugin:com.sourcegraph.lsif-kotlin:sourceroot=/tmp/kotlin-stdlib -P plugin:com.sourcegraph.lsif-kotlin:targetroot=/tmp/kotlin-stdlib/target -no-reflect -no-stdlib -Xno-check-actual -Xopt-in=kotlin.RequiresOptIn -Xopt-in=kotlin.ExperimentalUnsignedTypes -Xopt-in=kotlin.ExperimentalStdlibApi -Xopt-in=kotlin.contracts.ExperimentalContracts -Xopt-in=kotlin.ExperimentalMultiplatform -Xallow-kotlin-package -Xmulti-platform -nowarn -classpath /home/noah/.cache/coursier/v1/https/repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.5.21/kotlin-stdlib-1.5.21.jar:/home/noah/.cache/coursier/v1/https/repo1.maven.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.jar:/home/noah/.cache/coursier/v1/https/repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.5.21/kotlin-stdlib-common-1.5.21.jar
Anyone any ideas?Thiago
08/20/2021, 7:35 PMCLOVIS
08/24/2021, 4:47 PMzak.taccardi
08/24/2021, 7:40 PM--progressive
mode useful?
https://kotlinlang.org/docs/whatsnew13.html#progressive-mode
For example, 1.6
will introduce a breaking change for when
to make it always exhaustive. Would enabling progressive mode in 1.5
allow our code to be cross-compatible with both 1.5
and 1.6
in theory (assuming this change lands as a hidden option in the 1.5
compiler)?jessewilson
08/24/2021, 8:48 PMCompilerMessageSourceLocation
from my IrElement
, which happens to be an IrCallImpl
so that I can call MessageCollector.report
with a useful source location. Is there an API somewhere to extract a source location from an element?CLOVIS
08/25/2021, 1:49 PMorg.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during IR lowering
error after migrating to 1.5.30. Where's the correct place to report it?Zac Sweers
08/25/2021, 2:51 PMXnullability-annotations
to set everything to strict? Having to maintain a list of all the packages seems cumbersome. Would it be worth filing a FR if so?suresh
08/26/2021, 6:28 AM1.5.30
, Lang Level 1.6
& Jdk 17). Has anybody seen this error?
> Task :kaptGenerateStubsKotlin
....
w: Language version 1.6 is experimental, there are no backwards compatibility guarantees for new language and library features
w: ATTENTION!
This build uses unsafe internal compiler arguments:
-XXLanguage:+JvmRecordSupport
This mode is not recommended for production use,
as no stability/compatibility guarantees are given on
compiler or generated code. Use it at your own risk!
w: Language version 1.6 is experimental, there are no backwards compatibility guarantees for new language and library features
Compilation with Kotlin compile daemon was not successful
java.lang.NullPointerException
at org.jetbrains.kotlin.incremental.IncrementalJvmCache.addToClassStorage(IncrementalJvmCache.kt:494)
at org.jetbrains.kotlin.incremental.IncrementalJvmCache.saveFileToCache(IncrementalJvmCache.kt:171)
at org.jetbrains.kotlin.incremental.BuildUtilKt.updateIncrementalCache(buildUtil.kt:110)
at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.updateCaches(IncrementalJvmCompilerRunner.kt:326)
at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.updateCaches(IncrementalJvmCompilerRunner.kt:112)
suresh
08/26/2021, 6:28 AM1.5.30
, Lang Level 1.6
& Jdk 17). Has anybody seen this error?
> Task :kaptGenerateStubsKotlin
....
w: Language version 1.6 is experimental, there are no backwards compatibility guarantees for new language and library features
w: ATTENTION!
This build uses unsafe internal compiler arguments:
-XXLanguage:+JvmRecordSupport
This mode is not recommended for production use,
as no stability/compatibility guarantees are given on
compiler or generated code. Use it at your own risk!
w: Language version 1.6 is experimental, there are no backwards compatibility guarantees for new language and library features
Compilation with Kotlin compile daemon was not successful
java.lang.NullPointerException
at org.jetbrains.kotlin.incremental.IncrementalJvmCache.addToClassStorage(IncrementalJvmCache.kt:494)
at org.jetbrains.kotlin.incremental.IncrementalJvmCache.saveFileToCache(IncrementalJvmCache.kt:171)
at org.jetbrains.kotlin.incremental.BuildUtilKt.updateIncrementalCache(buildUtil.kt:110)
at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.updateCaches(IncrementalJvmCompilerRunner.kt:326)
at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.updateCaches(IncrementalJvmCompilerRunner.kt:112)
dmitriy.novozhilov
08/26/2021, 8:21 AMTomasz Krakowiak
08/26/2021, 2:23 PMsuresh
08/26/2021, 2:54 PM