ZacSweers / MoshiX

Extensions for Moshi including IR plugins, moshi-sealed, and more.
Apache License 2.0
515 stars 37 forks source link

Support KSP 1.4.20-dev-experimental-20201222 #70

Closed ursusursus closed 3 years ago

ursusursus commented 3 years ago
e: java.lang.NoSuchMethodError: com.google.devtools.ksp.processing.CodeGenerator$DefaultImpls.createNewFile$default(Lcom/google/devtools/ksp/processing/CodeGenerator;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Ljava/io/OutputStream;
    at dev.zacsweers.moshix.ksp.KotlinPoetSpKt.writeTo(KotlinPoetSp.kt:133)
    at dev.zacsweers.moshix.ksp.JsonClassSymbolProcessor.process(JsonClassSymbolProcessor.kt:105)
    at com.google.devtools.ksp.AbstractKotlinSymbolProcessingExtension.doAnalysis(KotlinSymbolProcessingExtension.kt:112)
    at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(TopDownAnalyzerFacadeForJVM.kt:116)
    at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$default(TopDownAnalyzerFacadeForJVM.kt:93)
    at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:557)
    at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:83)
    at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:115)
    at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.analyze(KotlinToJVMBytecodeCompiler.kt:548)
    at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:192)
    at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli$default(KotlinToJVMBytecodeCompiler.kt:162)
    at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:169)
    at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:52)
    at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:88)
    at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:44)
    at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:98)
    at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1560)
    at sun.reflect.GeneratedMethodAccessor97.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
    at sun.rmi.transport.Transport$1.run(Transport.java:200)
    at sun.rmi.transport.Transport$1.run(Transport.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

Trying to get a minimal example going

buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        ...
        classpath "com.google.devtools.ksp:symbol-processing:1.4.20-dev-experimental-20201222"
    }
}
apply plugin: "kotlin"
apply plugin: "symbol-processing"

dependencies {
    implementation "com.squareup.moshi:moshi:1.11.0"
    ksp "dev.zacsweers.moshix:moshi-ksp:0.6.1"
}

Any clue what is this about? I'm on Windows btw

ZacSweers commented 3 years ago

What version of KSP are you using?

ursusursus commented 3 years ago

1.4.20-dev-experimental-20201222

ZacSweers commented 3 years ago

As mentioned in its release notes, it has breaking changes that consumers of will need to recompile again. You'll need to wait for the next moshix release

ursusursus commented 3 years ago

Which one is the last moshix works with?

ZacSweers commented 3 years ago

These are always detailed in the repo changelog. Please keep questions to the discussion section of the repo rather than the issue tracker

ursusursus commented 3 years ago

I don't follow. Which repo, google's one?

// Oh there is a discussion section on github, that's news to me, sorry

ZacSweers commented 3 years ago

This one: https://github.com/ZacSweers/MoshiX/blob/main/CHANGELOG.md

Again, please take one-off questions from here on to the discussions section.

ZacSweers commented 3 years ago

Implemented on main, will be in the next release