ZacSweers / MoshiX

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

Fallback adapter type's primary constructor can only have a Moshi parameter #549

Closed overfullstack closed 1 month ago

overfullstack commented 5 months ago

A Test to replicate this

I am not able to run this test as I get this error.

e: file:///Users/gopala.akshintala/code-clones/my-github/my-lab/moshi/src/test/kotlin/ga/overfullstack/adapter/MessageTest.kt:32:3 Fallback adapter type's primary constructor can only have a Moshi parameter

I took this example from moshix-sealed sample. But I get the same error when I paste this test in moshi-kotlin-tests and execute it

ZacSweers commented 5 months ago

Can you paste the stacktrace of the error you're referring to?

overfullstack commented 5 months ago

@ZacSweers this is the only stacktrace I find, even with running the test with --stacktrace. Is there anyway I can debug the plugin code?

e: file:///Users/gopala.akshintala/code-clones/my-github/my-lab/moshi/src/test/kotlin/ga/overfullstack/adapter/MessageTest.kt:32:3 Fallback adapter type's primary constructor can only have a Moshi parameter

To ruleout the possibility of any setup issue on my repository, I copy pasted the same test into MoshiX repository, right in this package: moshi-kotlin-tests and you should be able to reproduce the issue.