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.implements(IDependable)
class CompositeDependable:
def __init__(self):
super().__init__()
self.dependables = []
@property
def dependency_roots(self) -> List[IDependable]:
ret: IDependable = []
for dep in self.dependables:
if isinstance(dep, IDependable):
ret.extend(dep.dependency_roots)
else:
raise TypeError("All dependables must implement IDependable")
return ret
def add(self, dep: IDependable) -> None:
self.dependables.append(dep)
When I run cdk synth I get this error
jsii.errors.JavaScriptError:
@jsii/kernel.RuntimeError: Error: [object Object] does not implement IDependable. Use "Dependable.implement()" to implement
at Kernel._Kernel_ensureSync (/private/var/folders/dj/6xj1cj8d7vngc7vs39vg5xn40000gr/T/tmp8uxt9v8p/lib/program.js:10487:23)
at Kernel.invoke (/private/var/folders/dj/6xj1cj8d7vngc7vs39vg5xn40000gr/T/tmp8uxt9v8p/lib/program.js:9851:102)
at KernelHost.processRequest (/private/var/folders/dj/6xj1cj8d7vngc7vs39vg5xn40000gr/T/tmp8uxt9v8p/lib/program.js:11691:36)
at KernelHost.run (/private/var/folders/dj/6xj1cj8d7vngc7vs39vg5xn40000gr/T/tmp8uxt9v8p/lib/program.js:11651:22)
at Immediate._onImmediate (/private/var/folders/dj/6xj1cj8d7vngc7vs39vg5xn40000gr/T/tmp8uxt9v8p/lib/program.js:11652:46)
at process.processImmediate (node:internal/timers:476:21)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/patelhpr/.pyenv/versions/3.10.9/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Users/patelhpr/.pyenv/versions/3.10.9/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/Volumes/workplace/Connected-mobility-solution-on-aws/source/modules/acdp/backstage/cdk/source/app.py", line 55, in <module>
app.synth()
File "/Volumes/workplace/Connected-mobility-solution-on-aws/source/modules/acdp/backstage/cdk/.venv/lib/python3.10/site-packages/aws_cdk/__init__.py", line 21164, in synth
return typing.cast(_CloudAssembly_c693643e, jsii.invoke(self, "synth", [options]))
File "/Volumes/workplace/Connected-mobility-solution-on-aws/source/modules/acdp/backstage/cdk/.venv/lib/python3.10/site-packages/jsii/_kernel/__init__.py", line 149, in wrapped
return _recursize_dereference(kernel, fn(kernel, *args, **kwargs))
File "/Volumes/workplace/Connected-mobility-solution-on-aws/source/modules/acdp/backstage/cdk/.venv/lib/python3.10/site-packages/jsii/_kernel/__init__.py", line 407, in invoke
return _callback_till_result(self, response, InvokeResponse)
File "/Volumes/workplace/Connected-mobility-solution-on-aws/source/modules/acdp/backstage/cdk/.venv/lib/python3.10/site-packages/jsii/_kernel/__init__.py", line 267, in _callback_till_result
response = kernel.sync_complete(response.cbid, None, result, response_type)
File "/Volumes/workplace/Connected-mobility-solution-on-aws/source/modules/acdp/backstage/cdk/.venv/lib/python3.10/site-packages/jsii/_kernel/__init__.py", line 445, in sync_complete
return self.provider.sync_complete(
File "/Volumes/workplace/Connected-mobility-solution-on-aws/source/modules/acdp/backstage/cdk/.venv/lib/python3.10/site-packages/jsii/_kernel/providers/process.py", line 403, in sync_complete
resp = self._process.send(_CompleteRequest(complete=request), response_type)
File "/Volumes/workplace/Connected-mobility-solution-on-aws/source/modules/acdp/backstage/cdk/.venv/lib/python3.10/site-packages/jsii/_kernel/providers/process.py", line 342, in send
raise RuntimeError(resp.error) from JavaScriptError(resp.stack)
RuntimeError: Error: [object Object] does not implement IDependable. Use "Dependable.implement()" to implement
Expected Behavior
jsii should recognize this as a valid IDependable implementation
Current Behavior
jsii does not recognize it as an IDependable and throws an error
Reproduction Steps
Use the code given above in a cdk stack and run cdk synth.
Possible Solution
No response
Additional Information/Context
No response
SDK version used
cdk version 2.115.0
Environment details (OS name and version, etc.)
MacOS 14.2.1
The text was updated successfully, but these errors were encountered:
Describe the bug
I am trying to create a python implementation of this function mentioned here in cdk. (https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-ec2/lib/vpc.ts#L2293)
When I run cdk synth I get this error
Expected Behavior
jsii should recognize this as a valid IDependable implementation
Current Behavior
jsii does not recognize it as an IDependable and throws an error
Reproduction Steps
Use the code given above in a cdk stack and run cdk synth.
Possible Solution
No response
Additional Information/Context
No response
SDK version used
cdk version 2.115.0
Environment details (OS name and version, etc.)
MacOS 14.2.1
The text was updated successfully, but these errors were encountered: