jsii allows code in any language to naturally interact with JavaScript classes. It is the technology that enables the AWS Cloud Development Kit to deliver polyglot libraries from a single codebase!
JSII is unable to pick import the shared replaced module.
Expected Behavior
It should be able to pick modules using their respective absolute paths.
Current Behavior
It panics with a failed import
panic: Passed to parameter props of new xrd_apiextensionscrossplaneio.CompositeResourceDefinition: Unable to deserialize value as xrd_apiextensionscrossplaneio.CompositeResourceDefinitionProps | undefined
├── 🛑 Failing value is an object
│ { '$jsii.struct': [Object] }
╰── 🔍 Failure reason(s):
╰─ Key 'spec': Unable to deserialize value as xrd_apiextensionscrossplaneio.CompositeResourceDefinitionSpec | undefined
├── 🛑 Failing value is an object
│ { '$jsii.struct': [Object] }
╰── 🔍 Failure reason(s):
╰─ Key 'versions': Unable to deserialize value as array<xrd_apiextensionscrossplaneio.CompositeResourceDefinitionSpecVersions>
├── 🛑 Failing value is an array
│ [ [Object] ]
╰── 🔍 Failure reason(s):
╰─ Index 0: Unable to deserialize value as xrd_apiextensionscrossplaneio.CompositeResourceDefinitionSpecVersions
├── 🛑 Failing value is an object
│ { '$jsii.struct': [Object] }
╰── 🔍 Failure reason(s):
╰─ Key 'schema': Unable to deserialize value as xrd_apiextensionscrossplaneio.CompositeResourceDefinitionSpecVersionsSchema | undefined
├── 🛑 Failing value is an object
│ { '$jsii.struct': [Object] }
╰── 🔍 Failure reason(s):
╰─ Key 'openApiv3Schema': Unable to deserialize value as any | undefined
├── 🛑 Failing value is an object
│ { '$jsii.struct': [Object] }
╰── 🔍 Failure reason(s):
╰─ Module 'k8s' not found
Implement the respective module rewriting handler for go.mod.
Additional Information/Context
I'm using cdk8s specifically for codegen but not sure if it's a cdk8s issue and the respective handler should be implemented there, as well.
Can provide a sample cdk8s project, for reference and reproducibility.
I've created a separate CDK8S issue with more details regarding my cdk8s use case.
It's an issue where jsii does not generate anything for struct passed into interface{}, also not sure if it's relevant to CDK8S or jsii, but I'd like to get some form of exception, instead of completely blank synthesis.
Describe the bug
In case of a private monorepo, that uses manually rewritten module paths.
JSII is unable to pick import the shared replaced module.
Expected Behavior
It should be able to pick modules using their respective absolute paths.
Current Behavior
It panics with a failed import
Reproduction Steps
Create two golang modules
github.com/org/repo/module1
,github.com/org/repo/module2
module1
referencingmodule2
using relative pathPossible Solution
Implement the respective module rewriting handler for
go.mod
.Additional Information/Context
I'm using cdk8s specifically for codegen but not sure if it's a cdk8s issue and the respective handler should be implemented there, as well.
Can provide a sample cdk8s project, for reference and reproducibility.
I've created a separate CDK8S issue with more details regarding my cdk8s use case.
It's an issue where jsii does not generate anything for
struct
passed intointerface{}
, also not sure if it's relevant to CDK8S or jsii, but I'd like to get some form of exception, instead of completely blank synthesis.SDK version used
github.com/aws/jsii-runtime-go v1.81.0 github.com/aws/constructs-go/constructs/v10 v10.2.22
Environment details (OS name and version, etc.)
ArchLinux node.js lts-hydrogen go 1.20