-
Notifications
You must be signed in to change notification settings - Fork 763
Closed
Labels
Description
Steps to reproduce
When running tsgo with the individual apps in large monrepo with proj references,
for most of the apps, able to run successfully, except only for the two apps where the no of ts errors are more than 1000.
version:
"@typescript/native-preview": "^7.0.0-dev.20251014.1",
Behavior with [email protected]
the same apps are successfully run with tsc like npx tsc -p client/apps/connector/tsconfig.json, getting the ts checker properly working.
Behavior with tsgo
input with tsgo
npx tsgo -p client/apps/connector/tsconfig.jsonOutput with tsgo
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x4 pc=0x101028988]
goroutine 55412 [running]:
github.com/microsoft/typescript-go/internal/checker.(*Checker).getTypeOfSymbol(0x140234f5b88?, 0x1016d39e0?)
github.com/microsoft/typescript-go/internal/checker/checker.go:15884 +0x18
github.com/microsoft/typescript-go/internal/checker.(*Checker).invocationErrorRecovery(0x140234f5308, 0x14034f83440, 0x0, 0x14035e27320)
github.com/microsoft/typescript-go/internal/checker/checker.go:9759 +0x94
github.com/microsoft/typescript-go/internal/checker.(*Checker).invocationError(0x140234f5308, 0x14034f83440?, 0x14034f83440, 0x0, 0x0)
github.com/microsoft/typescript-go/internal/checker/checker.go:9748 +0xec
github.com/microsoft/typescript-go/internal/checker.(*Checker).resolveCallExpression(0x140234f5308, 0x14001290268, 0x0, 0x0)
github.com/microsoft/typescript-go/internal/checker/checker.go:8290 +0x3f4
github.com/microsoft/typescript-go/internal/checker.(*Checker).resolveSignature(0x140234f5a68?, 0x1016d3e60?, 0x14001290268?, 0xffd40c?)
github.com/microsoft/typescript-go/internal/checker/checker.go:8197 +0x58
github.com/microsoft/typescript-go/internal/checker.(*Checker).getResolvedSignature(0x140234f5308, 0x14001290268, 0x0, 0x0)
github.com/microsoft/typescript-go/internal/checker/checker.go:8169 +0xd0
github.com/microsoft/typescript-go/internal/checker.(*Checker).checkCallExpression(0x140234f5308, 0x14001290268, 0x0)
github.com/microsoft/typescript-go/internal/checker/checker.go:8065 +0x50
github.com/microsoft/typescript-go/internal/checker.(*Checker).checkExpressionWorker(0x140234f5308, 0x14001290268, 0x0)
github.com/microsoft/typescript-go/internal/checker/checker.go:7447 +0x2fc
github.com/microsoft/typescript-go/internal/checker.(*Checker).checkExpressionEx(0x140234f5308, 0x14001290268, 0x0)
github.com/microsoft/typescript-go/internal/checker/checker.go:7235 +0x50
github.com/microsoft/typescript-go/internal/checker.(*Checker).checkExpression(...)
github.com/microsoft/typescript-go/internal/checker/checker.go:7228
github.com/microsoft/typescript-go/internal/checker.(*Checker).checkTypeOfExpression(0x140234f5308, 0x140378e1b60?)
github.com/microsoft/typescript-go/internal/checker/checker.go:10198 +0x34
github.com/microsoft/typescript-go/internal/checker.(*Checker).checkExpressionWorker(0x140234f5308, 0x0?, 0x3e87f7f8?)
github.com/microsoft/typescript-go/internal/checker/checker.go:7461 +0x40c
github.com/microsoft/typescript-go/internal/checker.(*Checker).checkExpressionEx(0x140234f5308, 0x14000b1df00, 0x0)
github.com/microsoft/typescript-go/internal/checker/checker.go:7235 +0x50
github.com/microsoft/typescript-go/internal/checker.(*Checker).checkBinaryLikeExpression(0x140234f5308, 0x14000b1df00, 0x140002bc990, 0x14001486508, 0x0, 0x1400128e0d0)
github.com/microsoft/typescript-go/internal/checker/checker.go:11877 +0xb0
github.com/microsoft/typescript-go/internal/checker.(*Checker).checkBinaryExpression(...)
github.com/microsoft/typescript-go/internal/checker/checker.go:11869
github.com/microsoft/typescript-go/internal/checker.(*Checker).checkExpressionWorker(0x140234f5308, 0x100ff8eb0?, 0x3e87fa88?)
github.com/microsoft/typescript-go/internal/checker/checker.go:7481 +0x460
github.com/microsoft/typescript-go/internal/checker.(*Checker).checkExpressionEx(0x140234f5308, 0x1400128e0d0, 0x0)
github.com/microsoft/typescript-go/internal/checker/checker.go:7235 +0x50
github.com/microsoft/typescript-go/internal/checker.(*Checker).checkTruthinessExpression(0x140234f5308, 0x1400128e0d0, 0x3e87fad8?)
github.com/microsoft/typescript-go/internal/checker/checker.go:10526 +0x24
github.com/microsoft/typescript-go/internal/checker.(*Checker).checkIfStatement(0x140234f5308, 0x140012902c0)
github.com/microsoft/typescript-go/internal/checker/checker.go:3615 +0x3c
github.com/microsoft/typescript-go/internal/checker.(*Checker).checkSourceElementWorker(0x140234f5308, 0x140012902c0)
github.com/microsoft/typescript-go/internal/checker/checker.go:2248 +0x268
github.com/microsoft/typescript-go/internal/checker.(*Checker).checkSourceElement(0x140234f5308, 0x1?)
github.com/microsoft/typescript-go/internal/checker/checker.go:2162 +0x4c
github.com/microsoft/typescript-go/internal/checker.(*Checker).checkSourceElements(0x140234f5308, {0x1400148c260, 0xa, 0x140218cf140?})
github.com/microsoft/typescript-go/internal/checker/checker.go:2153 +0x34
github.com/microsoft/typescript-go/internal/checker.(*Checker).checkBlock(0x140234f5308, 0x140014984a8)
github.com/microsoft/typescript-go/internal/checker/checker.go:3603 +0x12c
github.com/microsoft/typescript-go/internal/checker.(*Checker).checkSourceElementWorker(0x140234f5308, 0x140014984a8)
github.com/microsoft/typescript-go/internal/checker/checker.go:2242 +0x308
github.com/microsoft/typescript-go/internal/checker.(*Checker).checkSourceElement(0x140234f5308, 0x1401f25a1c0?)
github.com/microsoft/typescript-go/internal/checker/checker.go:2162 +0x4c
github.com/microsoft/typescript-go/internal/checker.(*Checker).checkFunctionOrMethodDeclaration(0x140234f5308, 0x1400148a2c0)
github.com/microsoft/typescript-go/internal/checker/checker.go:3255 +0x11c
github.com/microsoft/typescript-go/internal/checker.(*Checker).checkFunctionDeclaration(0x140234f5308, 0x1400148a2c0)
github.com/microsoft/typescript-go/internal/checker/checker.go:3216 +0x24
github.com/microsoft/typescript-go/internal/checker.(*Checker).checkSourceElementWorker(0x140234f5308, 0x1400148a2c0)
github.com/microsoft/typescript-go/internal/checker/checker.go:2240 +0x2e0
github.com/microsoft/typescript-go/internal/checker.(*Checker).checkSourceElement(0x140234f5308, 0x140218cf140?)
github.com/microsoft/typescript-go/internal/checker/checker.go:2162 +0x4c
github.com/microsoft/typescript-go/internal/checker.(*Checker).checkSourceElements(0x140234f5308, {0x1400148a420, 0xd, 0x1400059c380?})
github.com/microsoft/typescript-go/internal/checker/checker.go:2153 +0x34
github.com/microsoft/typescript-go/internal/checker.(*Checker).checkSourceFile(0x140234f5308, {0x1016ce2c0, 0x101cdf4e0}, 0x14001490608)
github.com/microsoft/typescript-go/internal/checker/checker.go:2126 +0xf4
github.com/microsoft/typescript-go/internal/checker.(*Checker).CheckSourceFile(0x140234f5308, {0x1016ce2c0, 0x101cdf4e0}, 0x14001490608)
github.com/microsoft/typescript-go/internal/checker/checker.go:2115 +0x64
github.com/microsoft/typescript-go/internal/compiler.(*Program).CheckSourceFiles.func1-range1(0x14024c3bf28?)
github.com/microsoft/typescript-go/internal/compiler/program.go:355 +0x5c
github.com/microsoft/typescript-go/internal/compiler.(*checkerPool).Files.func1(0x1401819da40)
github.com/microsoft/typescript-go/internal/compiler/checkerpool.go:82 +0x7c
github.com/microsoft/typescript-go/internal/compiler.(*Program).CheckSourceFiles.func1()
github.com/microsoft/typescript-go/internal/compiler/program.go:353 +0xf0
github.com/microsoft/typescript-go/internal/core.(*parallelWorkGroup).Queue.func1()
github.com/microsoft/typescript-go/internal/core/workgroup.go:42 +0x50
created by github.com/microsoft/typescript-go/internal/core.(*parallelWorkGroup).Queue in goroutine 1
github.com/microsoft/typescript-go/internal/core/workgroup.go:40 +0x7ctsconfig.json
{
"extends": "../../../tsconfig.base.json",
"include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"],
"exclude": [
"**/node_modules"
],
"watchOptions": {
"excludeDirectories": ["**/node_modules", "dist"],
},
"compilerOptions": {
"paths": {
"@i18n": ["./src/i18n/i18n.ts"]
}
}
}
tsconfig.base.json
{
"compilerOptions": {
/* Base Options: */
"esModuleInterop": true,
"skipLibCheck": true,
"target": "es2022",
"lib": ["ESNext", "dom", "dom.iterable"],
"allowJs": true,
"resolveJsonModule": true,
"isolatedModules": true,
/* Strictness */
"strict": true,
/* decorators - experimental */
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
/* react */
"jsx": "react-jsx",
/* no transpilaition from ts: */
"noEmit": true,
"module": "preserve",
"moduleResolution": "bundler",
/*proj reference*/
"composite": true,
"incremental": true,
}
}