I had some manual serializers written for some Gro...
# serialization
v
I had some manual serializers written for some Groovy classes of a library. Now this library ported their code over to Kotlin. I adapted the serializers to the changes like some new fields on the way and some nullability changes. But now I get on the
@Serializer(forClass = ...)
annotations:
Copy code
Cannot generate external serializer 'FooSerializer': class 'Foo' is defined in another module
😞 Anything I can do about that?
a
how many classes do you want to handle?
v
Seven. But actually it seems to be a false-positive in the IDE. It actually works fine.
Maybe because the IDE plugin is 1.8.0 but it is in an 1.7.20 project unless Gradle updates the embedded Kotlin to 1.8
The issue you link to seems to be unrelated also, it is a completely different message than what IntelliJ says and that also happens with the serializer in the same module and also it is about automatic external serializers while I have a manual custom serializer.
Ok, forget it, the
@Serializer(forClass = ...)
annotations were superfluous anyway. No idea why I added them back then. But as I do complete manual serializer, they have no effect anyway as far as I understood. I just removed them and it still works perfectly fine. 🙂
Thanks for being my rubber duck 🙂
a
ahh okay, good you found it, and my pleasure rubber duck
it was this comment that caught my eye in the issue I linked
External automatic serializers generation is in many ways experimental feature for now, and due to its complexity, it has many bugs beside this one.