Skip to content

Lazily create YAML data serializers#14

Merged
penspanic merged 1 commit into
mainfrom
datra-yaml-serializer-lazy
Jul 9, 2026
Merged

Lazily create YAML data serializers#14
penspanic merged 1 commit into
mainfrom
datra-yaml-serializer-lazy

Conversation

@penspanic

Copy link
Copy Markdown
Owner

Summary

  • stop DataSerializerFactory from constructing YamlDataSerializer eagerly
  • keep YAML support intact by creating it on the first YAML serializer request
  • cover JSON-context factory lazy behavior with unit tests

Why

Tidemark's browser client uses JSON-normalized DatraRawBundle data and excludes YamlDotNet from the WASM payload. Eager construction of YamlDataSerializer caused the browser runtime to load YamlDotNet even on the JSON-only path.

Tests

  • dotnet test Datra.Tests/Datra.Tests.csproj -c Release --nologo --filter "DataSerializerFactoryTests|BundleNormalizeToJsonTests|DataModelGeneratorTests"
  • dotnet test Datra.Tests/Datra.Tests.csproj -c Release --nologo
  • dotnet build Datra.sln -c Release --nologo

@penspanic
penspanic merged commit 40458e3 into main Jul 9, 2026
1 check passed
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