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

Migrate remaining text-serializer-gson serializers to use TypeAdapters #373

Merged
merged 22 commits into from
Sep 4, 2021

Conversation

emilyy-dev
Copy link
Contributor

@emilyy-dev emilyy-dev requested a review from kashike May 20, 2021 03:13
@emilyy-dev emilyy-dev marked this pull request as ready for review May 21, 2021 04:31
@emilyy-dev emilyy-dev requested a review from kashike May 21, 2021 04:32
@emilyy-dev emilyy-dev marked this pull request as draft May 21, 2021 04:36
@emilyy-dev emilyy-dev marked this pull request as ready for review May 21, 2021 05:06
@emilyy-dev emilyy-dev requested a review from kashike June 1, 2021 20:54
Signed-off-by: emilyy-dev <35617540+emilyy-dev@users.noreply.github.com>
Copy link
Member

@zml2008 zml2008 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this (and sorry for taking so long to get to reviewing)!

I'd rather you request TypeAdapter instances via a Gson instance in each adapter's constructor, rather than using static fields, at least where possible. That allows doing fun tricks with swapping out one adapter for another.

Second -- I've recently tossed in some wiring for JMH benchmarking. Would you be willing to set up some basic test cases for a before/after comparison? You should be able to use ComponentCompactionBenchmark in the api submodule as a reference for that.

Provide the active `Gson` instance and fetch its registered adapters

Signed-off-by: emilyy-dev <35617540+emilyy-dev@users.noreply.github.com>
Signed-off-by: emilyy-dev <35617540+emilyy-dev@users.noreply.github.com>
Signed-off-by: emilyy-dev <35617540+emilyy-dev@users.noreply.github.com>
@zml2008 zml2008 added this to the 4.9.0 milestone Aug 15, 2021
Signed-off-by: emilyy-dev <35617540+emilyy-dev@users.noreply.github.com>
@emilyy-dev emilyy-dev marked this pull request as draft August 24, 2021 18:27
Other misc changes

Signed-off-by: emilyy-dev <35617540+emilyy-dev@users.noreply.github.com>
@emilyy-dev emilyy-dev marked this pull request as ready for review September 3, 2021 20:12
Copy link
Member

@zml2008 zml2008 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ComponentSerializerImpl and StyleSerializer classes are definitely a touch messier than we'd like, but that's unavoidable I think. Thank you for pushing this through to the finish line!

@zml2008 zml2008 closed this in 0dde0b6 Sep 4, 2021
@zml2008 zml2008 merged commit 0dde0b6 into KyoriPowered:master Sep 4, 2021
@zml2008 zml2008 self-assigned this Sep 4, 2021
@zml2008 zml2008 linked an issue Sep 4, 2021 that may be closed by this pull request
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate remaining text-serializer-gson serializers to use TypeAdapters
3 participants