-
Notifications
You must be signed in to change notification settings - Fork 639
Skip defaults when printing BindingName #1025
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Can you add a repro to https://github.com/microsoft/typescript-go/tree/main/testdata/tests/cases/compiler? |
Yes, though now I'm determined to track down the original bug (actually in the error printing step) |
@microsoft-github-policy-service agree |
930b6c1
to
05627ce
Compare
FWIW you probably want to retitle the PR 😄 |
Where is that in the PR? |
I removed it — I was able to repro the race locally, but then I added a missing switch that I had omitted and the race disappeared. The race prevention code is pretty simple but also not necessary, at least for this PR (I believe). |
Co-authored-by: Jake Bailey <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, much appreciated!
Ugh, I guess the nil check is a thing? Hmmm |
The context being nil I think is a bug in the PR, not something that needs a check. What I'm seeing in the debugger is that in the initial frame. |
Ugh, #1001 broke it, it's the thing intializeClosures was doing to "recapture the context", even though I haven't been able to figure out why that matters. |
The problem was that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving but since I pushed last it I'll have to get someone else to +1 it
Thanks for your pointers! |
Pun intended! |
With this fix in place I'm still seeing a similar panic:
I will try and track down a repro, but thought it would be useful to report straight away. |
yeah a repro is necessary to fix — happy to look when you have one |
Another quick note that my PR deliberately did not add an out-of-range check at the top of |
This should fix #1012
This fills in a TODO to match code in checker.ts, and fixes a bunch of test discrepancies.
PR also adds more bounds checks to comment parsing to to match the JS implementation.
text.charCodeAt(pos)
returnsNaN
when thepos
is out of range, which means the bigswitch
falls through and returns, whereas callingtext[pos:]
panics in existing code whenpos
is out of range.