KD
02/11/2021, 1:37 AMFabio
02/11/2021, 7:38 AMBig Chungus
02/11/2021, 3:19 PMJiaxiang
02/11/2021, 11:06 PMCompilationErrorException
use case?star_zero
02/12/2021, 9:29 AMdata class Sample(
@Json(name = "full_name") val fullName: String
)
// in KSP
KSClassDeclaration.getAllProperties().forEach {
it.annotations // => empty list
}
pajatopmr
02/13/2021, 8:26 AMprintln("Hello World")
can KSP easily access the declaration of "println"? I.e. can KSP drill into the runtime jar file, extract the definition/declaration of standard language symbols and provide those to an interested tool leveraging KSP?Zac Sweers
02/14/2021, 5:00 AMZac Sweers
02/14/2021, 6:34 AM<config>Test
naming convention rather than the conventional test<config>
convention used everywhere else. Was there a specific reason for this? If not - would you be open to changing it? This is always a huge headache when repo maintainers try to automatically manage some configurations for tests and have to add special rules for kapt's backward namingZac Sweers
02/16/2021, 6:46 PMFabio
02/16/2021, 10:20 PMit.type.resolve()
is a KSType
, and I see isAssignableFrom(KSType)
but still not sure how to compare it to a KClass
like Module::class.java
yigit
02/18/2021, 8:02 PMyamasa
02/19/2021, 4:49 PMclass Outer<T> {
inner class Inner
}
val foo: Outer<String>.Inner
get() = TODO()
Is there a way to get the type argument String
from KSPropertyDeclaration.type
of the property foo
?
I tried fooPropertyDeclaration.type.resolve().declaration.parentDeclaration?.typeParameters?.get(0)
, but it was T
, not String
.Jiaxiang
02/20/2021, 12:56 AMSymbolProcessor
. I’d like to open up for discussion and hear back from you on how you think about this exception handling on how it can impact your developing experience (in good way or bad way). Mainly I would like feedbacks on whether other processors should continue processing when one processor throws an exception.elihart
02/22/2021, 5:07 PMjavax.lang.model.element.PackageElement
? As far as I can tell there isn’t a KSAnnotated
representation of a package (potentially because package-info.java is not used in kotlin?) I have a javac processor that looks up annotations on package elements and am wondering how KSP handles that.
Similarly, does KSP provide any way to resolve the package by name? In javac we can do Elements.getPackageElement(CharSequence)
to get a package, which then provides access to all elements in that package (including elements from other modules). We have used this to enable a single module to aggregate the generated files of other modules, by putting them all in the same package. I’m trying to figure out how to translate this to KSPgabrielfv
02/24/2021, 3:12 PMVladislav Areshkin [IceRock]
02/27/2021, 5:05 PMyigit
02/27/2021, 8:12 PMyigit
02/27/2021, 8:13 PMZac Sweers
02/27/2021, 8:26 PMyigit
02/27/2021, 8:33 PMyigit
02/27/2021, 8:37 PMyigit
03/01/2021, 9:08 PMyigit
03/01/2021, 9:11 PMspierce7
03/02/2021, 6:20 AMTimo Gruen
03/09/2021, 9:58 AMJiaxiang
03/11/2021, 12:51 AMfindAnnotationFromUseSiteTarget()
function, consolidate its functionality into KSP internal logic.
Behavior change
• KSP now handles annotation use site targets internally for property accessors (namely @get:Anno
, @set:Anno
).
◦ property accessors will have corresponding targeted annotations from their receiver properties
◦ annotations with @get:
and @set:
targets will not appear in property’s annotation list.yigit
03/17/2021, 1:06 AMMichal Harakal
03/17/2021, 1:31 PM"com.github.tschuchortdev:kotlin-compile-testing
a little bit, but not success yet. It works well with kotlinc plugins, even debugging is possible ...gabrielfv
03/17/2021, 7:06 PMZac Sweers
03/19/2021, 4:09 AMw: Language version 1.5 is experimental, there are no backwards compatibility guarantees for new language and library features
As it prevents us from using warningsAsError
Zac Sweers
03/19/2021, 4:09 AMw: Language version 1.5 is experimental, there are no backwards compatibility guarantees for new language and library features
As it prevents us from using warningsAsError
Ting-Yuan Huang
03/19/2021, 4:21 AM-language-version=1.5
is passed to the compiler. I'm not sure where it was set. It can be muted with -Xsuppress-version-warnings
Zac Sweers
03/19/2021, 4:21 AMTing-Yuan Huang
03/19/2021, 4:23 AMZac Sweers
03/19/2021, 4:26 AMw: Flag is not supported by this version of the compiler: -Xsuppress-version-warnings
w: Language version 1.5 is experimental, there are no backwards compatibility guarantees for new language and library features
e: warnings found and -Werror specified
Ting-Yuan Huang
03/19/2021, 4:31 AMZac Sweers
03/19/2021, 3:25 PM