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

Add Hyperion surrogate option to HOCON and HyperionSerializerSetup #5158

Merged
merged 7 commits into from
Jul 28, 2021

Conversation

Arkatufus
Copy link
Contributor

No description provided.

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.

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.
Copy link
Member

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

/// <exception cref="ArgumentException">Raised when `known-types-provider` type doesn't implement <see cref="IKnownTypesProvider"/> interface.</exception>
[Obsolete]
Copy link
Member

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(
Copy link
Member

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?

Copy link
Contributor Author

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?

Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@Aaronontheweb Aaronontheweb enabled auto-merge (squash) July 28, 2021 15:57
@Aaronontheweb Aaronontheweb merged commit 620ef56 into akkadotnet:dev Jul 28, 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.

2 participants