Skip to content

fix(mastodon): preserve paging type under R8 - #2486

Merged
Tlaster merged 1 commit into
masterfrom
fix/mastodon-r8-serialization
Sep 4, 2026
Merged

fix(mastodon): preserve paging type under R8#2486
Tlaster merged 1 commit into
masterfrom
fix/mastodon-r8-serialization

Conversation

@Tlaster

@Tlaster Tlaster commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Mark MastodonPaging<T> with @Serializable.
  • Reuse kotlinx serialization's consumer keep rule to retain the model's generic Signature in R8 full mode.

Root cause

Ktorfit reads the response element type from MastodonPaging<T> at runtime. R8 removed that generic signature, leaving TypeData.typeArgs empty and causing NoSuchElementException: List is empty in the Mastodon converter.

Verification

  • ./gradlew :social:mastodon:jvmTest --console=plain
  • ./gradlew :app:assembleRelease --console=plain
  • Inspected the release DEX and confirmed MastodonPaging<T> retains dalvik.annotation.Signature.
  • Installed the release APK on the emulator and confirmed the Mastodon timeline loads without the previous error.

Mark MastodonPaging serializable so kotlinx serialization's consumer rule retains its generic Signature for Ktorfit TypeData in R8 full mode.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-04T10:55:04.351191Z 9e2517c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Tlaster
Tlaster merged commit e1c4662 into master Sep 4, 2026
7 of 8 checks passed
@Tlaster
Tlaster deleted the fix/mastodon-r8-serialization branch September 4, 2026 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant