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(dontet): excessive overrides generated #3355

Merged
merged 2 commits into from
Jan 31, 2022
Merged

Conversation

RomainMuller
Copy link
Contributor

A mis-understanding of the jsii specification early on was carried over
in the .NET code generators until now, which caused all methods and
properties that are overrides (of other JS implementations) to result in
jsii overrides being registered by the runtime.

This behavior caused unnecessary round-trips between the .NET CLR and
the node sidekick process, which affected the performance of .NET
bindings (unnecessary round-trips with JSON encoding aren't free), and
had a tendency to hit obscure edge case bugs in the jsii kernel's Ser/De
behavior.

This PR removes all isOverride: true declarations from generated .NET
code and neutralizes the behavior of specifying it to be true.
User-defined overrides (.NET code overriding JS code) continue to work
as they previously did (the isOverride attribute should simply not
have existed, ever).


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

A mis-understanding of the jsii specification early on was carried over
in the .NET code generators until now, which caused all methods and
properties that are overrides (of other JS implementations) to result in
jsii overrides being registered by the runtime.

This behavior caused unnecessary round-trips between the .NET CLR and
the node sidekick process, which affected the performance of .NET
bindings (unnecessary round-trips with JSON encoding aren't free), and
had a tendency to hit obscure edge case bugs in the jsii kernel's Ser/De
behavior.

This PR removes all `isOverride: true` declarations from generated .NET
code and neutralizes the behavior of specifying it to be true.
User-defined overrides (.NET code overriding JS code) continue to work
as they previously did (the `isOverride` attribute should simply not
have existed, ever).
@RomainMuller RomainMuller added the language/dotnet Related to .NET bindings (C#, F#, ...) label Jan 31, 2022
@RomainMuller RomainMuller requested a review from a team January 31, 2022 10:32
@RomainMuller RomainMuller self-assigned this Jan 31, 2022
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jan 31, 2022
@mergify
Copy link
Contributor

mergify bot commented Jan 31, 2022

Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it!

@mergify mergify bot added the pr/ready-to-merge This PR is ready to be merged. label Jan 31, 2022
@mergify
Copy link
Contributor

mergify bot commented Jan 31, 2022

Merging (with squash)...

@mergify mergify bot merged commit 5460d66 into main Jan 31, 2022
@mergify mergify bot deleted the rmuller/dotnet-overrides branch January 31, 2022 17:13
@mergify mergify bot removed the pr/ready-to-merge This PR is ready to be merged. label Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS. language/dotnet Related to .NET bindings (C#, F#, ...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants