Skip to content

[Reflection] Add support for imported structs with recorded fields (attempt #2) #14399

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

Merged
merged 2 commits into from
Feb 7, 2018

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Feb 3, 2018

Update IRGen to trigger generation of type metadata for foreign
struct types found in fields. And fix TypeRefBuilder to handle
the case where struct has fields but at the same time has opaque
metadata.

@xedin
Copy link
Contributor Author

xedin commented Feb 3, 2018

@swift-ci please test source compatibility

@rudkx
Copy link
Contributor

rudkx commented Feb 4, 2018

FYI, I just merged a change to XFAIL GRDB and ObjectMapper as these were failing due to earlier changes: swiftlang/swift-source-compat-suite#127

@rudkx
Copy link
Contributor

rudkx commented Feb 4, 2018

@xedin Can you add reduced test cases for the two failures that showed up in the source compatibility suite from the earlier attempt at landing this? https://forums.swift.org/t/source-compatibility-bots-in-bad-shape/9526

@xedin
Copy link
Contributor Author

xedin commented Feb 4, 2018

Absolutely! I am just trying to re-run and figure out what is going on...

@xedin
Copy link
Contributor Author

xedin commented Feb 4, 2018

@rudkx this run only got GRDB and ObjectMapper, but I haven’t changed anything in my commit...

@xedin
Copy link
Contributor Author

xedin commented Feb 4, 2018

@swift-ci please test source compatibility

@xedin
Copy link
Contributor Author

xedin commented Feb 4, 2018

@rudkx I don’t know what is going on by it looks like compat suite passed with my commit and no changes...

@rudkx
Copy link
Contributor

rudkx commented Feb 4, 2018

@xedin Interesting. It's a bit of a coincidence those failures were related to metadata and some illegal IR. I suppose we can land again and see what happens...

@xedin
Copy link
Contributor Author

xedin commented Feb 4, 2018

Let me try to re-run couple more times, and see if this is going to make any difference...

@xedin
Copy link
Contributor Author

xedin commented Feb 4, 2018

@swift-ci please test source compatibility

3 similar comments
@xedin
Copy link
Contributor Author

xedin commented Feb 4, 2018

@swift-ci please test source compatibility

@xedin
Copy link
Contributor Author

xedin commented Feb 4, 2018

@swift-ci please test source compatibility

@xedin
Copy link
Contributor Author

xedin commented Feb 5, 2018

@swift-ci please test source compatibility

@xedin
Copy link
Contributor Author

xedin commented Feb 5, 2018

Last time and if everything is fine I'm going to merge this back in.

@xedin
Copy link
Contributor Author

xedin commented Feb 6, 2018

Looks like it’s green again, going to merge

@xedin
Copy link
Contributor Author

xedin commented Feb 6, 2018

@swift-ci please smoke test and merge

@xedin xedin force-pushed the field-desc-for-imported-structs-2.0 branch from 0ff9338 to d262dbe Compare February 6, 2018 02:42
@xedin
Copy link
Contributor Author

xedin commented Feb 6, 2018

@swift-ci please test source compatibility

@xedin xedin force-pushed the field-desc-for-imported-structs-2.0 branch from d262dbe to e2474ea Compare February 6, 2018 23:50
xedin added 2 commits February 6, 2018 15:50
Update IRGen to trigger generation of type metadata for foreign
struct types found in fields. And fix TypeRefBuilder to handle
the case where struct has fields but at the same time has opaque
metadata.
@xedin xedin force-pushed the field-desc-for-imported-structs-2.0 branch from e2474ea to 8f05d64 Compare February 6, 2018 23:51
@xedin
Copy link
Contributor Author

xedin commented Feb 6, 2018

@swift-ci please test source compatibility

@xedin
Copy link
Contributor Author

xedin commented Feb 7, 2018

@swift-ci please smoke test

@xedin
Copy link
Contributor Author

xedin commented Feb 7, 2018

@rudkx @jckarter So the problem with original PR was that it was recursing to much into the foreign types, it failed only in optimization enabled builds and because it was re-writing ImportedStructs while iterating it, which I fixed. So please let me know if you guys are okay with the changes.

@jckarter
Copy link
Contributor

jckarter commented Feb 7, 2018

SGTM!

Copy link
Contributor

@rudkx rudkx left a comment

Choose a reason for hiding this comment

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

👍🏻

@xedin xedin merged commit 6cf1aa3 into swiftlang:master Feb 7, 2018
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.

3 participants