Skip to content

Serialize BCL values without reflection - #579

Merged
Eli Pinkerton (wallstop) merged 3 commits into
mainfrom
session-228-wproto-stdlib-shapes
Aug 26, 2026
Merged

Serialize BCL values without reflection#579
Eli Pinkerton (wallstop) merged 3 commits into
mainfrom
session-228-wproto-stdlib-shapes

Conversation

@wallstop

@wallstop Eli Pinkerton (wallstop) commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Why: Common framework values still fell back to reflection under IL2CPP.

What:

  • Add compatible DateTime, TimeSpan, Guid, and decimal formats
  • Cover roots, members, collections, maps, and generic contracts
  • Verify both protobuf-net oracle versions and Unity 6000

Refs #399
Refs #343


Note

Medium Risk
Changes serialization wire compatibility and facade resolution for common save-game types; behavior is heavily tested against protobuf-net but any custom DateTime formatter override must still satisfy root-marshal rules.

Overview
Adds reflection-free WallstopProto support for DateTime, TimeSpan, Guid, and decimal, using protobuf-net’s BCL wire shapes so bytes match both oracle majors (2.4.9 and 3.2.56).

Runtime: New WProtoBcl formatters plus root marshals register with the existing built-in bootstrap. WProtoFacade routes BCL roots through the root wrapper; generic/member paths treat these as last-wins scalars (not merged sub-messages) and omit default TimeSpan/Guid/decimal like protobuf-net, while still writing DateTime.MinValue when needed.

Generator: Shape resolves the four types via WProtoFormatterProvider; DateTimeOffset stays WPROTO003. Map keys may use the supported BCL types.

Tests & docs: BclDifferentialTests and expanded generator contracts pin oracle parity, golden hex, map keys, malformed payloads, and generic Box<T> closures; changelog and serialization docs list the new built-ins.

Reviewed by Cursor Bugbot for commit 2250c7c. Bugbot is set up for automated code reviews on this repo. Configure here.

Copilot AI lite review requested due to automatic review settings August 26, 2026 16:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings August 26, 2026 17:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@wallstop
Eli Pinkerton (wallstop) merged commit 4bb8dae into main Aug 26, 2026
39 of 43 checks passed
@wallstop
Eli Pinkerton (wallstop) deleted the session-228-wproto-stdlib-shapes branch August 26, 2026 18:11
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