diff --git a/packages/jsii-rosetta/lib/util.ts b/packages/jsii-rosetta/lib/util.ts index 9642757a9d..9ae8f9db6a 100644 --- a/packages/jsii-rosetta/lib/util.ts +++ b/packages/jsii-rosetta/lib/util.ts @@ -12,9 +12,16 @@ export interface File { } export function printDiagnostics(diags: readonly RosettaDiagnostic[], stream: NodeJS.WritableStream) { - for (const diag of diags) { + // Don't print too much, at some point it just clogs up the log + const maxDiags = 50; + + for (const diag of diags.slice(maxDiags)) { stream.write(diag.formattedMessage); } + + if (diags.length > maxDiags) { + stream.write(`(...and ${maxDiags - diags.length} more diagnostics not shown)`); + } } export const StrictBrand = 'jsii.strict';