Skip to content

Does someone know how to debug Compiler Plugins? #132

Answered by orchestr7
orchestr7 asked this question in Q&A
Discussion options

You must be logged in to vote

@bishiboosh FYI: Leonid, an author of kotlinx.serialization has given an awesome answer here

At least this can help. This is how primitive decoding look like, I love this code. Finally I have understood the logic of generated code:

@NotNull
public InlineDecoderTest.Color deserialize(@NotNull Decoder decoder) {
  Intrinsics.checkNotNullParameter(decoder, "decoder");
  SerialDescriptor var2 = this.getDescriptor();
  boolean var3 = true;
  int var5 = 0;
  long var6 = 0L;
  CompositeDecoder var8 = decoder.beginStructure(var2);
  if (var8.decodeSequentially()) {
     var6 = var8.decodeLongElement(var2, 0);
     var5 |= 1;
  } else {
     while(var3) {
        int var4 = var8.decodeElementIndex…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@orchestr7
Comment options

orchestr7 Mar 25, 2022
Maintainer Author

@orchestr7
Comment options

orchestr7 Mar 25, 2022
Maintainer Author

@bishiboosh
Comment options

Comment options

orchestr7
Mar 28, 2022
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by orchestr7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #131 on March 25, 2022 08:23.