Skip to content

Typeless supports interface and abstract#1078

Merged
neuecc merged 5 commits intomasterfrom
improve-typeless
Oct 26, 2020
Merged

Typeless supports interface and abstract#1078
neuecc merged 5 commits intomasterfrom
improve-typeless

Conversation

@neuecc
Copy link
Copy Markdown
Member

@neuecc neuecc commented Oct 8, 2020

Fixes #970

@neuecc neuecc requested a review from AArnott October 9, 2020 00:01
@neuecc
Copy link
Copy Markdown
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
Copy Markdown
Member Author

neuecc commented Oct 9, 2020

what reason of test exec failed?

@AArnott
Copy link
Copy Markdown
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
Copy Markdown
Member Author

neuecc commented Oct 22, 2020

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

@neuecc
Copy link
Copy Markdown
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
Copy Markdown
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