You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i run my processor and validate symbols found with the following code:
val xmlToComposeSymbols = resolver.getSymbolsWithAnnotation(ComposeConverter::class.qualifiedName!!)
val composeToXmlSymbols = resolver.getSymbolsWithAnnotation(XmlConverter::class.qualifiedName!!)
val unProcessed = (xmlToComposeSymbols + composeToXmlSymbols).filter { !it.validate() }.toList()
unprocessed always contains whatever classes i annotated with my own annotation ComposeConverter (the other line about XmlConverter can be ignored for now.
It seems since the most recent version that every time it validates the KSAnnotated object and the class annotated with ComposeConverter contains something using the annotation Deprecated, it won't pass validation. I made a testing class in the following:
@ComposeConverter
class TestView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
@AttrRes defStyleAttr: Int = R.attr.tpaAmountViewStyle,
) : androidx.appcompat.widget.AppCompatTextView(context, attrs, defStyleAttr) {
private data class AmountViewState(...)
private fun updateAmount() {...}
private var state = AmountViewState()
set(value) {
field = value
updateAmount()
}
// region Deprecated Properties
@Deprecated("")
var amount: Float = 0.00f
set(amount) {
field = amount
moneyValue = amount.toBigDecimal()
}
//region Public Properties
/**
* The amount that will be displayed.
* */
var moneyValue: BigDecimal = BigDecimal.ZERO
set(moneyValue) {
field = moneyValue
state = state.copy(moneyValue = moneyValue)
}
get() = state.moneyValue
}
When my processor sees this it will not pass the validation and wont do anything with it. Now if i take the same class but comment out the Deprecated annotation it passes the validation fine. Even if i replace it with an annotation of my own it is fine.
Is this a bug or is there a setting/config i have to change to make it work with this annotation?
The text was updated successfully, but these errors were encountered:
kotlin version: 2.0.20
KSP version: 2.0.20-1.0.25
When i run my processor and validate symbols found with the following code:
unprocessed always contains whatever classes i annotated with my own annotation
ComposeConverter
(the other line aboutXmlConverter
can be ignored for now.It seems since the most recent version that every time it validates the
KSAnnotated
object and the class annotated withComposeConverter
contains something using the annotationDeprecated
, it won't pass validation. I made a testing class in the following:When my processor sees this it will not pass the validation and wont do anything with it. Now if i take the same class but comment out the
Deprecated
annotation it passes the validation fine. Even if i replace it with an annotation of my own it is fine.Is this a bug or is there a setting/config i have to change to make it work with this annotation?
The text was updated successfully, but these errors were encountered: