Skip to content
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

Fix settings constructor backward compatibility issue #214

Conversation

Arkatufus
Copy link
Contributor

@Arkatufus Arkatufus commented Apr 19, 2021

Closes #212

@@ -72,7 +80,25 @@ public class SerializerOptions
internal readonly List<Func<string, string>> CrossFrameworkPackageNameOverrides =
DefaultPackageNameOverrides();

public SerializerOptions(bool versionTolerance = false, bool preserveObjectReferences = false, IEnumerable<Surrogate> surrogates = null, IEnumerable<ValueSerializerFactory> serializerFactories = null, IEnumerable<Type> knownTypes = null, bool ignoreISerializable = false, IEnumerable<Func<string, string>> packageNameOverrides = null)
[Obsolete]
public SerializerOptions(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the old constructor, added back in for backward compatibility issue.
New constructor broke backward compatibility because it was called using reflection and Activator class.

Copy link
Member

Choose a reason for hiding this comment

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

IMHO, this is part of the problem with using optional parameters everywhere - very difficult to properly version the constructor when that happens. That's a design we inherited, but we might want to rethink that.

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

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

Can you add an Akka.NET integration test that verifies that Hyperion can be loaded correctly inside Akka.Serialization.Hyperion? Might be worth adding a new test project for that purpose.

@Arkatufus
Copy link
Contributor Author

Will do

@@ -0,0 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk">
Copy link
Member

Choose a reason for hiding this comment

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

Probably need to have this reference common.props

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point.

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

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

LGTM

@Aaronontheweb Aaronontheweb merged commit 8d6bffd into akkadotnet:dev Apr 19, 2021
This was referenced Apr 19, 2021
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.

Hyperion 0.10.0 breaks akka.net compatibility
2 participants