-
Notifications
You must be signed in to change notification settings - Fork 246
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
Missing imports in generated Python code #1809
Labels
Comments
RomainMuller
added
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
p1
labels
Jul 22, 2020
RomainMuller
added a commit
that referenced
this issue
Jul 22, 2020
When a keyword argument was obtained from the super-interface of some struct, imports required to bring the inherited properties' types in scope were not emitted due to lack of traversing the struct hierarchies. Fixes #1809
RomainMuller
added a commit
that referenced
this issue
Jul 22, 2020
When a keyword argument was obtained from the super-interface of some struct, imports required to bring the inherited properties' types in scope were not emitted due to lack of traversing the struct hierarchies. Fixes #1809
RomainMuller
added a commit
that referenced
this issue
Jul 22, 2020
struct, imports required to bring the inherited properties' types in scope were not emitted due to lack of traversing the struct hierarchies. The fix is tested by introducing a method that accepts a kwargs-liftable argument that extends another struct. Without this fix, tests in `@jsii/python-runtime` would fail due to being unable to load any of the modules. A test that expressedly leverages this new class and method was however introduced for good measure. Fixes #1809
RomainMuller
added a commit
that referenced
this issue
Jul 22, 2020
When a keyword argument was obtained from the super-interface of some struct, imports required to bring the inherited properties' types in scope were not emitted due to lack of traversing the struct hierarchies. The fix is tested by introducing a method that accepts a kwargs-liftable argument that extends another struct. Without this fix, tests in `@jsii/python-runtime` would fail due to being unable to load any of the modules. A test that expressedly leverages this new class and method was however introduced for good measure. Fixes #1809
mergify bot
pushed a commit
that referenced
this issue
Jul 22, 2020
When a keyword argument was obtained from the super-interface of some struct, imports required to bring the inherited properties' types in scope were not emitted due to lack of traversing the struct hierarchies. The fix is tested by introducing a method that accepts a kwargs-liftable argument that extends another struct. Without this fix, tests in `@jsii/python-runtime` would fail due to being unable to load any of the modules. A test that expressedly leverages this new class and method was however introduced for good measure. Fixes #1809 --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
🐛 Bug Report
Affected Languages
TypeScript
orJavascript
Python
Java
C#
,F#
, ...)General Information
What is the problem?
When kwargs are lifted from a struct that has parent interfaces, the imports for parent interfaces are not collected and thus are missing from the generated code, potentially rendering it invalid.
This is the root cause of aws/aws-cdk#9052
The text was updated successfully, but these errors were encountered: