-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(kernel): "any" serialization breaks private type instances (#1347)
When a "private" type (aka a class that is not visible in the `.jsii` assembly) is passed from JS to Host through an `any`-typed entity, the value was serialized by-value, passing only the instance's properties, and omitting any methods. This changes the behavior of the `SerializationClass.Any` serializer, so that when an anonymous object is encountered, if it has a dynamic getter, setter or any method (including a constructor), it is passed by-reference instead of by-value. Fixes aws/aws-cdk#6746
- Loading branch information
1 parent
d5f6b5f
commit 655adeb
Showing
6 changed files
with
96 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Python jsii runtime tests | ||
## Development Iteration | ||
|
||
When iterating on the jsii runtime for Python, the develomer must run | ||
`yarn build` before making a subsequent attempt at running `pytest` (e.g: via | ||
`yarn test`). This is because the tests run on the code installed in `.env` and | ||
this is updated only by `yarn build`. | ||
|
||
Note also that stack traces from test failures will point to the `.env` tree, | ||
so be careful when using IDE linkage to navigate to points of that trace. |