Skip to content

Introduced SerializerBuilder and LanguageDeserializerBuilder #77

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

Merged
merged 7 commits into from
Apr 22, 2025

Conversation

enikao
Copy link
Contributor

@enikao enikao commented Apr 17, 2025

No description provided.

@enikao enikao requested review from dslmeinte and JojoEffect April 17, 2025 18:14
Copy link

github-actions bot commented Apr 17, 2025

Test Results

3 017 tests   3 010 ✅  3s ⏱️
    1 suites      7 💤
    1 files        0 ❌

Results for commit 1ca8ab6.

♻️ This comment has been updated with latest results.

@enikao enikao changed the title introduced SerializerBuilder and LanguageDeserializerBuilder draft: introduced SerializerBuilder and LanguageDeserializerBuilder Apr 22, 2025
@enikao enikao changed the title draft: introduced SerializerBuilder and LanguageDeserializerBuilder Introduced SerializerBuilder and LanguageDeserializerBuilder Apr 22, 2025
@@ -123,6 +123,9 @@ DynamicLanguage[] DeserializeExternalLanguage(LionWebVersions lionWebVersion, st
SerializationChunk serializationChunk =
JsonUtils.ReadJsonFromString<SerializationChunk>(
File.ReadAllText($"chunks/externalDefs/{lionWebVersion.VersionString}/{name}.json"));
return new LanguageDeserializer(lionWebVersion, compressedIdConfig: new(KeepOriginal: true))
return new LanguageDeserializerBuilder()
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the advantage of using the Builder Pattern over using a configuration object (with reasonable effective defaults)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a question for @JojoEffect -- seems to be more C#-ish.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think one reason is that the Microsoft text editor can kinda handle auto-completion for methods, but mostly fails on anything more complex, like property initializers.

@enikao enikao merged commit 8869def into main Apr 22, 2025
2 checks passed
@enikao enikao deleted the niko/serializer-builder branch April 22, 2025 19:20
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.

2 participants