https://kotlinlang.org logo
#ksp
Title
# ksp
r

Robert Jaros

11/03/2023, 1:43 PM
My processor is crashing after migration from
1.9.20-1.0.13
to
1.9.20-1.0.14
with this error
e: java.lang.AssertionError: Rewrite at slice LEXICAL_SCOPE key: ANNOTATION_ENTRY old value: org.jetbrains.kotlin.resolve.scopes.LexicalScope$Base@69226573@1763861875 new value: org.jetbrains.kotlin.resolve.scopes.LexicalScope$Base@640fdfad@1678761901
. Full stacktrace in thread.
Copy code
e: java.lang.AssertionError: Rewrite at slice LEXICAL_SCOPE key: ANNOTATION_ENTRY old value: org.jetbrains.kotlin.resolve.scopes.LexicalScope$Base@69226573@1763861875 new value: org.jetbrains.kotlin.resolve.scopes.LexicalScope$Base@640fdfad@1678761901
<File name: Service.kt, Physical: true>
<ELEMENT>@KVService</ELEMENT>
interface IAddressService {
    suspend fun getAddressList(search: String?, types: String, sort: Sort): List<Address>
    suspend fun addAddress(address: Address): Address
    suspend fun updateAddress(address: Address): Address
    suspend fun deleteAddress(id: Int): Boolean
}
        at org.jetbrains.kotlin.com.intellij.openapi.diagnostic.DefaultLogger.error(DefaultLogger.java:54)
        at org.jetbrains.kotlin.com.intellij.openapi.diagnostic.Logger.error(Logger.java:182)
        at org.jetbrains.kotlin.util.slicedMap.Slices.logErrorAboutRewritingNonEqualObjects(Slices.java:158)
        at org.jetbrains.kotlin.util.slicedMap.Slices.access$000(Slices.java:30)
        at org.jetbrains.kotlin.util.slicedMap.Slices$1.processRewrite(Slices.java:42)
        at org.jetbrains.kotlin.util.slicedMap.SlicedMapImpl.put(SlicedMapImpl.java:65)
        at org.jetbrains.kotlin.resolve.BindingTraceContext.record(BindingTraceContext.java:150)
        at org.jetbrains.kotlin.storage.LockBasedLazyResolveStorageManager$LockProtectedTrace$record$1.invoke(LockBasedLazyResolveStorageManager.kt:70)
        at org.jetbrains.kotlin.storage.LockBasedLazyResolveStorageManager$LockProtectedTrace$record$1.invoke(LockBasedLazyResolveStorageManager.kt:70)
        at org.jetbrains.kotlin.storage.LockBasedStorageManager.compute(LockBasedStorageManager.java:290)
        at org.jetbrains.kotlin.storage.LockBasedLazyResolveStorageManager$LockProtectedTrace.record(LockBasedLazyResolveStorageManager.kt:70)
        at org.jetbrains.kotlin.resolve.calls.CallResolver.resolveCallForConstructor(CallResolver.java:380)
        at org.jetbrains.kotlin.resolve.calls.CallResolver.resolveFunctionCall(CallResolver.java:334)
        at org.jetbrains.kotlin.resolve.calls.CallResolver.resolveFunctionCall(CallResolver.java:303)
        at org.jetbrains.kotlin.resolve.AnnotationResolverImpl.resolveAnnotationCall(AnnotationResolverImpl.java:167)
        at com.google.devtools.ksp.symbol.impl.binary.KSAnnotationDescriptorImplKt.getValueArguments(KSAnnotationDescriptorImpl.kt:200)
        at com.google.devtools.ksp.symbol.impl.binary.KSAnnotationDescriptorImplKt.createKSValueArguments(KSAnnotationDescriptorImpl.kt:237)
        at com.google.devtools.ksp.symbol.impl.kotlin.KSAnnotationImpl$arguments$2.invoke(KSAnnotationImpl.kt:83)
        at com.google.devtools.ksp.symbol.impl.kotlin.KSAnnotationImpl$arguments$2.invoke(KSAnnotationImpl.kt:82)
        at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
        at com.google.devtools.ksp.symbol.impl.kotlin.KSAnnotationImpl.getArguments(KSAnnotationImpl.kt:82)
        at com.google.devtools.ksp.visitor.KSValidateVisitor.visitAnnotation(KSValidateVisitor.kt:50)
        at com.google.devtools.ksp.visitor.KSValidateVisitor.visitAnnotation(KSValidateVisitor.kt:5)
        at com.google.devtools.ksp.symbol.impl.kotlin.KSAnnotationImpl.accept(KSAnnotationImpl.kt:110)
        at com.google.devtools.ksp.visitor.KSValidateVisitor.visitAnnotated(KSValidateVisitor.kt:40)
        at com.google.devtools.ksp.visitor.KSValidateVisitor.visitDeclaration(KSValidateVisitor.kt:23)
        at com.google.devtools.ksp.visitor.KSValidateVisitor.visitClassDeclaration(KSValidateVisitor.kt:67)
        at com.google.devtools.ksp.visitor.KSValidateVisitor.visitClassDeclaration(KSValidateVisitor.kt:5)
        at com.google.devtools.ksp.symbol.impl.kotlin.KSClassDeclarationImpl.accept(KSClassDeclarationImpl.kt:135)
        at com.google.devtools.ksp.UtilsKt.validate(utils.kt:125)
        at com.google.devtools.ksp.UtilsKt.validate$default(utils.kt:124)
        at io.kvision.ksp.KVProcessor$process$deps$1.invoke(KVProcessor.kt:70)
        at io.kvision.ksp.KVProcessor$process$deps$1.invoke(KVProcessor.kt:70)
        at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:171)
        at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:194)
        at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:169)
        at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:194)
        at kotlin.sequences.TransformingSequence$iterator$1.hasNext(Sequences.kt:214)
        at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:169)
        at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:194)
        at kotlin.sequences.SequencesKt___SequencesKt.toList(_Sequences.kt:809)
        at io.kvision.ksp.KVProcessor.process(KVProcessor.kt:108)
        at com.google.devtools.ksp.AbstractKotlinSymbolProcessingExtension$doAnalysis$8$1.invoke(KotlinSymbolProcessingExtension.kt:305)
        at com.google.devtools.ksp.AbstractKotlinSymbolProcessingExtension$doAnalysis$8$1.invoke(KotlinSymbolProcessingExtension.kt:303)
        at com.google.devtools.ksp.AbstractKotlinSymbolProcessingExtension.handleException(KotlinSymbolProcessingExtension.kt:409)
        at com.google.devtools.ksp.AbstractKotlinSymbolProcessingExtension.doAnalysis(KotlinSymbolProcessingExtension.kt:303)
        at org.jetbrains.kotlin.js.analyze.AbstractTopDownAnalyzerFacadeForWeb.analyzeFilesWithGivenTrace(TopDownAnalyzerFacadeForJS.kt:142)
        at org.jetbrains.kotlin.js.analyze.AbstractTopDownAnalyzerFacadeForWeb.analyzeFiles(TopDownAnalyzerFacadeForJS.kt:94)
        at org.jetbrains.kotlin.ir.backend.js.ModulesStructure$runAnalysis$1.invoke(klib.kt:534)
        at org.jetbrains.kotlin.ir.backend.js.ModulesStructure$runAnalysis$1.invoke(klib.kt:533)
        at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:115)
        at org.jetbrains.kotlin.ir.backend.js.ModulesStructure.runAnalysis(klib.kt:533)
        at org.jetbrains.kotlin.ir.backend.js.PrepareAnalyzedSourceModuleKt.prepareAnalyzedSourceModule(prepareAnalyzedSourceModule.kt:30)
        at org.jetbrains.kotlin.ir.backend.js.PrepareAnalyzedSourceModuleKt.prepareAnalyzedSourceModule$default(prepareAnalyzedSourceModule.kt:17)
        at org.jetbrains.kotlin.cli.js.K2JsIrCompiler.processSourceModule(K2JsIrCompiler.kt:427)
        at org.jetbrains.kotlin.cli.js.K2JsIrCompiler.doExecute(K2JsIrCompiler.kt:273)
        at org.jetbrains.kotlin.cli.js.K2JSCompiler.doExecute(K2JSCompiler.java:181)
        at org.jetbrains.kotlin.cli.js.K2JSCompiler.doExecute(K2JSCompiler.java:72)
        at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:104)
        at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:48)
        at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:101)
        at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1523)
        at jdk.internal.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:360)
        at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)
        at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:712)
        at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
        at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:587)
        at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:828)
        at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:705)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
        at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:704)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.Throwable: Rewrite at slice LEXICAL_SCOPE key: ANNOTATION_ENTRY old value: org.jetbrains.kotlin.resolve.scopes.LexicalScope$Base@69226573@1763861875 new value: org.jetbrains.kotlin.resolve.scopes.LexicalScope$Base@640fdfad@1678761901
<File name: Service.kt, Physical: true>
<ELEMENT>@KVService</ELEMENT>
interface IAddressService {
    suspend fun getAddressList(search: String?, types: String, sort: Sort): List<Address>
    suspend fun addAddress(address: Address): Address
    suspend fun updateAddress(address: Address): Address
    suspend fun deleteAddress(id: Int): Boolean
}
It seems to be already reported: https://github.com/google/ksp/issues/1591
👍 2
6 Views