-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add Hyperion surrogate option to HOCON and HyperionSerializerSetup #5158
Add Hyperion surrogate option to HOCON and HyperionSerializerSetup #5158
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor changes needed
``` | ||
|
||
Note that we do not need to declare any bindings in HOCON for this to work, and if you do, | ||
`HyperionSerializerSetup` will override the HOCON settings with the one programatically declared. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation here is excellent. Nicely done @Arkatufus
src/contrib/serializers/Akka.Serialization.Hyperion.Tests/HyperionConfigTests.cs
Show resolved
Hide resolved
src/contrib/serializers/Akka.Serialization.Hyperion.Tests/HyperionSerializerSetupSpec.cs
Show resolved
Hide resolved
/// <exception cref="ArgumentException">Raised when `known-types-provider` type doesn't implement <see cref="IKnownTypesProvider"/> interface.</exception> | ||
[Obsolete] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
||
public static HyperionSerializerSetup Create( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to provide an overload here that takes fewer arguments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other Create
static methods takes fewer arguments, but they're all marked as obsolete for backward compatibility reason and signalling the user that there is a new version of the method available.
I can't set default values for the most complete one because the compiler will complain that the method pattern will match the obsolete ones.
There is no danger with using the older methods, but you're right, it doesn't really convey that well.
Do you have any suggestion on how to deal with this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case, maybe let's not make them obsolete - treat the more "advanced" features as opt-in choices for users who need them. Have the older Create
methods with fewer constructor arguments call the new Create
method and provide some sensible defaults (i.e. null
) for the new arguments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
No description provided.