-
-
Notifications
You must be signed in to change notification settings - Fork 485
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
15.1.0 EnsureRoundTrip no longer works without tag mapping and protected default constructors #901
Comments
I'll take a look at them now. These shouldn't have been affected at all. While I look into this, can you send me an example of the yaml your using? |
Ok, found the issues. I've also adjusted the tests to include the 4 different types of constructors, internal, private, protected and public. I'll get a new version out today hopefuly. |
Fixed #901 - private constructor and tag issue +semver:fix
A fix for this issue has been released in version 15.1.1. |
All our tests are passing now and the behavior seems to be back to how it was. Thanks a lot! |
Describe the bug
When trying out the new release I encountered two problems with my project.
EnsureRoundtrip()
does not work if I use a tag mapping for each class, but it worked before. Why do I need a tag mapping if the type can be resolved through the object graph?EnablePrivateConstructors()
used to enable protected constructors as well. Now I have to use private or public constructorsTo Reproduce
This works in 13.7.1, but not in 15.1.0:
.WithTagMapping(new TagName("!Test"), typeof(TestClass))
does fix the problem, but that doesn't help for existing yaml files.These are very breaking changes and make backwards compability impossible. For each class I serialize, I'd have to add a type mapping and make the constructor private instead of protected. Is there any solution I don't know about?
The text was updated successfully, but these errors were encountered: