Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Fix polymorphic serialization #2414

Merged
merged 2 commits into from
Feb 20, 2023
Merged

Conversation

Karlatemp
Copy link
Member

@Karlatemp Karlatemp commented Jan 3, 2023

根据 kotlin serialization 实现

remapped 的 serializer.descriptor 应该直接使用原本的 descriptior

否则 polymorphic deserialization 会出现 unknown field 'type'

参考:

https://github.com/Kotlin/kotlinx.serialization/blob/33104957873448189eb242413646b58883623e0a/formats/json/commonMain/src/kotlinx/serialization/json/internal/TreeJsonDecoder.kt#L243-L250

@Karlatemp Karlatemp added t:bug 类型: bug M 优先级: 主要 s:core 子系统: mirai-core labels Jan 3, 2023
@Karlatemp Karlatemp force-pushed the serialization-descriptor branch 2 times, most recently from 37d5988 to b3adaa4 Compare January 3, 2023 06:58
@Him188 Him188 self-requested a review January 17, 2023 11:37
@Him188 Him188 added this to the 2.15 milestone Jan 17, 2023
@Him188
Copy link
Member

Him188 commented Jan 17, 2023

是 2.14 regression 吗

@Karlatemp
Copy link
Member Author

no

@Nambers

This comment was marked as outdated.

@Him188 Him188 modified the milestones: 2.15, 2.15.0-RC Jan 18, 2023
@Him188 Him188 added the z:ready-to-merge 状态: PR 已经可以合并, 正在等待一些安排 label Feb 3, 2023
@Karlatemp Karlatemp removed the z:ready-to-merge 状态: PR 已经可以合并, 正在等待一些安排 label Feb 6, 2023
@Karlatemp Karlatemp force-pushed the serialization-descriptor branch from b3adaa4 to 0f366c7 Compare February 14, 2023 16:37
@Karlatemp
Copy link
Member Author

@Nambers

1ea68d8

PR 已经跑通了,我也不知道为啥会爆这个错,当时也忘记确定版本了,可能是没 include 或者因为别的原因
总之 PR 无此方面的修改也跑通了

@Nambers

This comment was marked as resolved.

@Karlatemp Karlatemp added the z:ready-to-merge 状态: PR 已经可以合并, 正在等待一些安排 label Feb 15, 2023
@Him188
Copy link
Member

Him188 commented Feb 19, 2023

@Karlatemp This branch has conflicts that must be resolved

@Karlatemp Karlatemp force-pushed the serialization-descriptor branch from 0f366c7 to 231e4d8 Compare February 20, 2023 10:46
@Him188
Copy link
Member

Him188 commented Feb 20, 2023

为什么会触发 Check Publishing 呢, 看起来你没有修改 build.gradle.kts 和 buildSrc

@Karlatemp Karlatemp force-pushed the serialization-descriptor branch from 231e4d8 to 3ba53ee Compare February 20, 2023 14:09
@Karlatemp Karlatemp merged commit 3ba53ee into dev Feb 20, 2023
@Karlatemp Karlatemp deleted the serialization-descriptor branch February 20, 2023 14:09
@Karlatemp Karlatemp temporarily deployed to github-pages February 20, 2023 14:10 — with GitHub Pages Inactive
@Him188 Him188 removed this from the 2.15.0-RC milestone Mar 11, 2023
@Him188 Him188 added this to the 2.15.0-M1 milestone Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
M 优先级: 主要 s:core 子系统: mirai-core t:bug 类型: bug z:ready-to-merge 状态: PR 已经可以合并, 正在等待一些安排
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants