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 using KSP2, it seems that the SymbolProcessor does not recognize annotations that contain backticks in the package name. For example, consider the following annotation:
@`org.komapper.annotation`.KomapperEntity
data class Employee(val id: Int)
The annotation is recognized by the SymbolProcessor in version 2.0.21-1.0.25, but it is not recognized in version 2.0.21-1.0.26.
The text was updated successfully, but these errors were encountered:
@`com.example`.Anno is probably invalid on JVM according to the Kotlin language spec:
Kotlin supports escaping identifiers by enclosing any sequence of characters into backtick (`) characters, allowing to use any name as an identifier. This allows not only using non-alphanumeric characters (like @ or #) in names, but also using keywords like if or when as identifiers. Actual set of characters that is allowed to be escaped may, however, be a subject to platform restrictions. Consult particular platform sections for details.
Note: for example, the following characters are not allowed in identifiers used as declaration names on the JVM platform even when escaped due to JVM restrictions: ., ;, [, ], /, <, >, :, \ .
At least, I cannot find the definition of the interpretation of the dot inside backtick quotes. Whether `com.example` is illegal or is treated like `com`.`excample` depends on (the underlying Kotlin compiler) implementation.
@`com`.example.Anno and @com.`example`.Anno work fine.
Reported by Toshihiro Nakamura:
When using KSP2, it seems that the SymbolProcessor does not recognize annotations that contain backticks in the package name. For example, consider the following annotation:
The annotation is recognized by the SymbolProcessor in version 2.0.21-1.0.25, but it is not recognized in version 2.0.21-1.0.26.
The text was updated successfully, but these errors were encountered: