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

fix(ios): handle new external vector type #337

Merged
merged 1 commit into from Apr 3, 2020

Conversation

janvennemann
Copy link
Contributor

JIRA: https://jira.appcelerator.org/browse/TIMOB-27824

The bundled clang lib in Xcode 11.4 adds a new external vector type. Our metabase parser didn't know about it and bailed out because this particular type has now encoding yet (see http://llvm.org/viewvc/llvm-project?view=revision&revision=216301).

The fix for this is two fold. First, I updated the libclang headers so our metabase parser knows about the new type CXType_ExtVector. It will fallback to treat this as unexposed, which was the previous value for this type. Due to the missing encoding for this type we can't support it right now.

Second, i added a check that handles possible future unknown types by only spitting out a warning instead of failing the whole build. Internally these types will be handled the same as unknown/unexposed types that the metabase parser is aware of.

std::map<std::string, std::string> location;
hyperloop::getSourceLocation(cursor, unionDef->getContext(), location);
std::cout << "union: " << displayName << " kind: " << kind << ", " << hyperloop::toJSON(location) << std::endl;
// std::cerr << "not handled, union: " << displayName << " kind: " << kind << std::endl;
Copy link
Contributor

Choose a reason for hiding this comment

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

If these codes are not required, please remove.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Usually i would totally agree. But I find my self frequently re-enabling all these outputs that are all over the project when debugging the metabase parser and fixing bugs / adding support for new types.

In the long run we should introduce a global debug/logging flag, but for now i would leave them as is if you don't mind.

Copy link
Contributor

@vijaysingh-axway vijaysingh-axway left a comment

Choose a reason for hiding this comment

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

CR passed.

@lokeshchdhry
Copy link
Contributor

lokeshchdhry commented Apr 3, 2020

FR Passed.

Module: 5.0.2
Xcode: 11.4

@lokeshchdhry lokeshchdhry merged commit 3fa5fb9 into tidev:master Apr 3, 2020
@janvennemann janvennemann deleted the TIMOB-27824 branch April 8, 2020 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants