Increased the stack trace limit for the CLI version of pyright from the default of 16 to 64 to help with diagnosis of crashes.

This commit is contained in:
Eric Traut 2022-05-05 10:20:43 -07:00
parent 4df1f74ba9
commit b9c187b9e8

View File

@ -793,6 +793,10 @@ function logDiagnosticToConsole(diag: PyrightJsonDiagnostic, prefix = ' ') {
console.log(message);
}
// Increase the default stack trace limit from 16 to 64 to help diagnose
// crashes with deep stack traces.
Error.stackTraceLimit = 64;
export async function main() {
if (process.env.NODE_ENV === 'production') {
// eslint-disable-next-line @typescript-eslint/no-var-requires