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

cdktf compatibility #135

Closed
mike-seagull opened this issue Aug 8, 2023 · 2 comments
Closed

cdktf compatibility #135

mike-seagull opened this issue Aug 8, 2023 · 2 comments
Assignees
Labels
help wanted Extra attention is needed kind/bug Something isn't working

Comments

@mike-seagull
Copy link

I'm trying to use the module with cdktf but I'm getting errors when calling cdktf get to generate the cdk contructs:

NOTE: Temp directory retained due to an error: /tmp/temp-rYawex
Error: jsii compilation failed with non-zero exit code: 1
  | [2023-08-07T17:40:49.119] [ERROR] jsii/compiler - Compilation errors prevented the JSII assembly from being created
  | warning JSII6: A "peerDependency" on "constructs" at "10.2.69" means you should take a "devDependency" on "constructs" at "10.2.69" (found "undefined")
  | warning JSII6: A "peerDependency" on "cdktf" at "0.17.3" means you should take a "devDependency" on "cdktf" at "0.17.3" (found "undefined")
  | warning JSII3: There is no "README.md" file. It is required in order to generate valid PyPI (Python) packages.
  | modules/k3s.ts:5:1 - error JSII5015: Interface "k3s.K3SConfig" re-declares member "dependsOn". This is not supported as it results in invalid C#.
  |   5 export interface K3SConfig extends TerraformModuleUserConfig {
  |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  |   6   /**
  |     ~~~~~
  | ... 
  |  80   readonly useSudo?: boolean;
  |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  |  81 }
  |     ~
  | modules/k3s.ts:87:14 - error JSII8000: Type names must be PascalCased. Rename "K3S" to "K3s"
  | 87 export class K3S extends TerraformModule {
  |                 ~~~
  | modules/k3s.ts:128:14 - error TS2611: 'dependsOn' is defined as a property in class 'TerraformModule', but is overridden here in 'K3S' as an accessor.
  | 128   public get dependsOn(): any | undefined {
  |                  ~~~~~~~~~
  +----------------------------------------------------------------------------------
  | Command: /home/linuxbrew/.linuxbrew/Cellar/cdktf/0.17.3/libexec/lib/node_modules/cdktf-cli/node_modules/jsii/bin/jsii --silence-warnings reserved-word
  | Workdir: /tmp/temp-rYawex
  +----------------------------------------------------------------------------------
    at p (/home/linuxbrew/.linuxbrew/Cellar/cdktf/0.17.3/libexec/lib/node_modules/cdktf-cli/bundle/bin/cmds/handlers.js:51:1581)
    at ChildProcess.<anonymous> (/home/linuxbrew/.linuxbrew/Cellar/cdktf/0.17.3/libexec/lib/node_modules/cdktf-cli/bundle/bin/cmds/handlers.js:54:112)
    at Object.onceWrapper (node:events:629:26)
    at ChildProcess.emit (node:events:514:28)
    at ChildProcess.emit (node:domain:489:12)
    at ChildProcess._handle.onexit (node:internal/child_process:294:12)
⠦ downloading and generating modules and providers...
Error: jsii compilation failed with non-zero exit code: 1
  | [2023-08-07T17:40:49.119] [ERROR] jsii/compiler - Compilation errors prevented the JSII assembly from being created
  | warning JSII6: A "peerDependency" on "constructs" at "10.2.69" means you should take a "devDependency" on "constructs" at "10.2.69" (found "undefined")
  | warning JSII6: A "peerDependency" on "cdktf" at "0.17.3" means you should take a "devDependency" on "cdktf" at "0.17.3" (found "undefined")
  | warning JSII3: There is no "README.md" file. It is required in order to generate valid PyPI (Python) packages.
  | modules/k3s.ts:5:1 - error JSII5015: Interface "k3s.K3SConfig" re-declares member "dependsOn". This is not supported as it results in invalid C#.
  |   5 export interface K3SConfig extends TerraformModuleUserConfig {
  |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  |   6   /**
  |     ~~~~~
  | ... 
  |  80   readonly useSudo?: boolean;
  |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  |  81 }
  |     ~
  | modules/k3s.ts:87:14 - error JSII8000: Type names must be PascalCased. Rename "K3S" to "K3s"
  | 87 export class K3S extends TerraformModule {
  |                 ~~~
  | modules/k3s.ts:128:14 - error TS2611: 'dependsOn' is defined as a property in class 'TerraformModule', but is overridden here in 'K3S' as an accessor.
  | 128   public get dependsOn(): any | undefined {
  |                  ~~~~~~~~~
  +----------------------------------------------------------------------------------
  | Command: /home/linuxbrew/.linuxbrew/Cellar/cdktf/0.17.3/libexec/lib/node_modules/cdktf-cli/node_modules/jsii/bin/jsii --silence-warnings reserved-word
  | Workdir: /tmp/temp-rYawex
@mike-seagull mike-seagull changed the title cdktf cdktf compatibility Aug 8, 2023
@xunleii xunleii added the kind/bug Something isn't working label Aug 16, 2023
@xunleii xunleii self-assigned this Aug 16, 2023
@xunleii
Copy link
Owner

xunleii commented Aug 16, 2023

Hi @mike-seagull, thanks for opening this issue.

This is the first I've heard of this project, so I'm not sure what I'm going to say 😅.

I think the dependsOn generated by converting depends_on (snake case) into pascal case. For now, I will not change this variable name because of breaking changes (I need to improve how I manage this project before because it's not well maintained 🫤)
For the second one (modules/k3s.ts:87:14 - error JSII8000: Type names must be PascalCased. Rename "K3S" to "K3s"), I can't do anything.

I'll try cdktf but not right away (I don't have enough time to do it), so I'll let you know when it's done.

Of course, any help on this subject will be greatly appreciated 😄

@xunleii xunleii added the help wanted Extra attention is needed label Aug 16, 2023
@xunleii
Copy link
Owner

xunleii commented Nov 11, 2023

I haven't had enough time (and patience) to find a solution to this issue.
If anyone wants to try and solve it, I'd be grateful... but for now, I'm closing this issue.

@xunleii xunleii closed this as completed Nov 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants