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

[c++] Remove duplicated code in DynamicParser #737

Merged

Conversation

ara-ayvazyan
Copy link
Contributor

No description provided.

@ara-ayvazyan ara-ayvazyan requested a review from chwarr November 28, 2017 17:30
@@ -522,6 +491,13 @@ class DynamicParser
else
return detail::BasicTypeField(id, schema<Unknown>::type::metadata, type, BindUnknownField(transform), _input);
}


void ReadFieldEndBegin(BondDataType& type, uint16_t& id)
Copy link
Member

Choose a reason for hiding this comment

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

ReadSubsequentField?

// 2) We parsed only part of the hierarchy because that was what
// the transform "expected".
//
// In both cases we emit remaining fields as unknown
Copy link
Member

Choose a reason for hiding this comment

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

There's a bug here that we probably should fix before refactoring. If we're parsing and we detect that we're in an unexpected hierarchy depth, that should cause serialization--and perhaps other transforms--to fail.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why do you think that needs to be fixed before this change? Also won't the fix likely be in detail::ParserInheritance?

Copy link
Member

Choose a reason for hiding this comment

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

Take a look at issue #742 for the details of the problem.

@chwarr chwarr merged commit 9edf0a4 into microsoft:master Dec 13, 2017
@ara-ayvazyan ara-ayvazyan deleted the compilation/remove_duplicate_code branch December 13, 2017 21:10
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