diff --git a/packages/@jsii/python-runtime/src/jsii/_kernel/providers/process.py b/packages/@jsii/python-runtime/src/jsii/_kernel/providers/process.py index 7d6a100008..4e7f619383 100644 --- a/packages/@jsii/python-runtime/src/jsii/_kernel/providers/process.py +++ b/packages/@jsii/python-runtime/src/jsii/_kernel/providers/process.py @@ -23,6 +23,7 @@ from ...__meta__ import __jsii_runtime_version__ import importlib.resources +from ..._stack_trace import capture_stack_trace from ..._utils import memoized_property from .base import BaseProvider from ..types import ( @@ -321,6 +322,11 @@ def send( self, request: KernelRequest, response_type: Type[KernelResponse] ) -> KernelResponse: req_dict = self._serializer.unstructure(request) + + stack_trace = capture_stack_trace() + if stack_trace is not None: + req_dict["$jsii.stacktrace"] = stack_trace + data = json.dumps(req_dict, default=jdefault).encode("utf8") # Send our data, ensure that it is framed with a trailing \n diff --git a/packages/@jsii/python-runtime/src/jsii/_stack_trace.py b/packages/@jsii/python-runtime/src/jsii/_stack_trace.py new file mode 100644 index 0000000000..fc03549bb6 --- /dev/null +++ b/packages/@jsii/python-runtime/src/jsii/_stack_trace.py @@ -0,0 +1,31 @@ +import os +import traceback +from typing import List, Optional + +_INTERNAL_PREFIXES = (os.path.dirname(os.path.abspath(__file__)) + os.sep,) + + +def capture_stack_trace() -> Optional[List[List]]: + """Capture the current Python stack trace, filtered to user frames only. + + Returns a list of [file, line, column, function] tuples suitable for + sending over the jsii wire protocol, or None if stack trace capture + is disabled via the JSII_HOST_STACK_TRACES environment variable. + + Frames are ordered most-recent-first (matching V8 Error.stack convention). + """ + if os.environ.get("JSII_HOST_STACK_TRACES", "").lower() not in ("1", "true", "yes"): + return None + + frames = traceback.extract_stack() + result = [] + + for frame in frames: + if any(frame.filename.startswith(prefix) for prefix in _INTERNAL_PREFIXES): + continue + if frame.filename.startswith("<"): + continue + result.append([frame.filename, frame.lineno, 0, frame.name]) + + result.reverse() + return result if result else None diff --git a/packages/@jsii/python-runtime/tests/test_compliance.py b/packages/@jsii/python-runtime/tests/test_compliance.py index 243137007a..09d3707daa 100644 --- a/packages/@jsii/python-runtime/tests/test_compliance.py +++ b/packages/@jsii/python-runtime/tests/test_compliance.py @@ -19,6 +19,7 @@ AsyncVirtualMethods, Bell, Calculator, + HostStackTraceReader, ClassWithPrivateConstructorAndAutomaticProperties, ConfusingToJackson, ConsumerCanRingBell, @@ -1411,3 +1412,27 @@ def test_custom_named_submodule_types_resolve(): # Create an instance to verify the type works end-to-end through the kernel reflector = Reflector() assert reflector is not None + + +def test_host_stack_trace_is_passed_to_kernel(monkeypatch): + monkeypatch.setenv("JSII_HOST_STACK_TRACES", "1") + trace = HostStackTraceReader.captured_trace() + assert trace is not None + assert len(trace) > 0 + # Each frame should be [file, line, column, function] + for frame in trace: + assert len(frame) == 4 + + +def test_host_stack_trace_contains_test_file(monkeypatch): + monkeypatch.setenv("JSII_HOST_STACK_TRACES", "1") + trace = HostStackTraceReader.captured_trace() + assert trace is not None + files = [frame[0] for frame in trace] + assert any("test_compliance" in f for f in files) + + +def test_host_stack_trace_not_passed_when_disabled(monkeypatch): + monkeypatch.delenv("JSII_HOST_STACK_TRACES", raising=False) + trace = HostStackTraceReader.captured_trace() + assert trace is None diff --git a/packages/@jsii/python-runtime/tests/test_stack_trace.py b/packages/@jsii/python-runtime/tests/test_stack_trace.py new file mode 100644 index 0000000000..b114f0e3c4 --- /dev/null +++ b/packages/@jsii/python-runtime/tests/test_stack_trace.py @@ -0,0 +1,72 @@ +import os +import pytest + +from jsii._stack_trace import capture_stack_trace + + +@pytest.fixture(autouse=True) +def disable_stack_traces(): + """Ensure each test starts with stack traces disabled.""" + os.environ["JSII_HOST_STACK_TRACES"] = "" + + +class TestCaptureStackTrace: + def test_returns_none_when_disabled(self): + assert capture_stack_trace() is None + + def test_returns_frames_when_enabled(self): + os.environ["JSII_HOST_STACK_TRACES"] = "1" + result = capture_stack_trace() + assert result is not None + assert len(result) > 0 + + def test_frame_format(self): + os.environ["JSII_HOST_STACK_TRACES"] = "true" + result = capture_stack_trace() + assert result is not None + for frame in result: + assert len(frame) == 4 + file, line, col, fn = frame + assert isinstance(file, str) + assert isinstance(line, int) + assert isinstance(col, int) + assert isinstance(fn, str) + assert col == 0 + + def test_most_recent_frame_first(self): + os.environ["JSII_HOST_STACK_TRACES"] = "yes" + + def outer(): + def inner(): + return capture_stack_trace() + + return inner() + + result = outer() + assert result is not None + function_names = [frame[3] for frame in result] + inner_idx = function_names.index("inner") + outer_idx = function_names.index("outer") + assert inner_idx < outer_idx + + def test_filters_jsii_internal_frames(self): + os.environ["JSII_HOST_STACK_TRACES"] = "1" + result = capture_stack_trace() + assert result is not None + jsii_dir = os.path.dirname(os.path.abspath(os.path.dirname(__file__))) + for frame in result: + assert not frame[0].startswith(os.path.join(jsii_dir, "jsii") + os.sep) + + def test_filters_synthetic_frames(self): + os.environ["JSII_HOST_STACK_TRACES"] = "1" + result = capture_stack_trace() + assert result is not None + for frame in result: + assert not frame[0].startswith("<") + + def test_this_file_appears_in_frames(self): + os.environ["JSII_HOST_STACK_TRACES"] = "1" + result = capture_stack_trace() + assert result is not None + files = [frame[0] for frame in result] + assert any(__file__ in f for f in files) diff --git a/packages/@jsii/runtime/README.md b/packages/@jsii/runtime/README.md index 2c0caf2d6d..0c172c8432 100644 --- a/packages/@jsii/runtime/README.md +++ b/packages/@jsii/runtime/README.md @@ -15,6 +15,63 @@ See [STDIN/STDOUT protocol](./lib/in-out.ts) and [@jsii/kernel API](https://github.com/aws/jsii/blob/main/packages/@jsii/kernel/lib/api.ts) for details. +## Host Stack Traces + +When using jsii from a non-JavaScript language (Python, Java, Go, .NET), stack +traces captured inside the kernel refer to JavaScript frames, which are not +useful to end users. The **host stack trace** feature allows language runtimes to +capture a stack trace on the host side and send it to the kernel, so that +downstream consumers (such as the AWS CDK) can report meaningful traces in the +user's language. + +### Enabling + +Set the environment variable `JSII_HOST_STACK_TRACES=1` to opt in. When +disabled (the default), no stack traces are captured and no additional data is +sent over the wire. + +### Wire protocol + +When enabled, the host runtime attaches a `$jsii.stacktrace` field to any +request sent to the kernel: + +```json +{ + "api": "create", + "fqn": "aws-cdk-lib.Stack", + "args": [], + "$jsii.stacktrace": [ + ["my_app/my_stack.py", 42, 0, "MyStack.__init__"], + ["app.py", 12, 0, ""] + ] +} +``` + +Each frame is a tuple of `[file, line, column, function]`: + +| Field | Type | Description | +|----------|--------|-------------------------------------------------------| +| file | string | Source file path (relative or absolute) | +| line | number | 1-indexed line number | +| column | number | 0-indexed column (0 if unavailable) | +| function | string | Qualified function name (e.g. `MyStack.__init__`) | + +Frames are ordered most-recent-first (matching V8 `Error.stack` convention). + +### Kernel-side contract + +The kernel extracts the `$jsii.stacktrace` field and stores it in a well-known +global before dispatching the request: + +```js +globalThis[Symbol.for('jsii.context.hostStackTrace')] +``` + +This global is set before the kernel method executes and cleared immediately +after. JavaScript code running inside the kernel (e.g., CDK construct libraries) +can read this global to obtain the host-side stack trace without depending on any +jsii package. + ## License __jsii__ is distributed under the diff --git a/packages/@jsii/runtime/lib/host.ts b/packages/@jsii/runtime/lib/host.ts index 9e9b5f79c0..3ecc939314 100644 --- a/packages/@jsii/runtime/lib/host.ts +++ b/packages/@jsii/runtime/lib/host.ts @@ -10,6 +10,8 @@ import { EventEmitter } from 'events'; import { Input, IInputOutput } from './in-out'; +const HOST_STACK_TRACE_SYMBOL = Symbol.for('jsii.context.hostStackTrace'); + export class KernelHost { private readonly kernel = new Kernel(this.callbackHandler.bind(this)); private readonly eventEmitter = new EventEmitter(); @@ -123,6 +125,9 @@ export class KernelHost { const apiReq = req; const fn = this.findApi(apiReq.api); + const hostTrace = (req as any)['$jsii.stacktrace']; + (global as any)[HOST_STACK_TRACE_SYMBOL] = hostTrace ?? undefined; + try { const ret = fn.call(this.kernel, req); @@ -139,6 +144,7 @@ export class KernelHost { this.debug('processing pending promises before responding'); setImmediate(() => { + (global as any)[HOST_STACK_TRACE_SYMBOL] = undefined; this.writeOkay(ret); next(); }); @@ -157,11 +163,13 @@ export class KernelHost { promise .then((val) => { this.debug('promise succeeded:', val); + (global as any)[HOST_STACK_TRACE_SYMBOL] = undefined; this.writeOkay(val); next(); }) .catch((e) => { this.debug('promise failed:', e); + (global as any)[HOST_STACK_TRACE_SYMBOL] = undefined; this.writeError(e); next(); }); @@ -172,6 +180,8 @@ export class KernelHost { this.writeOkay(ret); } catch (e: any) { this.writeError(e); + } finally { + (global as any)[HOST_STACK_TRACE_SYMBOL] = undefined; } // indicate this request was processed (synchronously). diff --git a/packages/@jsii/runtime/test/host-stack-trace.test.ts b/packages/@jsii/runtime/test/host-stack-trace.test.ts new file mode 100644 index 0000000000..a68b9514cf --- /dev/null +++ b/packages/@jsii/runtime/test/host-stack-trace.test.ts @@ -0,0 +1,74 @@ +import { KernelHost, IInputOutput, Input, Output } from '../lib'; + +const HOST_STACK_TRACE_SYMBOL = Symbol.for('jsii.context.hostStackTrace'); + +beforeEach(() => { + (global as any)[HOST_STACK_TRACE_SYMBOL] = undefined; +}); + +test('sets host stack trace on global during request processing', () => { + const trace = [ + ['my_stack.py', 42, 0, 'MyStack.__init__'], + ['app.py', 12, 0, ''], + ]; + + let capturedTrace: any = 'NOT_SET'; + + const inout = new SpyInputOutput( + [ + { + api: 'stats', + '$jsii.stacktrace': trace, + } as any, + ], + () => { + // By the time we write the response, the trace should have been set + // during processing. We capture it from the kernel's perspective via + // a spy on the output. + capturedTrace = (global as any)[HOST_STACK_TRACE_SYMBOL]; + expect(capturedTrace).toEqual(trace); + }, + ); + + const host = new KernelHost(inout, { noStack: true }); + return new Promise((ok) => { + host.once('exit', () => { + // After processing completes, the trace should be cleared + expect((global as any)[HOST_STACK_TRACE_SYMBOL]).toBeUndefined(); + ok(); + }); + host.run(); + }); +}); + +test('host stack trace is undefined when not provided in request', () => { + const inout = new SpyInputOutput([{ api: 'stats' } as any]); + + const host = new KernelHost(inout, { noStack: true }); + return new Promise((ok) => { + host.once('exit', () => { + expect((global as any)[HOST_STACK_TRACE_SYMBOL]).toBeUndefined(); + ok(); + }); + host.run(); + }); +}); + +class SpyInputOutput implements IInputOutput { + private readonly inputCommands: Input[]; + + public constructor( + inputCommands: Input[], + private readonly onWrite?: (output: Output) => void, + ) { + this.inputCommands = [...inputCommands].reverse(); + } + + public read(): Input | undefined { + return this.inputCommands.pop(); + } + + public write(obj: Output): void { + this.onWrite?.(obj); + } +} diff --git a/packages/jsii-calc/lib/host-stack-trace.ts b/packages/jsii-calc/lib/host-stack-trace.ts new file mode 100644 index 0000000000..11efed4cdf --- /dev/null +++ b/packages/jsii-calc/lib/host-stack-trace.ts @@ -0,0 +1,20 @@ +const HOST_STACK_TRACE_SYMBOL = Symbol.for('jsii.context.hostStackTrace'); + +/** + * A class that exposes the host stack trace provided by the jsii runtime. + * + * This is used for integration testing to verify that stack traces captured + * in the host language (Python, Java, Go, .NET) are correctly transmitted + * to the kernel. + */ +export class HostStackTraceReader { + /** + * Returns the current host stack trace, if one was provided by the runtime. + * + * Each frame is a tuple of [file, line, column, function]. + * Returns undefined if no host stack trace is available. + */ + public static capturedTrace(): any { + return (globalThis as any)[HOST_STACK_TRACE_SYMBOL]; + } +} diff --git a/packages/jsii-calc/lib/index.ts b/packages/jsii-calc/lib/index.ts index 16ee35a53e..7b114734be 100644 --- a/packages/jsii-calc/lib/index.ts +++ b/packages/jsii-calc/lib/index.ts @@ -33,3 +33,4 @@ export * as intersection from './intersection'; export * as homonymousForwardReferences from './homonymous'; export * as pascalCaseName from './pascal-case-name'; export * as covariantOverrides from './covariant-overrides'; +export * from './host-stack-trace'; diff --git a/packages/jsii-calc/test/assembly.jsii b/packages/jsii-calc/test/assembly.jsii index d071a8ae3c..4e5e5c749a 100644 --- a/packages/jsii-calc/test/assembly.jsii +++ b/packages/jsii-calc/test/assembly.jsii @@ -6400,6 +6400,47 @@ "name": "GreetingAugmenter", "symbolId": "lib/compliance:GreetingAugmenter" }, + "jsii-calc.HostStackTraceReader": { + "assembly": "jsii-calc", + "docs": { + "remarks": "This is used for integration testing to verify that stack traces captured\nin the host language (Python, Java, Go, .NET) are correctly transmitted\nto the kernel.", + "stability": "stable", + "summary": "A class that exposes the host stack trace provided by the jsii runtime." + }, + "fqn": "jsii-calc.HostStackTraceReader", + "initializer": { + "docs": { + "stability": "stable" + } + }, + "kind": "class", + "locationInModule": { + "filename": "lib/host-stack-trace.ts", + "line": 10 + }, + "methods": [ + { + "docs": { + "remarks": "Each frame is a tuple of [file, line, column, function].\nReturns undefined if no host stack trace is available.", + "stability": "stable", + "summary": "Returns the current host stack trace, if one was provided by the runtime." + }, + "locationInModule": { + "filename": "lib/host-stack-trace.ts", + "line": 17 + }, + "name": "capturedTrace", + "returns": { + "type": { + "primitive": "any" + } + }, + "static": true + } + ], + "name": "HostStackTraceReader", + "symbolId": "lib/host-stack-trace:HostStackTraceReader" + }, "jsii-calc.IAnonymousImplementationProvider": { "assembly": "jsii-calc", "docs": { @@ -20232,5 +20273,5 @@ "intersection-types" ], "version": "3.20.120", - "fingerprint": "4Z9hfwRyZV7xQ1T09J4YXlycIZsEwNINqk/vo0NzG08=" + "fingerprint": "373D8BWB3I93c1b0C+Cvo25vpw5EySE8XH8c0uOzVZY=" } \ No newline at end of file diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-dotnet.test.js.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-dotnet.test.js.snap index 99778630c3..3705d5cdf9 100644 --- a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-dotnet.test.js.snap +++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-dotnet.test.js.snap @@ -3300,6 +3300,7 @@ exports[`Generated code for "jsii-calc": / 1`] = ` ┃ ┃ ┃ ┣━ 📄 IConsumerProps.cs ┃ ┃ ┃ ┗━ 📄 IHomonymous.cs ┃ ┃ ┗━ 📄 NamespaceDoc.cs + ┃ ┣━ 📄 HostStackTraceReader.cs ┃ ┣━ 📄 IAnonymousImplementationProvider.cs ┃ ┣━ 📄 IAnonymouslyImplementMe.cs ┃ ┣━ 📄 IAnotherPublicInterface.cs @@ -9185,6 +9186,61 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences `; +exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/HostStackTraceReader.cs 1`] = ` +using Amazon.JSII.Runtime.Deputy; + +#pragma warning disable CS0672,CS0809,CS1591 + +namespace Amazon.JSII.Tests.CalculatorNamespace +{ + /// A class that exposes the host stack trace provided by the jsii runtime. + /// + /// This is used for integration testing to verify that stack traces captured + /// in the host language (Python, Java, Go, .NET) are correctly transmitted + /// to the kernel. + /// + [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.HostStackTraceReader), fullyQualifiedName: "jsii-calc.HostStackTraceReader")] + public class HostStackTraceReader : DeputyBase + { + public HostStackTraceReader(): base(_MakeDeputyProps()) + { + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + private static DeputyProps _MakeDeputyProps() + { + return new DeputyProps(System.Array.Empty()); + } + + /// Used by jsii to construct an instance of this class from a Javascript-owned object reference + /// The Javascript-owned object reference + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + protected HostStackTraceReader(ByRefValue reference): base(reference) + { + } + + /// Used by jsii to construct an instance of this class from DeputyProps + /// The deputy props + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + protected HostStackTraceReader(DeputyProps props): base(props) + { + } + + /// Returns the current host stack trace, if one was provided by the runtime. + /// + /// Each frame is a tuple of [file, line, column, function]. + /// Returns undefined if no host stack trace is available. + /// + [JsiiMethod(name: "capturedTrace", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}")] + public static object CapturedTrace() + { + return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.HostStackTraceReader), new System.Type[]{}, new object[]{})!; + } + } +} + +`; + exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IAnonymousImplementationProvider.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.js.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.js.snap index ba7deb6dc3..ededd0d5fa 100644 --- a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.js.snap +++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.js.snap @@ -2935,6 +2935,7 @@ exports[`Generated code for "jsii-calc": / 1`] = ` ┃ ┃ ┣━ 📄 Homonymous.go ┃ ┃ ┗━ 📄 main.go ┃ ┗━ 📄 README.md + ┣━ 📄 HostStackTraceReader.go ┣━ 📄 IAnonymousImplementationProvider.go ┣━ 📄 IAnonymouslyImplementMe.go ┣━ 📄 IAnotherPublicInterface.go @@ -8689,6 +8690,73 @@ func (g *jsiiProxy_GreetingAugmenter) BetterGreeting(friendly scopejsiicalclib.I } +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/HostStackTraceReader.go 1`] = ` +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +// A class that exposes the host stack trace provided by the jsii runtime. +// +// This is used for integration testing to verify that stack traces captured +// in the host language (Python, Java, Go, .NET) are correctly transmitted +// to the kernel. +type HostStackTraceReader interface { +} + +// The jsii proxy struct for HostStackTraceReader +type jsiiProxy_HostStackTraceReader struct { + _ byte // padding +} + +func NewHostStackTraceReader() HostStackTraceReader { + _init_.Initialize() + + j := jsiiProxy_HostStackTraceReader{} + + _jsii_.Create( + "jsii-calc.HostStackTraceReader", + nil, // no parameters + &j, + ) + + return &j +} + +func NewHostStackTraceReader_Override(h HostStackTraceReader) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.HostStackTraceReader", + nil, // no parameters + h, + ) +} + +// Returns the current host stack trace, if one was provided by the runtime. +// +// Each frame is a tuple of [file, line, column, function]. +// Returns undefined if no host stack trace is available. +func HostStackTraceReader_CapturedTrace() interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "jsii-calc.HostStackTraceReader", + "capturedTrace", + nil, // no parameters + &returns, + ) + + return returns +} + + `; exports[`Generated code for "jsii-calc": /go/jsiicalc/IAnonymousImplementationProvider.go 1`] = ` @@ -21793,6 +21861,14 @@ func init() { return &jsiiProxy_GreetingAugmenter{} }, ) + _jsii_.RegisterClass( + "jsii-calc.HostStackTraceReader", + reflect.TypeOf((*HostStackTraceReader)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_HostStackTraceReader{} + }, + ) _jsii_.RegisterInterface( "jsii-calc.IAnonymousImplementationProvider", reflect.TypeOf((*IAnonymousImplementationProvider)(nil)).Elem(), diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-java.test.js.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-java.test.js.snap index 5cddc64372..ea2294001c 100644 --- a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-java.test.js.snap +++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-java.test.js.snap @@ -4022,6 +4022,7 @@ exports[`Generated code for "jsii-calc": / 1`] = ` ┃ ┃ ┃ ┣━ 📄 ConsumerProps.java ┃ ┃ ┃ ┗━ 📄 Homonymous.java ┃ ┃ ┗━ 📄 package-info.java + ┃ ┣━ 📄 HostStackTraceReader.java ┃ ┣━ 📄 IAnonymousImplementationProvider.java ┃ ┣━ 📄 IAnonymouslyImplementMe.java ┃ ┣━ 📄 IAnotherPublicInterface.java @@ -11606,6 +11607,51 @@ public class GreetingAugmenter extends software.amazon.jsii.JsiiObject { `; +exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/HostStackTraceReader.java 1`] = ` +package software.amazon.jsii.tests.calculator; + +/** + * A class that exposes the host stack trace provided by the jsii runtime. + *

+ * This is used for integration testing to verify that stack traces captured + * in the host language (Python, Java, Go, .NET) are correctly transmitted + * to the kernel. + */ +@javax.annotation.Generated(value = "jsii-pacmak") +@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) +@software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.$Module.class, fqn = "jsii-calc.HostStackTraceReader") +public class HostStackTraceReader extends software.amazon.jsii.JsiiObject { + + protected HostStackTraceReader(final software.amazon.jsii.JsiiObjectRef objRef) { + super(objRef); + } + + protected HostStackTraceReader(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { + super(initializationMode); + } + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public HostStackTraceReader() { + super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); + software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this); + } + + /** + * Returns the current host stack trace, if one was provided by the runtime. + *

+ * Each frame is a tuple of [file, line, column, function]. + * Returns undefined if no host stack trace is available. + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public static @org.jetbrains.annotations.NotNull java.lang.Object capturedTrace() { + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.HostStackTraceReader.class, "capturedTrace", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); + } +} + +`; + exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/IAnonymousImplementationProvider.java 1`] = ` package software.amazon.jsii.tests.calculator; @@ -29694,6 +29740,7 @@ jsii-calc.FullCombo=software.amazon.jsii.tests.calculator.FullCombo jsii-calc.GiveMeStructs=software.amazon.jsii.tests.calculator.GiveMeStructs jsii-calc.Greetee=software.amazon.jsii.tests.calculator.Greetee jsii-calc.GreetingAugmenter=software.amazon.jsii.tests.calculator.GreetingAugmenter +jsii-calc.HostStackTraceReader=software.amazon.jsii.tests.calculator.HostStackTraceReader jsii-calc.IAnonymousImplementationProvider=software.amazon.jsii.tests.calculator.IAnonymousImplementationProvider jsii-calc.IAnonymouslyImplementMe=software.amazon.jsii.tests.calculator.IAnonymouslyImplementMe jsii-calc.IAnotherPublicInterface=software.amazon.jsii.tests.calculator.IAnotherPublicInterface diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.js.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.js.snap index 9ea8ca8cc8..637c3ef1a0 100644 --- a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.js.snap +++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.js.snap @@ -6177,6 +6177,31 @@ class GreetingAugmenter( return typing.cast(builtins.str, jsii.invoke(self, "betterGreeting", [friendly])) +class HostStackTraceReader( + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.HostStackTraceReader", +): + '''A class that exposes the host stack trace provided by the jsii runtime. + + This is used for integration testing to verify that stack traces captured + in the host language (Python, Java, Go, .NET) are correctly transmitted + to the kernel. + ''' + + def __init__(self) -> None: + jsii.create(self.__class__, self, []) + + @jsii.member(jsii_name="capturedTrace") + @builtins.classmethod + def captured_trace(cls) -> typing.Any: + '''Returns the current host stack trace, if one was provided by the runtime. + + Each frame is a tuple of [file, line, column, function]. + Returns undefined if no host stack trace is available. + ''' + return typing.cast(typing.Any, jsii.sinvoke(cls, "capturedTrace", [])) + + @jsii.interface(jsii_type="jsii-calc.IAnonymousImplementationProvider") class IAnonymousImplementationProvider(typing_extensions.Protocol): '''We can return an anonymous interface implementation from an override without losing the interface declarations.''' @@ -11939,6 +11964,7 @@ __all__ = [ "GiveMeStructs", "Greetee", "GreetingAugmenter", + "HostStackTraceReader", "IAnonymousImplementationProvider", "IAnonymouslyImplementMe", "IAnotherPublicInterface", @@ -17531,9 +17557,9 @@ exports[`Generated code for "jsii-calc": /python/src/js return typing.cast(builtins.str, jsii.invoke(self, "betterGreeting", [friendly])) - @jsii.interface(jsii_type="jsii-calc.IAnonymousImplementationProvider") - class IAnonymousImplementationProvider(typing_extensions.Protocol): -@@ -2969,10 +3325,13 @@ + class HostStackTraceReader( + metaclass=jsii.JSIIMeta, +@@ -2994,10 +3350,13 @@ def a(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "a")) @@ -17547,7 +17573,7 @@ exports[`Generated code for "jsii-calc": /python/src/js # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface typing.cast(typing.Any, IAnotherPublicInterface).__jsii_proxy_class__ = lambda : _IAnotherPublicInterfaceProxy -@@ -3015,10 +3374,13 @@ +@@ -3040,10 +3399,13 @@ @jsii.member(jsii_name="yourTurn") def your_turn(self, bell: "IBell") -> None: ''' @@ -17561,7 +17587,7 @@ exports[`Generated code for "jsii-calc": /python/src/js # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface typing.cast(typing.Any, IBellRinger).__jsii_proxy_class__ = lambda : _IBellRingerProxy -@@ -3043,10 +3405,13 @@ +@@ -3068,10 +3430,13 @@ @jsii.member(jsii_name="yourTurn") def your_turn(self, bell: "Bell") -> None: ''' @@ -17575,7 +17601,7 @@ exports[`Generated code for "jsii-calc": /python/src/js # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface typing.cast(typing.Any, IConcreteBellRinger).__jsii_proxy_class__ = lambda : _IConcreteBellRingerProxy -@@ -3102,10 +3467,13 @@ +@@ -3127,10 +3492,13 @@ ''' return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "mutableProperty")) @@ -17589,7 +17615,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="method") def method(self) -> None: ''' -@@ -3160,10 +3528,13 @@ +@@ -3185,10 +3553,13 @@ ''' return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "mutableProperty")) @@ -17603,7 +17629,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="method") def method(self) -> None: ''' -@@ -3205,10 +3576,13 @@ +@@ -3230,10 +3601,13 @@ def private(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "private")) @@ -17617,7 +17643,7 @@ exports[`Generated code for "jsii-calc": /python/src/js # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface typing.cast(typing.Any, IExtendsPrivateInterface).__jsii_proxy_class__ = lambda : _IExtendsPrivateInterfaceProxy -@@ -3254,10 +3628,13 @@ +@@ -3279,10 +3653,13 @@ ''' return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "mutableProperty")) @@ -17631,7 +17657,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="method") def method(self) -> None: ''' -@@ -3439,10 +3816,14 @@ +@@ -3464,10 +3841,14 @@ ) -> None: ''' :param arg1: - @@ -17646,7 +17672,7 @@ exports[`Generated code for "jsii-calc": /python/src/js # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface typing.cast(typing.Any, IInterfaceWithOptionalMethodArguments).__jsii_proxy_class__ = lambda : _IInterfaceWithOptionalMethodArgumentsProxy -@@ -3477,10 +3858,13 @@ +@@ -3502,10 +3883,13 @@ def read_write_string(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "readWriteString")) @@ -17660,7 +17686,7 @@ exports[`Generated code for "jsii-calc": /python/src/js # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface typing.cast(typing.Any, IInterfaceWithProperties).__jsii_proxy_class__ = lambda : _IInterfaceWithPropertiesProxy -@@ -3510,10 +3894,13 @@ +@@ -3535,10 +3919,13 @@ def foo(self) -> jsii.Number: return typing.cast(jsii.Number, jsii.get(self, "foo")) @@ -17674,7 +17700,7 @@ exports[`Generated code for "jsii-calc": /python/src/js # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface typing.cast(typing.Any, IInterfaceWithPropertiesExtension).__jsii_proxy_class__ = lambda : _IInterfaceWithPropertiesExtensionProxy -@@ -4033,10 +4420,13 @@ +@@ -4058,10 +4445,13 @@ def value(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "value")) @@ -17688,7 +17714,7 @@ exports[`Generated code for "jsii-calc": /python/src/js # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface typing.cast(typing.Any, IMutableObjectLiteral).__jsii_proxy_class__ = lambda : _IMutableObjectLiteralProxy -@@ -4072,19 +4462,25 @@ +@@ -4097,19 +4487,25 @@ def b(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "b")) @@ -17714,7 +17740,7 @@ exports[`Generated code for "jsii-calc": /python/src/js # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface typing.cast(typing.Any, INonInternalInterface).__jsii_proxy_class__ = lambda : _INonInternalInterfaceProxy -@@ -4117,10 +4513,13 @@ +@@ -4142,10 +4538,13 @@ def property(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "property")) @@ -17728,7 +17754,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="wasSet") def was_set(self) -> builtins.bool: return typing.cast(builtins.bool, jsii.invoke(self, "wasSet", [])) -@@ -4313,10 +4712,13 @@ +@@ -4338,10 +4737,13 @@ def mutable_property(self) -> typing.Optional[jsii.Number]: return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "mutableProperty")) @@ -17742,7 +17768,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="method") def method(self) -> None: return typing.cast(None, jsii.invoke(self, "method", [])) -@@ -4417,10 +4819,13 @@ +@@ -4442,10 +4844,13 @@ def prop(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "prop")) @@ -17756,7 +17782,7 @@ exports[`Generated code for "jsii-calc": /python/src/js class Implementation(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Implementation"): def __init__(self) -> None: -@@ -4466,10 +4871,13 @@ +@@ -4491,10 +4896,13 @@ def private(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "private")) @@ -17770,7 +17796,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.data_type( jsii_type="jsii-calc.ImplictBaseOfBase", -@@ -4487,10 +4895,15 @@ +@@ -4512,10 +4920,15 @@ ''' :param foo: - :param bar: - @@ -17786,7 +17812,7 @@ exports[`Generated code for "jsii-calc": /python/src/js "bar": bar, "goo": goo, } -@@ -4565,10 +4978,13 @@ +@@ -4590,10 +5003,13 @@ count: jsii.Number, ) -> typing.List["_scope_jsii_calc_lib_c61f082f.IDoublable"]: ''' @@ -17800,7 +17826,7 @@ exports[`Generated code for "jsii-calc": /python/src/js class Isomorphism(metaclass=jsii.JSIIAbstractClass, jsii_type="jsii-calc.Isomorphism"): '''Checks the "same instance" isomorphism is preserved within the constructor. -@@ -4673,19 +5089,25 @@ +@@ -4698,19 +5114,25 @@ def prop_a(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "propA")) @@ -17826,7 +17852,7 @@ exports[`Generated code for "jsii-calc": /python/src/js class JavaReservedWords( metaclass=jsii.JSIIMeta, -@@ -4907,10 +5329,13 @@ +@@ -4932,10 +5354,13 @@ def while_(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "while")) @@ -17840,7 +17866,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.implements(IJsii487External2, IJsii487External) class Jsii487Derived(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Jsii487Derived"): -@@ -5012,10 +5437,13 @@ +@@ -5037,10 +5462,13 @@ @builtins.classmethod def stringify(cls, value: typing.Any = None) -> typing.Optional[builtins.str]: ''' @@ -17854,7 +17880,7 @@ exports[`Generated code for "jsii-calc": /python/src/js class LevelOne(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.LevelOne"): '''Validates that nested classes get correct code generation for the occasional forward reference.''' -@@ -5045,10 +5473,13 @@ +@@ -5070,10 +5498,13 @@ class PropBooleanValue: def __init__(self, *, value: builtins.bool) -> None: ''' @@ -17868,7 +17894,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } @builtins.property -@@ -5082,10 +5513,13 @@ +@@ -5107,10 +5538,13 @@ ''' :param prop: ''' @@ -17882,7 +17908,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } @builtins.property -@@ -5120,10 +5554,13 @@ +@@ -5145,10 +5579,13 @@ ''' :param prop: ''' @@ -17896,7 +17922,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } @builtins.property -@@ -5171,10 +5608,17 @@ +@@ -5196,10 +5633,17 @@ :param cpu: The number of cpu units used by the task. Valid values, which determines your range of valid values for the memory parameter: 256 (.25 vCPU) - Available memory values: 0.5GB, 1GB, 2GB 512 (.5 vCPU) - Available memory values: 1GB, 2GB, 3GB, 4GB 1024 (1 vCPU) - Available memory values: 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB 2048 (2 vCPU) - Available memory values: Between 4GB and 16GB in 1GB increments 4096 (4 vCPU) - Available memory values: Between 8GB and 30GB in 1GB increments This default is set in the underlying FargateTaskDefinition construct. Default: 256 :param memory_mib: The amount (in MiB) of memory used by the task. This field is required and you must use one of the following values, which determines your range of valid values for the cpu parameter: 0.5GB, 1GB, 2GB - Available cpu values: 256 (.25 vCPU) 1GB, 2GB, 3GB, 4GB - Available cpu values: 512 (.5 vCPU) 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB - Available cpu values: 1024 (1 vCPU) Between 4GB and 16GB in 1GB increments - Available cpu values: 2048 (2 vCPU) Between 8GB and 30GB in 1GB increments - Available cpu values: 4096 (4 vCPU) This default is set in the underlying FargateTaskDefinition construct. Default: 512 :param public_load_balancer: Determines whether the Application Load Balancer will be internet-facing. Default: true @@ -17914,7 +17940,7 @@ exports[`Generated code for "jsii-calc": /python/src/js self._values["container_port"] = container_port if cpu is not None: self._values["cpu"] = cpu -@@ -5301,10 +5745,14 @@ +@@ -5326,10 +5770,14 @@ '''Creates a BinaryOperation. :param lhs: Left-hand side operand. @@ -17929,7 +17955,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="farewell") def farewell(self) -> builtins.str: '''Say farewell.''' -@@ -5352,10 +5800,13 @@ +@@ -5377,10 +5825,13 @@ class NestedStruct: def __init__(self, *, number_prop: jsii.Number) -> None: ''' @@ -17943,7 +17969,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } @builtins.property -@@ -5426,17 +5877,24 @@ +@@ -5451,17 +5902,24 @@ def __init__(self, _param1: builtins.str, optional: typing.Any = None) -> None: ''' :param _param1: - @@ -17968,7 +17994,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="giveMeUndefinedInsideAnObject") def give_me_undefined_inside_an_object( self, -@@ -5464,10 +5922,13 @@ +@@ -5489,10 +5947,13 @@ def change_me_to_undefined(self) -> typing.Optional[builtins.str]: return typing.cast(typing.Optional[builtins.str], jsii.get(self, "changeMeToUndefined")) @@ -17982,7 +18008,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.data_type( jsii_type="jsii-calc.NullShouldBeTreatedAsUndefinedData", -@@ -5486,10 +5947,14 @@ +@@ -5511,10 +5972,14 @@ ) -> None: ''' :param array_with_three_elements_and_undefined_as_second_argument: @@ -17997,7 +18023,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } if this_should_be_undefined is not None: self._values["this_should_be_undefined"] = this_should_be_undefined -@@ -5524,17 +5989,23 @@ +@@ -5549,17 +6014,23 @@ def __init__(self, generator: "IRandomNumberGenerator") -> None: ''' @@ -18021,7 +18047,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="nextTimes100") def next_times100(self) -> jsii.Number: return typing.cast(jsii.Number, jsii.invoke(self, "nextTimes100", [])) -@@ -5544,10 +6015,13 @@ +@@ -5569,10 +6040,13 @@ def generator(self) -> "IRandomNumberGenerator": return typing.cast("IRandomNumberGenerator", jsii.get(self, "generator")) @@ -18035,7 +18061,7 @@ exports[`Generated code for "jsii-calc": /python/src/js class ObjectRefsInCollections( metaclass=jsii.JSIIMeta, -@@ -5565,10 +6039,13 @@ +@@ -5590,10 +6064,13 @@ ) -> jsii.Number: '''Returns the sum of all values. @@ -18049,7 +18075,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="sumFromMap") def sum_from_map( self, -@@ -5576,10 +6053,13 @@ +@@ -5601,10 +6078,13 @@ ) -> jsii.Number: '''Returns the sum of all values in a map. @@ -18063,7 +18089,7 @@ exports[`Generated code for "jsii-calc": /python/src/js class ObjectWithPropertyProvider( metaclass=jsii.JSIIMeta, -@@ -5620,10 +6100,13 @@ +@@ -5645,10 +6125,13 @@ ): def __init__(self, delegate: "IInterfaceWithOptionalMethodArguments") -> None: ''' @@ -18077,7 +18103,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="invokeWithOptional") def invoke_with_optional(self) -> None: return typing.cast(None, jsii.invoke(self, "invokeWithOptional", [])) -@@ -5646,10 +6129,15 @@ +@@ -5671,10 +6154,15 @@ ''' :param arg1: - :param arg2: - @@ -18093,7 +18119,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @builtins.property @jsii.member(jsii_name="arg1") def arg1(self) -> jsii.Number: -@@ -5674,10 +6162,13 @@ +@@ -5699,10 +6187,13 @@ class OptionalStruct: def __init__(self, *, field: typing.Optional[builtins.str] = None) -> None: ''' @@ -18107,7 +18133,7 @@ exports[`Generated code for "jsii-calc": /python/src/js self._values["field"] = field @builtins.property -@@ -5753,10 +6244,13 @@ +@@ -5778,10 +6269,13 @@ def _override_read_write(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "overrideReadWrite")) @@ -18121,7 +18147,7 @@ exports[`Generated code for "jsii-calc": /python/src/js class OverrideReturnsObject( metaclass=jsii.JSIIMeta, -@@ -5768,10 +6262,13 @@ +@@ -5793,10 +6287,13 @@ @jsii.member(jsii_name="test") def test(self, obj: "IReturnsNumber") -> jsii.Number: ''' @@ -18135,7 +18161,7 @@ exports[`Generated code for "jsii-calc": /python/src/js class ParamShadowsBuiltins( metaclass=jsii.JSIIMeta, -@@ -5793,10 +6290,14 @@ +@@ -5818,10 +6315,14 @@ :param str: should be set to something that is NOT a valid expression in Python (e.g: "\${NOPE}""). :param boolean_property: :param string_property: @@ -18150,7 +18176,7 @@ exports[`Generated code for "jsii-calc": /python/src/js string_property=string_property, struct_property=struct_property, ) -@@ -5826,10 +6327,15 @@ +@@ -5851,10 +6352,15 @@ :param string_property: :param struct_property: ''' @@ -18166,7 +18192,7 @@ exports[`Generated code for "jsii-calc": /python/src/js "string_property": string_property, "struct_property": struct_property, } -@@ -5882,10 +6388,13 @@ +@@ -5907,10 +6413,13 @@ scope: "_scope_jsii_calc_lib_c61f082f.Number", ) -> "_scope_jsii_calc_lib_c61f082f.Number": ''' @@ -18180,7 +18206,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.data_type( jsii_type="jsii-calc.ParentStruct982", -@@ -5896,10 +6405,13 @@ +@@ -5921,10 +6430,13 @@ def __init__(self, *, foo: builtins.str) -> None: '''https://github.com/aws/jsii/issues/982. @@ -18194,7 +18220,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } @builtins.property -@@ -5954,10 +6466,15 @@ +@@ -5979,10 +6491,15 @@ ''' :param obj: - :param dt: - @@ -18210,7 +18236,7 @@ exports[`Generated code for "jsii-calc": /python/src/js # Adding a "__jsii_proxy_class__(): typing.Type" function to the abstract class typing.cast(typing.Any, PartiallyInitializedThisConsumer).__jsii_proxy_class__ = lambda : _PartiallyInitializedThisConsumerProxy -@@ -5972,10 +6489,13 @@ +@@ -5997,10 +6514,13 @@ friendly: "_scope_jsii_calc_lib_c61f082f.IFriendly", ) -> builtins.str: ''' @@ -18224,7 +18250,7 @@ exports[`Generated code for "jsii-calc": /python/src/js class Power( _CompositeOperation_1c4d123b, -@@ -5992,10 +6512,14 @@ +@@ -6017,10 +6537,14 @@ '''Creates a Power operation. :param base: The base of the power. @@ -18239,7 +18265,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @builtins.property @jsii.member(jsii_name="base") def base(self) -> "_scope_jsii_calc_lib_c61f082f.NumericValue": -@@ -6218,10 +6742,13 @@ +@@ -6243,10 +6767,13 @@ value: "_scope_jsii_calc_lib_c61f082f.EnumFromScopedModule", ) -> None: ''' @@ -18253,7 +18279,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @builtins.property @jsii.member(jsii_name="foo") def foo( -@@ -6232,10 +6759,13 @@ +@@ -6257,10 +6784,13 @@ @foo.setter def foo( self, @@ -18267,7 +18293,7 @@ exports[`Generated code for "jsii-calc": /python/src/js class ReturnsPrivateImplementationOfInterface( metaclass=jsii.JSIIMeta, -@@ -6277,10 +6807,14 @@ +@@ -6302,10 +6832,14 @@ :param string_prop: May not be empty. :param nested_struct: ''' @@ -18282,7 +18308,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } if nested_struct is not None: self._values["nested_struct"] = nested_struct -@@ -6347,17 +6881,25 @@ +@@ -6372,17 +6906,25 @@ ''' :param arg1: - :param arg2: - @@ -18308,7 +18334,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="methodWithOptionalArguments") def method_with_optional_arguments( self, -@@ -6369,10 +6911,15 @@ +@@ -6394,10 +6936,15 @@ :param arg1: - :param arg2: - @@ -18324,7 +18350,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.data_type( jsii_type="jsii-calc.SecondLevelStruct", -@@ -6391,10 +6938,14 @@ +@@ -6416,10 +6963,14 @@ ) -> None: ''' :param deeper_required_prop: It's long and required. @@ -18339,7 +18365,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } if deeper_optional_prop is not None: self._values["deeper_optional_prop"] = deeper_optional_prop -@@ -6456,10 +7007,13 @@ +@@ -6481,10 +7032,13 @@ @jsii.member(jsii_name="isSingletonInt") def is_singleton_int(self, value: jsii.Number) -> builtins.bool: ''' @@ -18353,7 +18379,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.enum(jsii_type="jsii-calc.SingletonIntEnum") class SingletonIntEnum(enum.Enum): -@@ -6478,10 +7032,13 @@ +@@ -6503,10 +7057,13 @@ @jsii.member(jsii_name="isSingletonString") def is_singleton_string(self, value: builtins.str) -> builtins.bool: ''' @@ -18367,7 +18393,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.enum(jsii_type="jsii-calc.SingletonStringEnum") class SingletonStringEnum(enum.Enum): -@@ -6505,10 +7062,14 @@ +@@ -6530,10 +7087,14 @@ ) -> None: ''' :param property: @@ -18382,7 +18408,7 @@ exports[`Generated code for "jsii-calc": /python/src/js "yet_anoter_one": yet_anoter_one, } -@@ -6562,10 +7123,13 @@ +@@ -6587,10 +7148,13 @@ class ParentStruct: def __init__(self, *, field1: builtins.str) -> None: ''' @@ -18396,7 +18422,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } @builtins.property -@@ -6594,10 +7158,14 @@ +@@ -6619,10 +7183,14 @@ def __init__(self, *, field1: builtins.str, field2: builtins.str) -> None: ''' :param field1: @@ -18411,7 +18437,7 @@ exports[`Generated code for "jsii-calc": /python/src/js "field2": field2, } -@@ -6648,10 +7216,14 @@ +@@ -6673,10 +7241,14 @@ ) -> None: ''' :param readonly_string: - @@ -18426,7 +18452,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="method") def method(self) -> None: return typing.cast(None, jsii.invoke(self, "method", [])) -@@ -6666,10 +7238,13 @@ +@@ -6691,10 +7263,13 @@ def mutable_property(self) -> typing.Optional[jsii.Number]: return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "mutableProperty")) @@ -18440,7 +18466,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.enum(jsii_type="jsii-calc.StableEnum") class StableEnum(enum.Enum): -@@ -6685,10 +7260,13 @@ +@@ -6710,10 +7285,13 @@ class StableStruct: def __init__(self, *, readonly_property: builtins.str) -> None: ''' @@ -18454,7 +18480,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } @builtins.property -@@ -6725,10 +7303,13 @@ +@@ -6750,10 +7328,13 @@ def static_variable(cls) -> builtins.bool: # pyright: ignore [reportGeneralTypeIssues,reportRedeclaration] return typing.cast(builtins.bool, jsii.sget(cls, "staticVariable")) @@ -18468,7 +18494,7 @@ exports[`Generated code for "jsii-calc": /python/src/js class StaticHelloParent( metaclass=jsii.JSIIMeta, -@@ -6763,19 +7344,25 @@ +@@ -6788,19 +7369,25 @@ class Statics(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Statics"): def __init__(self, value: builtins.str) -> None: ''' @@ -18494,7 +18520,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="justMethod") def just_method(self) -> builtins.str: return typing.cast(builtins.str, jsii.invoke(self, "justMethod", [])) -@@ -6812,19 +7399,25 @@ +@@ -6837,19 +7424,25 @@ ''' return typing.cast("Statics", jsii.sget(cls, "instance")) @@ -18520,7 +18546,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @builtins.property @jsii.member(jsii_name="value") def value(self) -> builtins.str: -@@ -6880,10 +7473,13 @@ +@@ -6905,10 +7498,13 @@ def you_see_me(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "youSeeMe")) @@ -18534,7 +18560,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.data_type( jsii_type="jsii-calc.StructA", -@@ -6906,10 +7502,15 @@ +@@ -6931,10 +7527,15 @@ :param required_string: :param optional_number: @@ -18550,7 +18576,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } if optional_number is not None: self._values["optional_number"] = optional_number -@@ -6967,10 +7568,15 @@ +@@ -6992,10 +7593,15 @@ :param optional_boolean: :param optional_struct_a: ''' @@ -18566,7 +18592,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } if optional_boolean is not None: self._values["optional_boolean"] = optional_boolean -@@ -7022,10 +7628,14 @@ +@@ -7047,10 +7653,14 @@ See: https://github.com/aws/aws-cdk/issues/4302 :param scope: @@ -18581,7 +18607,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } if props is not None: self._values["props"] = props -@@ -7068,10 +7678,14 @@ +@@ -7093,10 +7703,14 @@ ) -> jsii.Number: ''' :param _positional: - @@ -18596,7 +18622,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="roundTrip") @builtins.classmethod def round_trip( -@@ -7086,10 +7700,13 @@ +@@ -7111,10 +7725,13 @@ :param _positional: - :param required: This is a required field. :param second_level: A union to really stress test our serialization. @@ -18610,7 +18636,7 @@ exports[`Generated code for "jsii-calc": /python/src/js ) return typing.cast("TopLevelStruct", jsii.sinvoke(cls, "roundTrip", [_positional, input])) -@@ -7106,10 +7723,13 @@ +@@ -7131,10 +7748,13 @@ struct: typing.Union[typing.Union["StructA", typing.Dict[builtins.str, typing.Any]], typing.Union["StructB", typing.Dict[builtins.str, typing.Any]]], ) -> builtins.bool: ''' @@ -18624,7 +18650,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="isStructB") @builtins.classmethod def is_struct_b( -@@ -7117,18 +7737,24 @@ +@@ -7142,18 +7762,24 @@ struct: typing.Union[typing.Union["StructA", typing.Dict[builtins.str, typing.Any]], typing.Union["StructB", typing.Dict[builtins.str, typing.Any]]], ) -> builtins.bool: ''' @@ -18649,7 +18675,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.data_type( jsii_type="jsii-calc.StructWithCollectionOfUnionts", -@@ -7142,10 +7768,13 @@ +@@ -7167,10 +7793,13 @@ union_property: typing.Sequence[typing.Mapping[builtins.str, typing.Union[typing.Union["StructA", typing.Dict[builtins.str, typing.Any]], typing.Union["StructB", typing.Dict[builtins.str, typing.Any]]]]], ) -> None: ''' @@ -18663,7 +18689,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } @builtins.property -@@ -7182,10 +7811,14 @@ +@@ -7207,10 +7836,14 @@ ) -> None: ''' :param foo: An enum value. @@ -18678,7 +18704,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } if bar is not None: self._values["bar"] = bar -@@ -7241,10 +7874,16 @@ +@@ -7266,10 +7899,16 @@ :param default: :param assert_: :param result: @@ -18695,7 +18721,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } if assert_ is not None: self._values["assert_"] = assert_ -@@ -7314,10 +7953,13 @@ +@@ -7339,10 +7978,13 @@ @parts.setter def parts( self, @@ -18709,7 +18735,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.data_type( jsii_type="jsii-calc.SupportsNiceJavaBuilderProps", -@@ -7333,10 +7975,14 @@ +@@ -7358,10 +8000,14 @@ ) -> None: ''' :param bar: Some number, like 42. @@ -18724,7 +18750,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } if id is not None: self._values["id"] = id -@@ -7385,10 +8031,13 @@ +@@ -7410,10 +8056,13 @@ ''' :param id_: some identifier of your choice. :param bar: Some number, like 42. @@ -18738,7 +18764,7 @@ exports[`Generated code for "jsii-calc": /python/src/js jsii.create(self.__class__, self, [id_, props]) @builtins.property -@@ -7466,17 +8115,23 @@ +@@ -7491,17 +8140,23 @@ @jsii.member(jsii_name="modifyOtherProperty") def modify_other_property(self, value: builtins.str) -> None: ''' @@ -18762,7 +18788,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="readA") def read_a(self) -> jsii.Number: return typing.cast(jsii.Number, jsii.invoke(self, "readA", [])) -@@ -7496,17 +8151,23 @@ +@@ -7521,17 +8176,23 @@ @jsii.member(jsii_name="virtualMethod") def virtual_method(self, n: jsii.Number) -> jsii.Number: ''' @@ -18786,7 +18812,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @builtins.property @jsii.member(jsii_name="readonlyProperty") def readonly_property(self) -> builtins.str: -@@ -7517,46 +8178,61 @@ +@@ -7542,46 +8203,61 @@ def a(self) -> jsii.Number: return typing.cast(jsii.Number, jsii.get(self, "a")) @@ -18848,7 +18874,7 @@ exports[`Generated code for "jsii-calc": /python/src/js class TestStructWithEnum( metaclass=jsii.JSIIMeta, -@@ -7639,10 +8315,15 @@ +@@ -7664,10 +8340,15 @@ ''' :param required: This is a required field. :param second_level: A union to really stress test our serialization. @@ -18864,7 +18890,7 @@ exports[`Generated code for "jsii-calc": /python/src/js "second_level": second_level, } if optional is not None: -@@ -7733,10 +8414,13 @@ +@@ -7758,10 +8439,13 @@ def __init__(self, operand: "_scope_jsii_calc_lib_c61f082f.NumericValue") -> None: ''' @@ -18878,7 +18904,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @builtins.property @jsii.member(jsii_name="operand") def operand(self) -> "_scope_jsii_calc_lib_c61f082f.NumericValue": -@@ -7767,10 +8451,14 @@ +@@ -7792,10 +8476,14 @@ ) -> None: ''' :param bar: @@ -18893,7 +18919,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } if foo is not None: self._values["foo"] = foo -@@ -7807,10 +8495,13 @@ +@@ -7832,10 +8520,13 @@ def __init__(self, delegate: typing.Mapping[builtins.str, typing.Any]) -> None: ''' @@ -18907,7 +18933,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.python.classproperty @jsii.member(jsii_name="reflector") def REFLECTOR( -@@ -7855,10 +8546,13 @@ +@@ -7880,10 +8571,13 @@ ): def __init__(self, obj: "IInterfaceWithProperties") -> None: ''' @@ -18921,7 +18947,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="justRead") def just_read(self) -> builtins.str: return typing.cast(builtins.str, jsii.invoke(self, "justRead", [])) -@@ -7869,17 +8563,23 @@ +@@ -7894,17 +8588,23 @@ ext: "IInterfaceWithPropertiesExtension", ) -> builtins.str: ''' @@ -18945,7 +18971,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @builtins.property @jsii.member(jsii_name="obj") def obj(self) -> "IInterfaceWithProperties": -@@ -7889,25 +8589,34 @@ +@@ -7914,25 +8614,34 @@ class VariadicInvoker(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.VariadicInvoker"): def __init__(self, method: "VariadicMethod") -> None: ''' @@ -18980,7 +19006,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="asArray") def as_array( self, -@@ -7916,10 +8625,14 @@ +@@ -7941,10 +8650,14 @@ ) -> typing.List[jsii.Number]: ''' :param first: the first element of the array to be returned (after the \`\`prefix\`\` provided at construction time). @@ -18995,7 +19021,7 @@ exports[`Generated code for "jsii-calc": /python/src/js class VariadicTypeUnion( metaclass=jsii.JSIIMeta, -@@ -7927,19 +8640,25 @@ +@@ -7952,19 +8665,25 @@ ): def __init__(self, *union: typing.Union["StructA", "StructB"]) -> None: ''' @@ -19021,7 +19047,7 @@ exports[`Generated code for "jsii-calc": /python/src/js class VirtualMethodPlayground( metaclass=jsii.JSIIMeta, -@@ -7951,38 +8670,53 @@ +@@ -7976,38 +8695,53 @@ @jsii.member(jsii_name="overrideMeAsync") def override_me_async(self, index: jsii.Number) -> jsii.Number: ''' @@ -19075,7 +19101,7 @@ exports[`Generated code for "jsii-calc": /python/src/js class VoidCallback( metaclass=jsii.JSIIAbstractClass, -@@ -8044,10 +8778,13 @@ +@@ -8069,10 +8803,13 @@ ''' return typing.cast(typing.Optional[builtins.str], jsii.get(self, "dontReadMe")) @@ -19089,7 +19115,7 @@ exports[`Generated code for "jsii-calc": /python/src/js class WithPrivatePropertyInConstructor( metaclass=jsii.JSIIMeta, -@@ -8057,10 +8794,13 @@ +@@ -8082,10 +8819,13 @@ def __init__(self, private_field: typing.Optional[builtins.str] = None) -> None: ''' @@ -19103,7 +19129,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @builtins.property @jsii.member(jsii_name="success") def success(self) -> builtins.bool: -@@ -8101,10 +8841,13 @@ +@@ -8126,10 +8866,13 @@ @jsii.member(jsii_name="abstractMethod") def abstract_method(self, name: builtins.str) -> builtins.str: ''' @@ -19117,7 +19143,7 @@ exports[`Generated code for "jsii-calc": /python/src/js # Adding a "__jsii_proxy_class__(): typing.Type" function to the abstract class typing.cast(typing.Any, AbstractClass).__jsii_proxy_class__ = lambda : _AbstractClassProxy -@@ -8120,10 +8863,14 @@ +@@ -8145,10 +8888,14 @@ '''Creates a BinaryOperation. :param lhs: Left-hand side operand. @@ -19132,7 +19158,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="toString") def to_string(self) -> builtins.str: '''String representation of the value.''' -@@ -8167,10 +8914,13 @@ +@@ -8192,10 +8939,13 @@ def rung(self) -> builtins.bool: return typing.cast(builtins.bool, jsii.get(self, "rung")) @@ -19146,7 +19172,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.data_type( jsii_type="jsii-calc.ChildStruct982", -@@ -8181,10 +8931,14 @@ +@@ -8206,10 +8956,14 @@ def __init__(self, *, foo: builtins.str, bar: jsii.Number) -> None: ''' :param foo: @@ -19161,7 +19187,7 @@ exports[`Generated code for "jsii-calc": /python/src/js "bar": bar, } -@@ -8225,37 +8979,49 @@ +@@ -8250,37 +9004,49 @@ def a(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "a")) @@ -19211,7 +19237,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.implements(INonInternalInterface) class ClassThatImplementsThePrivateInterface( -@@ -8270,37 +9036,49 @@ +@@ -8295,37 +9061,49 @@ def a(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "a")) @@ -19261,7 +19287,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.implements(IInterfaceWithProperties) class ClassWithPrivateConstructorAndAutomaticProperties( -@@ -8318,10 +9096,14 @@ +@@ -8343,10 +9121,14 @@ ) -> "ClassWithPrivateConstructorAndAutomaticProperties": ''' :param read_only_string: - @@ -19276,7 +19302,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @builtins.property @jsii.member(jsii_name="readOnlyString") def read_only_string(self) -> builtins.str: -@@ -8332,10 +9114,13 @@ +@@ -8357,10 +9139,13 @@ def read_write_string(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "readWriteString")) @@ -19290,7 +19316,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.implements(IIndirectlyImplemented) class FullCombo(BaseClass, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.FullCombo"): -@@ -8450,10 +9235,13 @@ +@@ -8475,10 +9260,13 @@ ): def __init__(self, property: builtins.str) -> None: ''' @@ -19304,7 +19330,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="bar") def bar(self) -> None: return typing.cast(None, jsii.invoke(self, "bar", [])) -@@ -8474,10 +9262,13 @@ +@@ -8499,10 +9287,13 @@ def __init__(self, operand: "_scope_jsii_calc_lib_c61f082f.NumericValue") -> None: ''' @@ -19318,7 +19344,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="farewell") def farewell(self) -> builtins.str: '''Say farewell.''' -@@ -8542,10 +9333,16 @@ +@@ -8567,10 +9358,16 @@ :param id: some identifier. :param default_bar: the default value of \`\`bar\`\`. :param props: some props once can provide. @@ -19335,7 +19361,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @builtins.property @jsii.member(jsii_name="id") def id(self) -> jsii.Number: -@@ -8901,7 +9698,1573 @@ +@@ -8927,7 +9724,1573 @@ import sys as _sys setattr(_sys.modules[__name__], "__getattr__", __getattr__) diff --git a/packages/jsii-reflect/test/__snapshots__/jsii-tree.test.js.snap b/packages/jsii-reflect/test/__snapshots__/jsii-tree.test.js.snap index 30b793e96e..26ab4c54f7 100644 --- a/packages/jsii-reflect/test/__snapshots__/jsii-tree.test.js.snap +++ b/packages/jsii-reflect/test/__snapshots__/jsii-tree.test.js.snap @@ -1615,6 +1615,12 @@ exports[`jsii-tree --all 1`] = ` │ │ │ └─┬ friendly │ │ │ └── type: @scope/jsii-calc-lib.IFriendly │ │ └── returns: string + │ ├─┬ class HostStackTraceReader (stable) + │ │ └─┬ members + │ │ ├── () initializer (stable) + │ │ └─┬ static capturedTrace() method (stable) + │ │ ├── static + │ │ └── returns: any │ ├─┬ class ImplementInternalInterface (stable) │ │ └─┬ members │ │ ├── () initializer (stable) @@ -4213,6 +4219,7 @@ exports[`jsii-tree --inheritance 1`] = ` │ │ └── interfaces: IIndirectlyImplemented │ ├── class GiveMeStructs │ ├── class GreetingAugmenter + │ ├── class HostStackTraceReader │ ├── class ImplementInternalInterface │ ├── class Implementation │ ├─┬ class ImplementsInterfaceWithInternal @@ -5262,6 +5269,10 @@ exports[`jsii-tree --members 1`] = ` │ │ └─┬ members │ │ ├── () initializer │ │ └── betterGreeting(friendly) method + │ ├─┬ class HostStackTraceReader + │ │ └─┬ members + │ │ ├── () initializer + │ │ └── static capturedTrace() method │ ├─┬ class ImplementInternalInterface │ │ └─┬ members │ │ ├── () initializer @@ -6596,6 +6607,7 @@ exports[`jsii-tree --types 1`] = ` │ ├── class FullCombo │ ├── class GiveMeStructs │ ├── class GreetingAugmenter + │ ├── class HostStackTraceReader │ ├── class ImplementInternalInterface │ ├── class Implementation │ ├── class ImplementsInterfaceWithInternal diff --git a/packages/jsii-reflect/test/__snapshots__/tree.test.js.snap b/packages/jsii-reflect/test/__snapshots__/tree.test.js.snap index 55b125d215..b25285af3b 100644 --- a/packages/jsii-reflect/test/__snapshots__/tree.test.js.snap +++ b/packages/jsii-reflect/test/__snapshots__/tree.test.js.snap @@ -1810,6 +1810,12 @@ exports[`showAll 1`] = ` │ │ │ └─┬ friendly │ │ │ └── type: @scope/jsii-calc-lib.IFriendly │ │ └── returns: string + │ ├─┬ class HostStackTraceReader + │ │ └─┬ members + │ │ ├── () initializer + │ │ └─┬ static capturedTrace() method + │ │ ├── static + │ │ └── returns: any │ ├─┬ class ImplementInternalInterface │ │ └─┬ members │ │ ├── () initializer @@ -4417,6 +4423,7 @@ exports[`types 1`] = ` │ ├── class FullCombo │ ├── class GiveMeStructs │ ├── class GreetingAugmenter + │ ├── class HostStackTraceReader │ ├── class ImplementInternalInterface │ ├── class Implementation │ ├── class ImplementsInterfaceWithInternal diff --git a/packages/jsii-reflect/test/__snapshots__/type-system.test.js.snap b/packages/jsii-reflect/test/__snapshots__/type-system.test.js.snap index cb157c7203..162ed288a4 100644 --- a/packages/jsii-reflect/test/__snapshots__/type-system.test.js.snap +++ b/packages/jsii-reflect/test/__snapshots__/type-system.test.js.snap @@ -84,6 +84,7 @@ exports[`TypeSystem.classes lists all the classes in the typesystem 1`] = ` "jsii-calc.FullCombo", "jsii-calc.GiveMeStructs", "jsii-calc.GreetingAugmenter", + "jsii-calc.HostStackTraceReader", "jsii-calc.ImplementInternalInterface", "jsii-calc.Implementation", "jsii-calc.ImplementsInterfaceWithInternal",