Jake Bailey

Results 1408 comments of Jake Bailey

This one is quite literally impossible: ``` interface conversion: ast.nodeData is *ast.Token, not *ast.Identifier goroutine 360382 [running]: runtime/debug.Stack() runtime/debug/stack.go:26 +0x5e github.com/microsoft/typescript-go/internal/lsp.(*Server).recover(0xc000138608, 0xc04efb0990) github.com/microsoft/typescript-go/internal/lsp/server.go:572 +0x58 panic({0xb82b40?, 0xc04ea389c0?}) runtime/panic.go:783 +0x132 github.com/microsoft/typescript-go/internal/ast.(*Node).AsIdentifier(...) github.com/microsoft/typescript-go/internal/ast/ast.go:1203...

Better formatted: ``` panic: runtime error: invalid memory address or nil pointer dereference [recovered, repanicked] [signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0xa92496] goroutine 12645 [running]: github.com/microsoft/typescript-go/internal/project.(*Snapshot).Clone.func1() github.com/microsoft/typescript-go/internal/project/snapshot.go:201 +0x7d panic({0xbdb980?, 0x16c3b70?})...

In this: ``` func(p *Project) { // We checked before triggering this change (in Session.triggerATAForUpdatedProjects) that // the set of typings files is actually different. p.installedTypingsInfo = ataChange.TypingsInfo p.typingsFiles =...

This is union order dependent. Swap the order of the two things in your union, and you get the same error in TS 5.8: [Playground Link](https://www.typescriptlang.org/play/?#code/C4TwDgpgBAkgsgQzAUQHbAE4EsIGcA8A0gDRQBqAfFALxQDaJ5AunUwNwBQHokshEIMggA2AVwiIw+SjSgBvDlHoBrAQC4ouTFlQBzJhrKcAvpw4AzUagDGwLAHtUUYHmAAxK7YeoipSgAodLDsRITE8AH4NGH5BEXFJaSoAH1hJNG08X3IKAEoNADd7LAATeWMua0ctKHsAIwArWQUlVRAARg0AcgL4iHau4kUoNoAmbt7w0cHhtoBmCb65mdMuFy0PGztHfwB5RohbADoIdGw8f3qG3KOAWyR-fzo20knxJlyaKmeBV76P3KcIA) The Go port has...

@ahejlsberg I know you marked this as wontfix, but do you think there's likely to be a generic fix to this class of problem? AFAIK this is union subtype reduction,...

I'm actually pretty surprised the node types have had this reference all along, as opposed to setting this in the `tsconfig`. Typically it's frowned upon for lib.d.ts to be "upgraded"...

If you can reproduce this consistently, consider bisecting using https://www.npmjs.com/package/every-ts.

Even if you can't share the code for now, can you try running tsc via https://www.npmjs.com/package/pprof-it? The profile won't include any code, and if you enable `PPROF_SANITIZE=true`, shouldn't include any...

I would definitely recommend using every-ts and linking it in to bisect, if it's reproducible. But I would doubt that your issue is related; typically bugs like this aren't, but...