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(python): Lift the entire data class hierarchy #408

Merged
merged 1 commit into from
Mar 28, 2019

Conversation

dstufft
Copy link
Contributor

@dstufft dstufft commented Mar 28, 2019

They Python code generation was only lifting the properties of the specified data class, but it wasn't lifting the properties of all of the data classes in the inheritance tree.

We have to do that, so we'll go ahead and walk our entire interface hierarchy and build up a flat list of all of the properties, and use that list to generate our lifted properties.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@dstufft dstufft requested a review from a team as a code owner March 28, 2019 17:28
@RomainMuller RomainMuller changed the title Lift the entire data class hierarchy fix(python): Lift the entire data class hierarchy Mar 28, 2019
stack.push(...current.interfaces.map(ifc => resolver.dereference(ifc) as spec.InterfaceType));
}

// Add all of the properties of this interface to our list of properties.
Copy link
Contributor

Choose a reason for hiding this comment

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

Recursion always reads easier to me, but that's just preference

@RomainMuller RomainMuller merged commit f813620 into aws:master Mar 28, 2019
RomainMuller added a commit that referenced this pull request Mar 28, 2019
### Bug Fixes

* **kernel:** Transitively consider properties when deserializing structs ([#409](#409)) ([66789e8](66789e8))
* **python:** Lift the entire data class hierarchy ([#408](#408)) ([f813620](f813620))

### Features

* **python:** Add support for synchronous callbacks ([#407](#407)) ([4cb91b3](4cb91b3))
@RomainMuller RomainMuller mentioned this pull request Mar 28, 2019
eladb pushed a commit that referenced this pull request Mar 28, 2019
### Bug Fixes

* **kernel:** Transitively consider properties when deserializing structs ([#409](#409)) ([66789e8](66789e8))
* **python:** Lift the entire data class hierarchy ([#408](#408)) ([f813620](f813620))

### Features

* **python:** Add support for synchronous callbacks ([#407](#407)) ([4cb91b3](4cb91b3))
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.

4 participants