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(compiler): missing extended struct fields for some imported JSII interfaces #3982

Merged
merged 5 commits into from
Aug 28, 2023

Conversation

MarkMcCulloh
Copy link
Contributor

Fixes #3716

The core of this change is to make sure that when importing an interface, the type itself is registered before importing the types that it extends. Previously it was the opposite way.
I will say that I'm not sure why this works, the previous implementation makes more sense to me 🤷

No tests were added because I was not able to replicate the issue in other JSII libs other than cdk8s-plus-27 so I wasn't sure that it's worthwhile to add an additional package just to test this. We also don't have a fixture system for JSII testing.

Misc:

  • Made sure the imported (actual) interfaces also get their extended properties. Not sure if this was intentionally left out before

By submitting this pull request, I confirm that my contribution is made under the terms of the Wing Cloud Contribution License.

@Chriscbr
Copy link
Contributor

Chriscbr commented Aug 28, 2023

We also don't have a fixture system for JSII testing.

Do we have an issue for this / can we add one?

I'd be okay adding cdk8s-plus-27 as a dependency in our example suite for now just so we can have some kind of test. I think the tests we have for our compiler are more useful (reliable?) than its implementation honestly 🤣

@mergify
Copy link
Contributor

mergify bot commented Aug 28, 2023

Thanks for contributing, @MarkMcCulloh! This PR will now be added to the merge queue, or immediately merged if mark/fix-import-struct is up-to-date with main and the queue is empty.

@mergify mergify bot merged commit 353b660 into main Aug 28, 2023
11 checks passed
@mergify mergify bot deleted the mark/fix-import-struct branch August 28, 2023 20:55
@monadabot
Copy link
Contributor

Congrats! 🚀 This was released in Wing 0.26.7.

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.

JSII importer doesn't include base struct members?
3 participants