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
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.
yuriy-yarosh
changed the title
jsii doesn't handle module rewrites for rewritten modules
go: jsii doesn't handle local module replacements for private monorepo modules
May 13, 2023
I don't think it's all about monorepo's - I've switched to a single private go module and JSII still unable to find the k8s imported package.
yuriy-yarosh
changed the title
go: jsii doesn't handle local module replacements for private monorepo modules
go: jsii doesn't handle module imports for private modules
May 14, 2023
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
The text was updated successfully, but these errors were encountered: