You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CDK Pipelines allows users to write their own classes, implementing an interface, that slot into the CDK Pipelines framework. The slightly odd thing is that it requires them to extend one class and implement an unrelated interface:
When the step.produceAction method finally gets invoked, the Java Runtime doesn't know how to deserialize the ProduceActionOptions struct:
Error: Cannot construct instance of `software.amazon.awscdk.pipelines.ProduceActionOptions` (no Creators, like default constructor, exist): abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information
Upon object creation, it seems the runtime is not aware of the interface:
When extending a "jsii well-known type", additional jsii interfaces
implemented were not registered with the kernel, because of a flaw in
how interface discovery works. The `@Jsii` annotation is `@Inherited`,
meaning that a sub-class of an annotated type is annotated (this is
desirable)... However, this means the fact the annotation is present on
a type does not imply it _is_ a "jsii well-known type"... Instead, we
must check whether the annotation is _declared_ by the current type (if
not, then the annotation is inherited from a parent class).
Fixes#2951
When extending a "jsii well-known type", additional jsii interfaces
implemented were not registered with the kernel, because of a flaw in
how interface discovery works. The `@Jsii` annotation is `@Inherited`,
meaning that a sub-class of an annotated type is annotated (this is
desirable)... However, this means the fact the annotation is present on
a type does not imply it _is_ a "jsii well-known type"... Instead, we
must check whether the annotation is _declared_ by the current type (if
not, then the annotation is inherited from a parent class).
Fixes#2951
---
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
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
🐛 Bug Report
Affected Languages
TypeScript
orJavascript
Python
Java
C#
,F#
, ...)Go
General Information
What is the problem?
(Originally reported as aws/aws-cdk#15791)
CDK Pipelines allows users to write their own classes, implementing an interface, that slot into the CDK Pipelines framework. The slightly odd thing is that it requires them to extend one class and implement an unrelated interface:
When the
step.produceAction
method finally gets invoked, the Java Runtime doesn't know how to deserialize theProduceActionOptions
struct:Upon object creation, it seems the runtime is not aware of the interface:
Repro: https://github.com/rix0rrr/jsii-repro
The text was updated successfully, but these errors were encountered: