Skip to content

Support inheritance with surrogates #1213

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

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

Conversation

mgravell
Copy link
Member

@mgravell mgravell commented Jul 12, 2025

Fixes #1051

Function changes:

  • inheritance + surrogates can now be combined
  • emit dll re-enabled on net9+
  • new option on compile-options to force "long" jumps

Cleanup needed:

  • regression inheritance + surrogate + interface; decide how to respond
  • possible protoc drift (tests only)
  • CI may need net9
  • release notes
  • check behaviour of non-root deserialize (where payload is not explicitly the subclass, or example: empty stream)
  • do we need type-targeted operator invoke? I think that might be trivial now
  • check "helper" type flags are correct for static class (I "fixed" them when investigating the rtspecialname runtime change, probably in error)
  • consider back-compat drift; v2 impl kinda does the wrong thing and can double-serialize data - probably combination of inheritance+surrogates not fully considered in v2

Future work:

  • protogen for low-effort AOT?

@mgravell
Copy link
Member Author

Preview available in 3.3.0-g6785ecbb35 on nuget

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.

Protobuf-net v3 with surrogate and inheritance hierarchies
1 participant