El Zhang
04/24/2022, 8:30 AMChris C
04/27/2022, 3:37 PMDutch
04/27/2022, 5:06 PMimplementation(files("libs/B.aar"))
implementation(files("libs/A.jar"))
ksp(files("libs/C.jar"))
I'm getting the following error during kspDebugKotlin:
java.lang.NoClassDefFoundError: _*Class from module A*_
What am I doing wrong?
EDIT:
When adding A and B to KSP like so:
ksp(files("libs/C.jar", "libs/A.jar", "libs/B.aar")
It does find the class from module A. Now it is still missing a dependency which is used in A and my current project.
EDIT 2:
After adding every dependency with ksp() it is working now.Dilraj Singh
04/28/2022, 5:45 AMeygraber
04/28/2022, 10:22 PMkspMetadata
configuration isn't found anymore. Is kspCommonMainMetadata
the correct replacement?Matthias Geisler
04/29/2022, 6:51 AMgetSymbolsWithAnnotation
with multiple deferring Annotation for a Class target.
Is it suppose to pick up only the first?martmists
05/01/2022, 12:54 PM(String) -> Unit
, is there an easy way to check if the KSFunctionDeclaration matches that signature?Matthias Geisler
05/01/2022, 6:17 PMgetNewFiles
nor getAllFiles
picks them up - I believe this has to do with the fact that meta/shared sources (except commonMain) cannot be declared for KSP right?Harald Pehl
05/04/2022, 7:29 AMeygraber
05/06/2022, 6:17 PMMatthias Geisler
05/10/2022, 6:12 PMEl Zhang
05/12/2022, 1:58 PMBig Chungus
05/12/2022, 9:47 PM// annotation
@Target(AnnotationTarget.FUNCTION)
@Retention(AnnotationRetention.SOURCE)
public annotation class Showcase(
val katalog: String = "katalog"
)
// application in sources
@Showcase
fun testTarget() {}
// usage in processor
private fun KSAnnotation.showcaseData(): ShowcaseVisitor.Data {
arguments.first { it.name?.getShortName() == "katalog" }.value!! as String // throws NPE
}
I'm on ksp:1.6.21-1.0.5. I've also verified that the KSAnnotation at least contains the argument by that namemartmists
05/14/2022, 11:00 PM> Task :kpy-sample:kspKotlinPy FAILED
e: Compilation failed: Metaspace
* Source files: MyClass.kt, Extra.kt, More.kt, kpy-module.kt, kpy-module.kt, entrypoint.kt
* Compiler version info: Konan: 1.6.21 / Kotlin: 1.6.21
* Output kind: LIBRARY
e: java.lang.OutOfMemoryError: Metaspace
It seems KSP is taking up a fair bit of memory, causing my github actions runner to crash. What should I do to reduce this?
Here's the full error log:Hamza GATTAL
05/14/2022, 11:39 PMJiaxiang
05/20/2022, 9:50 PMtrevjones
05/20/2022, 10:44 PM@Parcelize data class Foo(val bar: String): Parcelable
would generate something like @EnforceImpl abstract class FooRoundTripParceling {...}
into the androidTest source set. Then I could have a different processor watching for annotations to pair the impl with a generated template.
I assume generating some sort of resource file and doing a processor or gradle task that operates on the generated resources would be the only way to do something like this.Jintin
05/23/2022, 3:53 AMelect
05/24/2022, 7:36 PMresolver.getAllFiles().first { it.fileName == "terraform.kt" }.declarations
but for functions, I can't "enter" and see the body, that is all the declarations inside
is it a visitor mandatory?Norbi
05/30/2022, 11:44 AMNorbi
06/02/2022, 10:08 PM<http://logger.info|logger.info>()
messages while compiling in Idea? Messages by warn()
and error()
is displayed on the console but info()
is not.
Thanks.quicksteve
06/03/2022, 6:21 PMOliver.O
06/03/2022, 7:34 PMJintin
06/05/2022, 5:12 PMNorbi
06/07/2022, 8:40 AMdependencies {
add("kspMetadata", project(":test-processor"))
...
In my project there seems to be no kspMetadata configuration:
Configuration with name 'kspMetadata' not found.
What is the correct configuration?
Thanks.
Environment: Idea 2022.1.2 CE, Kotlin 1.6.21, KSP 1.6.21-1.0.5Michal Klimczak
06/07/2022, 9:00 AMTypeElement.toTypeSpec(ClassInspector)
extension. Then generating the code from the original TypeSpec was a breeze - e.g. just mapping original functions to their modified generated equivalents. I can't find an equivalent in KSP world, I would assume because there is no equivalent ClassInspector.
I guess I could modify my generator classes to not rely on TypeSpec but rather something more abstract, but it would be super convenient if there was something similar. What am I missing?Paul Woitaschek
06/07/2022, 1:36 PMarnaud.giuliani
06/07/2022, 4:25 PMresolver.getSymbolsWithAnnotation(...)
?Vaios Tsitsonis
06/08/2022, 6:31 AMKSDeclaration
of this enum does not contain the ENUM
modifier (It has only the following modifiers: PUBLIC
, FINAL
). If I move the enum class into the same gradle module then the KSDeclarartion
will have the correct modifiers. Is there some sort of limitation with multi-module projects or is it a bug?Michal Klimczak
06/09/2022, 5:34 AMkotlinx.coroutines.flow.Flow
(everything works fine in kapt of course). Is it working for anyone?Michal Klimczak
06/09/2022, 5:34 AMkotlinx.coroutines.flow.Flow
(everything works fine in kapt of course). Is it working for anyone?inheritClassPath = true
in the second KotlinCompilation
helps