Grégory Lureau
11/13/2021, 8:57 AMclass Wrapper(
_delegate: DepInterface
) : DepInterface by _delegate {
[...]
}
I find the constructor parameter and the fact that Wrapper
implements DepInterface
, but I'm not able to find the by _delegate
part.
Also I was expecting to have the delegated method in getAllFunctions()
I suppose I'll have to resolve() the super to get them?salomonbrys
11/15/2021, 11:26 AMZac Sweers
11/15/2021, 4:19 PMeffectiveJavaModifiers()
helper but 1.5.31-1.0.1 does?Grégory Lureau
11/15/2021, 8:04 PMresolver.getSymbolsWithAnnotation(...)
doesn't return annotated typealias
, but still I can find them with resolver.getDeclarationsFromPackage(String)
. Is it the expected behavior?jameskleeh
11/18/2021, 6:11 PMenvironment.codeGenerator.createNewFile(
the way? It seems it expects a class file to be createdjameskleeh
11/18/2021, 9:14 PMAlex Spence
11/20/2021, 2:58 AMtasks.withType<org.jetbrains.kotlin.gradle.internal.KaptTask> {
kotlinJavaToolchain.toolchain.use(customLauncher)
}
PixelHamster
11/20/2021, 4:36 PMcompanion object : EntityClass<ULong, GuildSetting>(GuildSettings)
from the companion object above I'd need the GuildSettings argument ?
I'm rather new to ksp so I don't know all the jargon yetelect
11/22/2021, 9:49 AMcommonMain
in a multiplatform project, is this supported? Because I only see the following configurations
configuration ':ksp'
configuration ':kspJvm'
configuration ':kspJvmTest'
configuration ':kspMetadata'
configuration ':kspNative'
configuration ':kspNativeTest'
janvladimirmostert
11/28/2021, 9:39 AMkspJs
configuration,
dependencies {
add("kspJvm", "io.jvaas:jvaas-observe")
add("kspJs", "io.jvaas:jvaas-observe")
//ksp("io.jvaas:jvaas-observe")
}
I get a failure with
Execution failed for task ':applications:od-server:compileProductionExecutableKotlinJs'.
Failed to calculate the value of task ':applications:od-server:compileProductionExecutableKotlinJs' property 'entryModule$kotlin_gradle_plugin'.> Collection has more than one element. Any ideas what this could be? I've posted the full code on https://stackoverflow.com/questions/70139266/ksp-on-kotlin-multiplatform-fails-on-the-kspjs-with-collection-has-more-than-on and a reproducible example here: https://github.com/janvladimirmostert/observable-demo
Stewart Stewart
11/30/2021, 7:50 PMyigit
12/01/2021, 12:52 AMChris Mulder
12/01/2021, 9:42 AMjameskleeh
12/01/2021, 6:29 PMreturnType
on KsPropertyGetter
is nullable? In what cases would a getter not have a return type?jameskleeh
12/02/2021, 7:38 PMArray<String>
vs Array<T>
?Rafael Costa
12/03/2021, 10:12 AMSymbolProcessorEnvironment.options
accessible by all ksp libraries users might be using or is there a way to define options by ksp library? Do you guys know of any open source library that uses these configuration options that I could take a look?Hayden Meloche
12/05/2021, 2:12 AMUdi Cohen
12/08/2021, 4:24 PM@KspTestingAnnotation
class KspTesterDelegation : MainInterface by MainImpl() {
fun method2(): Int {
return 10
}
}
interface MainInterface {
fun method1(): Int
}
class MainImpl : MainInterface {
override fun method1(): Int {
return 4
}
}
Getting all the declarations of KspTesterDelegation
will only provide its constructor and method2()
, while in KAPT we also get method1()
. I know the reason KAPT can do that is because the generated stub has the delegated methods inside the main class.
Is there a way I can still get the methods of a delegated class when using KSP?Dilraj Singh
12/11/2021, 11:57 AMMyCustomAnnotation
and a class of the following manner:
@MyCustomAnnotation
abstract class User {
val id: Int = 11
val name: String
}
Now I am trying to generate the following function using KSP:
fun getUser(id: Int = 11, name: String): User {
return User(id, name)
}
I am unable to get the value defined of the variable id
, so the function generated has no default arguments. Any method to get the value of a class variable? Currently the following function is being generated:
fun getUser(id: Int name: String): User {
return User(id, name)
}
ThanksZac Sweers
12/13/2021, 7:03 PMTing-Yuan Huang
12/13/2021, 7:55 PMIdan Nakav
12/13/2021, 10:11 PMRohil Chodankar
12/14/2021, 11:25 AMKAPT
to KSP
in our android project. We have one internal processor that generates an extension function to convert a String into respective class type. Code snippet below. Everything works well and ksp
generates the class. The problem I am facing is that some classes have companion object function that try to access the generated function. The IDE fails to resolve the generated function (although i have marked the generated path as explained) and intermittently the build task fails.
@MyAnnotation
enum class Test {
@Field(name = "value1") value1,
@Field(name = "value2") value2,
companion object {
fun fromString(value: String?): Test? = value?.toTest()
}
}
philglass
12/14/2021, 11:30 AMkotlin-compile-testing
(e.g. it fully wipes output directories on each KSP run, and a bunch of the KSP incremental behaviour is implemented by the Gradle plugin rather than the compiler plugin).
Is my best bet more of an integration test, maybe using Gradle TestKit?jameskleeh
12/15/2021, 4:31 PMjameskleeh
12/21/2021, 4:19 PMNikita Klimenko [JB]
12/22/2021, 12:25 PMjameskleeh
12/22/2021, 9:30 PMshortName
. It looks like the FQN is there in the descriptor, but I don’t know how to access it. Anyone have any idea? Thanks in advancebezrukov
12/23/2021, 3:51 PMproject.plugins.withType(com.google.devtools.ksp.gradle.KspGradleSubplugin).whenPluginAdded {
ksp {
arg("key", "value")
}
}
doesn't work, because it can't find a plugin with that type. But it's there - I tried to find it without withType
filtering (e.g. project.plugins.whenPluginAdded { println(it) })
dvdandroid
12/27/2021, 7:00 AMclassDeclaration.getAllSuperTypes()
returns an empty set when calling it with kspKotlinMetadata
task in a multiplatform project?
I'm trying to generate common code; kspKotlinJvm
works finedvdandroid
12/27/2021, 7:00 AMclassDeclaration.getAllSuperTypes()
returns an empty set when calling it with kspKotlinMetadata
task in a multiplatform project?
I'm trying to generate common code; kspKotlinJvm
works fineJiaxiang
01/03/2022, 9:03 PMdvdandroid
01/04/2022, 11:23 AM