Open vpeurala opened 2 years ago
The same problem when running Gradle from command line:
`
Task :compileTestKotlinJs FAILED e: java.lang.IllegalStateException: P is not found when encode the signature of public open fun mysticfall.kotlin.react.test.ReactTestSupport.render(mockFactory: (react.ReactElement
) -> kotlin.Any, block: react.RBuilder.() -> kotlin.Unit): mysticfall.kotlin.react.test.TestRenderer defined in mysticfall.kotlin.react.test.ReactTestSupport[DeserializedSimpleFunctionDescriptor@7a1b49f5]. at org.jetbrains.kotlin.js.naming.EncodeSignatureKt$encodeSignature$typeParameterNamer$1.invoke(encodeSignature.kt:37) at org.jetbrains.kotlin.js.naming.EncodeSignatureKt$encodeSignature$typeParameterNamer$1.invoke(encodeSignature.kt:34) at org.jetbrains.kotlin.js.naming.EncodeSignatureKt.encodeForSignature(encodeSignature.kt:90) at org.jetbrains.kotlin.js.naming.EncodeSignatureKt.encodeForSignature(encodeSignature.kt:132) at org.jetbrains.kotlin.js.naming.EncodeSignatureKt.encodeForSignature(encodeSignature.kt:106) at org.jetbrains.kotlin.js.naming.EncodeSignatureKt.encodeForSignature(encodeSignature.kt:132) at org.jetbrains.kotlin.js.naming.EncodeSignatureKt.encodeForSignature(encodeSignature.kt:106) at org.jetbrains.kotlin.js.naming.EncodeSignatureKt.encodeSignature(encodeSignature.kt:60) at org.jetbrains.kotlin.js.naming.NameSuggestion$Companion.mangleRegularNameIfNecessary$mangledAndStable(NameSuggestion.kt:282) at org.jetbrains.kotlin.js.naming.NameSuggestion$Companion.mangleRegularNameIfNecessary(NameSuggestion.kt:302) at org.jetbrains.kotlin.js.naming.NameSuggestion$Companion.mangleNameIfNecessary(NameSuggestion.kt:262) at org.jetbrains.kotlin.js.naming.NameSuggestion$Companion.access$mangleNameIfNecessary(NameSuggestion.kt:225) at org.jetbrains.kotlin.js.naming.NameSuggestion.generateDefault(NameSuggestion.kt:204) at org.jetbrains.kotlin.js.naming.NameSuggestion.generate(NameSuggestion.kt:147) at org.jetbrains.kotlin.js.naming.NameSuggestion.suggest(NameSuggestion.kt:69) at org.jetbrains.kotlin.js.resolve.diagnostics.JsNameClashChecker.suggestAllPossibleNames(JsNameClashChecker.kt:135) at org.jetbrains.kotlin.js.resolve.diagnostics.JsNameClashChecker.collect(JsNameClashChecker.kt:196) at org.jetbrains.kotlin.js.resolve.diagnostics.JsNameClashChecker.collect(JsNameClashChecker.kt:184) at org.jetbrains.kotlin.js.resolve.diagnostics.JsNameClashChecker.getScope(JsNameClashChecker.kt:177) at org.jetbrains.kotlin.js.resolve.diagnostics.JsNameClashChecker.checkDescriptor(JsNameClashChecker.kt:94) at org.jetbrains.kotlin.js.resolve.diagnostics.JsNameClashChecker.check(JsNameClashChecker.kt:57) at org.jetbrains.kotlin.resolve.ModifiersChecker$ModifiersCheckingProcedure.runDeclarationCheckers(ModifiersChecker.java:285) at org.jetbrains.kotlin.resolve.ModifiersChecker$ModifiersCheckingProcedure.checkModifierListCommon(ModifiersChecker.java:224) at org.jetbrains.kotlin.resolve.ModifiersChecker$ModifiersCheckingProcedure.checkModifiersForDeclaration(ModifiersChecker.java:183) at org.jetbrains.kotlin.resolve.DeclarationsChecker.process(DeclarationsChecker.kt:95) at org.jetbrains.kotlin.resolve.BodyResolver.resolveBodies(BodyResolver.java:258) at org.jetbrains.kotlin.resolve.LazyTopDownAnalyzer.analyzeDeclarations(LazyTopDownAnalyzer.kt:227) at org.jetbrains.kotlin.resolve.LazyTopDownAnalyzer.analyzeDeclarations$default(LazyTopDownAnalyzer.kt:58) at org.jetbrains.kotlin.js.analyze.AbstractTopDownAnalyzerFacadeForJS.analyzeFilesWithGivenTrace(TopDownAnalyzerFacadeForJS.kt:140) at org.jetbrains.kotlin.js.analyze.AbstractTopDownAnalyzerFacadeForJS.analyzeFiles(TopDownAnalyzerFacadeForJS.kt:92) at org.jetbrains.kotlin.ir.backend.js.ModulesStructure$runAnalysis$1.invoke(klib.kt:649) at org.jetbrains.kotlin.ir.backend.js.ModulesStructure$runAnalysis$1.invoke(klib.kt:648) at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:115) at org.jetbrains.kotlin.ir.backend.js.ModulesStructure.runAnalysis(klib.kt:648) at org.jetbrains.kotlin.ir.backend.js.KlibKt.prepareAnalyzedSourceModule(klib.kt:507) at org.jetbrains.kotlin.ir.backend.js.KlibKt.prepareAnalyzedSourceModule$default(klib.kt:495) at org.jetbrains.kotlin.cli.js.K2JsIrCompiler.doExecute(K2JsIrCompiler.kt:259) at org.jetbrains.kotlin.cli.js.K2JSCompiler.doExecute(K2JSCompiler.java:183) at org.jetbrains.kotlin.cli.js.K2JSCompiler.doExecute(K2JSCompiler.java:72) at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:99) at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:47) at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:101) at org.jetbrains.kotlin.incremental.IncrementalJsCompilerRunner.runCompiler(IncrementalJsCompilerRunner.kt:208) at org.jetbrains.kotlin.incremental.IncrementalJsCompilerRunner.runCompiler(IncrementalJsCompilerRunner.kt:84) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileIncrementally(IncrementalCompilerRunner.kt:373) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileIncrementally$default(IncrementalCompilerRunner.kt:318) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.rebuild(IncrementalCompilerRunner.kt:114) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileImpl(IncrementalCompilerRunner.kt:207) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:79) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile$default(IncrementalCompilerRunner.kt:69) at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execJsIncrementalCompiler(CompileServiceImpl.kt:566) at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execJsIncrementalCompiler(CompileServiceImpl.kt:101) at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1837) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) 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) `
This happens with
kotlin("js") version "1.7.20"
in build.gradle.kts:java.lang.IllegalStateException: P is not found when encode the signature of public open fun mysticfall.kotlin.react.test.ReactTestSupport.render(mockFactory: (react.ReactElement<P>) -> kotlin.Any, block: react.RBuilder.() -> kotlin.Unit): mysticfall.kotlin.react.test.TestRenderer defined in mysticfall.kotlin.react.test.ReactTestSupport[DeserializedSimpleFunctionDescriptor@7291ba6f]. at org.jetbrains.kotlin.js.naming.EncodeSignatureKt$encodeSignature$typeParameterNamer$1.invoke(encodeSignature.kt:37) at org.jetbrains.kotlin.js.naming.EncodeSignatureKt$encodeSignature$typeParameterNamer$1.invoke(encodeSignature.kt:34) at org.jetbrains.kotlin.js.naming.EncodeSignatureKt.encodeForSignature(encodeSignature.kt:90) at org.jetbrains.kotlin.js.naming.EncodeSignatureKt.encodeForSignature(encodeSignature.kt:132) at org.jetbrains.kotlin.js.naming.EncodeSignatureKt.encodeForSignature(encodeSignature.kt:106) at org.jetbrains.kotlin.js.naming.EncodeSignatureKt.encodeForSignature(encodeSignature.kt:132) at org.jetbrains.kotlin.js.naming.EncodeSignatureKt.encodeForSignature(encodeSignature.kt:106) at org.jetbrains.kotlin.js.naming.EncodeSignatureKt.encodeSignature(encodeSignature.kt:60) at org.jetbrains.kotlin.js.naming.NameSuggestion$Companion.mangleRegularNameIfNecessary$mangledAndStable(NameSuggestion.kt:282) at org.jetbrains.kotlin.js.naming.NameSuggestion$Companion.mangleRegularNameIfNecessary(NameSuggestion.kt:302) at org.jetbrains.kotlin.js.naming.NameSuggestion$Companion.mangleNameIfNecessary(NameSuggestion.kt:262) at org.jetbrains.kotlin.js.naming.NameSuggestion$Companion.access$mangleNameIfNecessary(NameSuggestion.kt:225) at org.jetbrains.kotlin.js.naming.NameSuggestion.generateDefault(NameSuggestion.kt:204) at org.jetbrains.kotlin.js.naming.NameSuggestion.generate(NameSuggestion.kt:147) at org.jetbrains.kotlin.js.naming.NameSuggestion.suggest(NameSuggestion.kt:69) at org.jetbrains.kotlin.js.resolve.diagnostics.JsNameClashChecker.suggestAllPossibleNames(JsNameClashChecker.kt:135) at org.jetbrains.kotlin.js.resolve.diagnostics.JsNameClashChecker.collect(JsNameClashChecker.kt:196) at org.jetbrains.kotlin.js.resolve.diagnostics.JsNameClashChecker.collect(JsNameClashChecker.kt:184) at org.jetbrains.kotlin.js.resolve.diagnostics.JsNameClashChecker.getScope(JsNameClashChecker.kt:177) at org.jetbrains.kotlin.js.resolve.diagnostics.JsNameClashChecker.checkDescriptor(JsNameClashChecker.kt:94) at org.jetbrains.kotlin.js.resolve.diagnostics.JsNameClashChecker.check(JsNameClashChecker.kt:57) at org.jetbrains.kotlin.resolve.ModifiersChecker$ModifiersCheckingProcedure.runDeclarationCheckers(ModifiersChecker.java:285) at org.jetbrains.kotlin.resolve.ModifiersChecker$ModifiersCheckingProcedure.checkModifierListCommon(ModifiersChecker.java:224) at org.jetbrains.kotlin.resolve.ModifiersChecker$ModifiersCheckingProcedure.checkModifiersForDeclaration(ModifiersChecker.java:183) at org.jetbrains.kotlin.resolve.DeclarationsChecker.process(DeclarationsChecker.kt:95) at org.jetbrains.kotlin.resolve.BodyResolver.resolveBodies(BodyResolver.java:258) at org.jetbrains.kotlin.resolve.LazyTopDownAnalyzer.analyzeDeclarations(LazyTopDownAnalyzer.kt:227) at org.jetbrains.kotlin.resolve.LazyTopDownAnalyzer.analyzeDeclarations$default(LazyTopDownAnalyzer.kt:58) at org.jetbrains.kotlin.js.analyze.AbstractTopDownAnalyzerFacadeForJS.analyzeFilesWithGivenTrace(TopDownAnalyzerFacadeForJS.kt:140) at org.jetbrains.kotlin.js.analyze.AbstractTopDownAnalyzerFacadeForJS.analyzeFiles(TopDownAnalyzerFacadeForJS.kt:92) at org.jetbrains.kotlin.ir.backend.js.ModulesStructure$runAnalysis$1.invoke(klib.kt:649) at org.jetbrains.kotlin.ir.backend.js.ModulesStructure$runAnalysis$1.invoke(klib.kt:648) at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:115) at org.jetbrains.kotlin.ir.backend.js.ModulesStructure.runAnalysis(klib.kt:648) at org.jetbrains.kotlin.ir.backend.js.KlibKt.prepareAnalyzedSourceModule(klib.kt:507) at org.jetbrains.kotlin.ir.backend.js.KlibKt.prepareAnalyzedSourceModule$default(klib.kt:495) at org.jetbrains.kotlin.cli.js.K2JsIrCompiler.doExecute(K2JsIrCompiler.kt:259) at org.jetbrains.kotlin.cli.js.K2JSCompiler.doExecute(K2JSCompiler.java:183) at org.jetbrains.kotlin.cli.js.K2JSCompiler.doExecute(K2JSCompiler.java:72) at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:99) at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:47) at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:101) at org.jetbrains.kotlin.incremental.IncrementalJsCompilerRunner.runCompiler(IncrementalJsCompilerRunner.kt:208) at org.jetbrains.kotlin.incremental.IncrementalJsCompilerRunner.runCompiler(IncrementalJsCompilerRunner.kt:84) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileIncrementally(IncrementalCompilerRunner.kt:373) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileIncrementally$default(IncrementalCompilerRunner.kt:318) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.rebuild(IncrementalCompilerRunner.kt:114) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileImpl(IncrementalCompilerRunner.kt:207) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:79) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile$default(IncrementalCompilerRunner.kt:69) at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execJsIncrementalCompiler(CompileServiceImpl.kt:566) at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execJsIncrementalCompiler(CompileServiceImpl.kt:101) at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1837) at jdk.internal.reflect.GeneratedMethodAccessor28.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)