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

Typeless supports interface and abstract #1078

Merged
merged 5 commits into from
Oct 26, 2020
Merged

Typeless supports interface and abstract #1078

merged 5 commits into from
Oct 26, 2020

Conversation

neuecc
Copy link
Member

@neuecc neuecc commented Oct 8, 2020

Fixes #970

@neuecc neuecc requested a review from AArnott October 9, 2020 00:01
@neuecc
Copy link
Member Author

neuecc commented Oct 9, 2020

I've found DynamicObjectResolver does not ignore abstract type.
Therefore, the following changes have been made.

- if (ti.IsInterface)
+ if (ti.IsInterface || ti.IsAbstract)

Until now, ContractlessStandardResolver has been able to serialize the abstract class (but not deserialize it).
Therefore, it's a breaking change, but I don't think it was intended to work.

@neuecc
Copy link
Member Author

neuecc commented Oct 9, 2020

what reason of test exec failed?

@AArnott
Copy link
Collaborator

AArnott commented Oct 17, 2020

what reason of test exec failed?

From the failed test step in the PR build:

The active test run was aborted. Reason: Test host process crashed : Process is terminating due to StackOverflowException.

That should presumably be reproducible through a local test run. If not, I can update the Azure Pipeline YAML with some updates from my Library.Template repo that includes collection of crash dump files so you can analyze an AzP test process crash locally on your machine.
Let me know how your investigation goes.

@neuecc
Copy link
Member Author

neuecc commented Oct 22, 2020

thanks, I've found stackoverflow.
I'll fix it.

@neuecc
Copy link
Member Author

neuecc commented Oct 22, 2020

@AArnott
dddacef
ExpandoObjectFormatter.Serialize causes recurssive get formatter when typeless scenario.
I've inlined serialize method.

and I found TypelessObjectResolver does not use cache.
In addition, I added cache as well.
ccc02ab

@neuecc
Copy link
Member Author

neuecc commented Oct 22, 2020

unity build was stalled but other tests completed successfully.

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.

Unable to serialize interface types using contractless or typeless
2 participants