Skip to content

Improve Recovery of Unterminated Regular Expressions - #58289

Merged
Ron Buckton (rbuckton) merged 11 commits into
microsoft:mainfrom
graphemecluster:regex-recovery
May 24, 2024
Merged

Improve Recovery of Unterminated Regular Expressions#58289
Ron Buckton (rbuckton) merged 11 commits into
microsoft:mainfrom
graphemecluster:regex-recovery

Conversation

@graphemecluster

@graphemeclustergraphemecluster (graphemecluster) commented Apr 22, 2024

Copy link
Copy Markdown
Contributor

Since unterminated regexes are invalid that they don’t even form a complete RegularExpressionLiteral, we can do everything at our discretion as long as a syntax error is produced. But we should do all our best to parse the remaining parts with fewer subsequent syntax errors.

Instead of consuming all until the end of the line starting from the slash character, if we encounter an unbalanced bracket, which is likely a bracket balancing something before the regex, we stop scanning the regex here so as to increase the chance that a bracket forms a pair of syntax characters with the corresponding bracket before the regex.

Now that unterminated regexes are handled separately from the well-terminated ones and are no longer scanned (actually, parsed) by scanRegularExpressionWorker. This should make moving scanRegularExpressionWorker away to the parser or the checker in the future much easier.

#55600 (comment) no longer applies.

@typescript-botTypeScript Bot (typescript-bot) added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Apr 22, 2024
@typescript-bot

Copy link
Copy Markdown
Contributor

This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.

function reScanSlashToken(): SyntaxKind {
if (token === SyntaxKind.SlashToken || token === SyntaxKind.SlashEqualsToken) {
// Quickly get to the end of regex such that we know the flags
let p = tokenStart + 1;

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is eliminated for readability

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is bad. Are there any solutions that does not affect pressing enter?

~
!!! error TS1005: ';' expected.
~~

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we include angle brackets (in addition to parens and braces) to the logic?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With respect to treating them as unterminated? I don't think that's necessary. (?<) will still produce an error during the grammar check pass while still maintaining a proper bound for the RegExp body.

Also, Annex B does not treat /\k</ as an error since the RegExp does not define a named capture group, which indicates that <> handling is not a lexical syntax error.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not too terribly concerned about this case, to be honest. Parsing falls off the rails here because of malformed JSX, not a malformed RegExp.

Comment threadsrc/testRunner/unittests/regExpParserRecovery.ts
Comment threadsrc/testRunner/unittests/regExpParserRecovery.ts Outdated
@graphemecluster

Copy link
Copy Markdown
ContributorAuthor

Comments marked “Outdated” are not actually outdated, they’re just due to the merge

@graphemecluster

Copy link
Copy Markdown
ContributorAuthor

Please inform me if you would like me to move the last commit to #58320 or a new PR.

@jakebailey

Copy link
Copy Markdown
Member

Please inform me if you would like me to move the last commit to #58320 or a new PR.

It seems unrelated, right? So should probably be separate?

@rbuckton

Copy link
Copy Markdown
Contributor

#58339 also addressed some of this. Can you update your PR with the latest changes from main?

@graphemecluster

Copy link
Copy Markdown
ContributorAuthor

It seems unrelated, right? So should probably be separate?

OK, I’ll do so if you don’t mind the number of PRs.

Comment threadsrc/compiler/scanner.ts Outdated
Comment threadsrc/compiler/scanner.ts
Comment threadsrc/compiler/scanner.ts Outdated
Comment threadsrc/compiler/scanner.ts Outdated
~
!!! error TS1005: ';' expected.
~~

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With respect to treating them as unterminated? I don't think that's necessary. (?<) will still produce an error during the grammar check pass while still maintaining a proper bound for the RegExp body.

Also, Annex B does not treat /\k</ as an error since the RegExp does not define a named capture group, which indicates that <> handling is not a lexical syntax error.

Comment threadsrc/compiler/scanner.ts Outdated
Comment threadsrc/compiler/scanner.ts Outdated
Comment threadsrc/compiler/scanner.ts
@graphemecluster

Copy link
Copy Markdown
ContributorAuthor

Jake Bailey (@jakebailey) I’ve moved the changes related to flags scanning to #58612. After either PR is merged I will resolve the conflict of the other one.

Comment threadsrc/compiler/scanner.ts
@rbuckton

Copy link
Copy Markdown
Contributor

TypeScript Bot (@typescript-bot) perf test
TypeScript Bot (@typescript-bot) run dt
TypeScript Bot (@typescript-bot) test top400
TypeScript Bot (@typescript-bot) test tsserver top100
TypeScript Bot (@typescript-bot) user test this
TypeScript Bot (@typescript-bot) user test tsserver

@typescript-bot

TypeScript Bot (typescript-bot) commented May 23, 2024

Copy link
Copy Markdown
Contributor

Starting jobs; this comment will be updated as builds start and complete.

CommandStatusResults
perf test✅ Started👀 Results
run dt✅ Started✅ Results
test top400✅ Started✅ Results
test tsserver top100✅ Started👀 Results
user test this✅ Started✅ Results
user test tsserver✅ Started✅ Results

@typescript-bot

Copy link
Copy Markdown
Contributor

Ron Buckton (@rbuckton) Here are the results of running the user tests comparing main and refs/pull/58289/merge:

Everything looks good!

@typescript-bot

Copy link
Copy Markdown
Contributor

Hey Ron Buckton (@rbuckton), the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@typescript-bot

Copy link
Copy Markdown
Contributor

Ron Buckton (@rbuckton) Here are the results of running the user tests comparing main and refs/pull/58289/merge:

Everything looks good!

@typescript-bot

Copy link
Copy Markdown
Contributor

Ron Buckton (@rbuckton)
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Compiler-Unions - node (v18.15.0, x64)
Errors3030~~~p=1.000 n=6
Symbols62,15462,154~~~p=1.000 n=6
Types50,24850,248~~~p=1.000 n=6
Memory used192,306k (± 0.09%)192,922k (± 0.77%)~192,212k195,925kp=0.378 n=6
Parse Time1.55s (± 1.76%)1.58s (± 0.48%)+0.03s (+ 2.05%)1.57s1.59sp=0.032 n=6
Bind Time0.86s (± 0.60%)0.87s (± 0.73%)~0.86s0.88sp=0.091 n=6
Check Time11.34s (± 0.69%)11.34s (± 0.53%)~11.26s11.42sp=1.000 n=6
Emit Time3.16s (± 0.26%)3.16s (± 0.76%)~3.14s3.20sp=0.935 n=6
Total Time16.91s (± 0.52%)16.94s (± 0.20%)~16.89s16.99sp=0.146 n=6
angular-1 - node (v18.15.0, x64)
Errors55~~~p=1.000 n=6
Symbols944,110944,110~~~p=1.000 n=6
Types407,140407,140~~~p=1.000 n=6
Memory used1,222,030k (± 0.01%)1,222,047k (± 0.00%)~1,221,983k1,222,139kp=0.810 n=6
Parse Time8.06s (± 0.89%)8.05s (± 0.41%)~8.00s8.09sp=0.573 n=6
Bind Time2.23s (± 0.49%)2.22s (± 0.66%)~2.21s2.24sp=0.232 n=6
Check Time36.38s (± 0.33%)36.47s (± 0.26%)~36.33s36.57sp=0.128 n=6
Emit Time17.45s (± 0.65%)17.42s (± 0.83%)~17.22s17.64sp=1.000 n=6
Total Time64.12s (± 0.12%)64.16s (± 0.30%)~64.01s64.50sp=1.000 n=6
mui-docs - node (v18.15.0, x64)
Errors55~~~p=1.000 n=6
Symbols1,978,5601,978,560~~~p=1.000 n=6
Types882,085882,085~~~p=1.000 n=6
Memory used1,885,326k (± 0.00%)1,885,324k (± 0.00%)~1,885,271k1,885,414kp=0.936 n=6
Parse Time8.03s (± 0.23%)8.05s (± 0.31%)~8.02s8.09sp=0.257 n=6
Bind Time2.73s (± 0.59%)2.73s (± 0.94%)~2.71s2.77sp=1.000 n=6
Check Time71.85s (± 0.43%)71.75s (± 0.77%)~70.88s72.36sp=1.000 n=6
Emit Time0.17s (± 5.72%)0.17s (± 3.72%)~0.16s0.18sp=1.000 n=6
Total Time82.78s (± 0.37%)82.70s (± 0.70%)~81.81s83.39sp=1.000 n=6
self-build-src - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,224,9881,225,002+14 (+ 0.00%)~~p=0.001 n=6
Types260,660260,757+97 (+ 0.04%)~~p=0.001 n=6
Memory used2,340,677k (± 0.04%)2,341,457k (± 0.01%)~2,341,075k2,341,716kp=0.093 n=6
Parse Time5.00s (± 1.16%)4.97s (± 0.91%)~4.90s5.02sp=0.872 n=6
Bind Time1.92s (± 0.55%)1.90s (± 0.33%)-0.01s (- 0.78%)1.89s1.91sp=0.024 n=6
Check Time33.96s (± 0.16%)33.85s (± 0.43%)~33.70s34.09sp=0.149 n=6
Emit Time2.67s (± 1.33%)2.64s (± 3.27%)~2.55s2.78sp=0.471 n=6
Total Time43.54s (± 0.21%)43.38s (± 0.37%)~43.18s43.58sp=0.054 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,224,9881,225,002+14 (+ 0.00%)~~p=0.001 n=6
Types260,660260,757+97 (+ 0.04%)~~p=0.001 n=6
Memory used2,417,289k (± 0.03%)2,417,114k (± 0.03%)~2,416,476k2,418,127kp=0.575 n=6
Parse Time7.66s (± 0.87%)7.69s (± 0.61%)~7.63s7.75sp=0.574 n=6
Bind Time2.48s (± 0.42%)2.50s (± 1.08%)~2.46s2.53sp=0.226 n=6
Check Time49.84s (± 0.34%)49.97s (± 0.57%)~49.74s50.48sp=0.630 n=6
Emit Time3.93s (± 2.44%)3.96s (± 2.18%)~3.83s4.04sp=0.471 n=6
Total Time63.93s (± 0.27%)64.14s (± 0.54%)~63.85s64.74sp=0.378 n=6
self-compiler - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols257,719257,716-3 (- 0.00%)~~p=0.001 n=6
Types104,932104,933+1 (+ 0.00%)~~p=0.001 n=6
Memory used426,507k (± 0.01%)426,530k (± 0.01%)~426,484k426,549kp=1.000 n=6
Parse Time3.38s (± 0.76%)3.35s (± 0.12%)-0.03s (- 0.89%)3.34s3.35sp=0.003 n=6
Bind Time1.32s (± 0.62%)1.33s (± 0.63%)~1.31s1.33sp=0.718 n=6
Check Time18.00s (± 0.42%)18.04s (± 0.29%)~17.96s18.09sp=0.335 n=6
Emit Time1.37s (± 1.36%)1.36s (± 1.44%)~1.33s1.38sp=0.934 n=6
Total Time24.07s (± 0.35%)24.07s (± 0.17%)~24.02s24.12sp=0.810 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors3535~~~p=1.000 n=6
Symbols224,575224,575~~~p=1.000 n=6
Types93,78593,785~~~p=1.000 n=6
Memory used369,818k (± 0.03%)369,938k (± 0.03%)~369,830k370,158kp=0.230 n=6
Parse Time2.33s (± 0.70%)2.35s (± 1.06%)~2.31s2.38sp=0.333 n=6
Bind Time1.33s (± 0.74%)1.32s (± 1.77%)~1.31s1.37sp=0.190 n=6
Check Time13.35s (± 0.35%)13.32s (± 0.19%)~13.27s13.34sp=0.106 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time17.02s (± 0.26%)16.99s (± 0.19%)~16.93s17.02sp=0.196 n=6
vscode - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols2,834,9162,834,916~~~p=1.000 n=6
Types960,806960,806~~~p=1.000 n=6
Memory used3,007,312k (± 0.00%)3,007,382k (± 0.00%)~3,007,292k3,007,458kp=0.066 n=6
Parse Time13.82s (± 0.23%)13.83s (± 0.17%)~13.80s13.86sp=0.466 n=6
Bind Time4.15s (± 0.29%)4.16s (± 0.28%)~4.14s4.17sp=0.242 n=6
Check Time74.98s (± 2.69%)75.24s (± 2.83%)~73.21s77.26sp=0.575 n=6
Emit Time21.71s (± 8.79%)21.55s (± 9.98%)~19.56s23.61sp=0.748 n=6
Total Time114.67s (± 0.18%)114.78s (± 0.13%)~114.53s114.98sp=0.199 n=6
webpack - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols266,087266,087~~~p=1.000 n=6
Types108,518108,518~~~p=1.000 n=6
Memory used410,925k (± 0.02%)410,944k (± 0.02%)~410,785k411,016kp=0.689 n=6
Parse Time4.75s (± 0.91%)4.76s (± 1.06%)~4.71s4.83sp=0.870 n=6
Bind Time2.07s (± 1.12%)2.06s (± 1.25%)~2.02s2.09sp=0.511 n=6
Check Time21.05s (± 0.39%)21.01s (± 0.52%)~20.84s21.17sp=0.748 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time27.87s (± 0.37%)27.84s (± 0.42%)~27.63s27.99sp=0.748 n=6
xstate-main - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols535,745535,745~~~p=1.000 n=6
Types182,753182,753~~~p=1.000 n=6
Memory used470,433k (± 0.01%)470,413k (± 0.01%)~470,371k470,438kp=0.378 n=6
Parse Time3.18s (± 0.74%)3.18s (± 0.61%)~3.16s3.21sp=0.745 n=6
Bind Time1.20s (± 0.53%)1.20s (± 0.82%)~1.19s1.22sp=1.000 n=6
Check Time18.39s (± 0.34%)18.42s (± 0.38%)~18.29s18.49sp=0.419 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time22.77s (± 0.33%)22.80s (± 0.38%)~22.64s22.89sp=0.572 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Compiler-Unions - node (v18.15.0, x64)
  • angular-1 - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-build-src-public-api - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • ts-pre-modules - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate-main - node (v18.15.0, x64)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

tsserver

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Compiler-UnionsTSServer - node (v18.15.0, x64)
Req 1 - updateOpen2,303ms (± 0.44%)2,304ms (± 0.54%)~2,284ms2,316msp=0.689 n=6
Req 2 - geterr5,169ms (± 0.37%)5,172ms (± 0.50%)~5,143ms5,218msp=0.810 n=6
Req 3 - references286ms (± 0.82%)286ms (± 1.92%)~280ms293msp=0.677 n=6
Req 4 - navto229ms (± 1.13%)229ms (± 0.70%)~227ms231msp=0.934 n=6
Req 5 - completionInfo count1,3571,357~~~p=1.000 n=6
Req 5 - completionInfo79ms (± 7.83%)80ms (± 7.97%)~77ms93msp=0.391 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen3,057ms (± 8.89%)2,944ms (± 0.65%)~2,920ms2,979msp=0.936 n=6
Req 2 - geterr4,973ms (±11.67%)4,782ms (± 9.43%)~4,574ms5,703msp=0.336 n=6
Req 3 - references389ms (±11.13%)390ms (±11.85%)~357ms453msp=0.872 n=6
Req 4 - navto301ms (±10.46%)303ms (± 9.15%)~277ms339msp=0.688 n=6
Req 5 - completionInfo count1,5191,519~~~p=1.000 n=6
Req 5 - completionInfo100ms (±14.46%)95ms (±16.55%)~82ms125msp=0.377 n=6
xstate-main-1-tsserver - node (v18.15.0, x64)
Req 1 - updateOpen5,146ms (± 0.48%)5,135ms (± 0.45%)~5,109ms5,167msp=0.423 n=6
Req 2 - geterr1,127ms (± 1.21%)1,126ms (± 1.14%)~1,103ms1,137msp=1.000 n=6
Req 3 - references92ms (± 3.72%)91ms (± 3.49%)~87ms95msp=0.687 n=6
Req 4 - navto453ms (± 0.72%)443ms (± 4.32%)~408ms455msp=0.561 n=6
Req 5 - completionInfo count3,4133,413~~~p=1.000 n=6
Req 5 - completionInfo871ms (± 1.81%)859ms (± 1.45%)~835ms869msp=0.230 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • CompilerTSServer - node (v18.15.0, x64)
  • Compiler-UnionsTSServer - node (v18.15.0, x64)
  • xstate-main-1-tsserver - node (v18.15.0, x64)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

startup

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
tsc-startup - node (v18.15.0, x64)
Execution time228.29ms (± 0.24%)228.02ms (± 0.17%)-0.27ms (- 0.12%)226.02ms234.14msp=0.000 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time297.33ms (± 0.26%)297.43ms (± 0.27%)+0.10ms (+ 0.03%)290.15ms303.89msp=0.010 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time237.39ms (± 0.15%)237.29ms (± 0.15%)-0.10ms (- 0.04%)235.80ms240.49msp=0.004 n=600
typescript-startup - node (v18.15.0, x64)
Execution time289.39ms (± 0.29%)289.52ms (± 0.30%)~282.69ms296.62msp=0.064 n=600
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • tsc-startup - node (v18.15.0, x64)
  • tsserver-startup - node (v18.15.0, x64)
  • tsserverlibrary-startup - node (v18.15.0, x64)
  • typescript-startup - node (v18.15.0, x64)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Developer Information:

Download Benchmarks

Comment threadsrc/compiler/scanner.ts Outdated
@typescript-bot

Copy link
Copy Markdown
Contributor

Ron Buckton (@rbuckton) Here are the results of running the top 400 repos comparing main and refs/pull/58289/merge:

Everything looks good!

@typescript-bot

Copy link
Copy Markdown
Contributor

Ron Buckton (@rbuckton) Here are the results of running the top 200 repos comparing main and refs/pull/58289/merge:

Something interesting changed - please have a look.

Details

Server exited prematurely with code unknown and signal SIGABRT

Server exited prematurely with code unknown and signal SIGABRT

Affected repos

backstage/backstage Raw error text: RepoResults8/backstage.backstage.rawError.txt in the artifact folder
Replay commands: RepoResults8/backstage.backstage.replay.txt in the artifact folder

Last few requests

{"seq":38,"type":"request","command":"definitionAndBoundSpan","arguments":{"file":"@PROJECT_ROOT@/scripts/create-github-release.js","line":93,"offset":42}}
{"seq":39,"type":"request","command":"completionInfo","arguments":{"file":"@PROJECT_ROOT@/scripts/create-github-release.js","line":193,"offset":4,"includeExternalModuleExports":false,"triggerKind":1}}
{"seq":40,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/scripts/create-github-release.js","line":193,"offset":4,"entryNames":["arguments"]}}
{"seq":41,"type":"request","command":"updateOpen","arguments":{"changedFiles":[],"closedFiles":[],"openFiles":[{"file":"@PROJECT_ROOT@/packages/techdocs-cli/cli-e2e-test.config.js","projectRootPath":"@PROJECT_ROOT@"}]}}

Repro steps

#!/bin/bash
git clone https://github.com/backstage/backstage --recurse-submodules
git -C "./backstage" reset --hard 024b530575d5d9d4d28d53db56d245d81a8c413c
# Install packages (exact steps are below, but it might be easier to follow the repo readme)
yarn --cwd "/mnt/ts_downloads/base/backstage" install --no-immutable --mode=skip-build
yarn --cwd "/mnt/ts_downloads/base/backstage/storybook" install --no-immutable --mode=skip-build
yarn --cwd "/mnt/ts_downloads/base/backstage/microsite" install --no-immutable --mode=skip-build
downloadUrl=$(curl -s "https://typescript.visualstudio.com/TypeScript/_apis/build/builds/161891/artifacts?artifactName=RepoResults8&api-version=7.0"| jq -r ".resource.downloadUrl")
wget -O RepoResults8.zip "$downloadUrl"
unzip -p RepoResults8.zip RepoResults8/backstage.backstage.replay.txt > backstage.backstage.replay.txt
npm install --no-save @typescript/server-replay

To run the repro:

# `npx tsreplay --help` to learn about helpful switches for debugging, logging, etc.
npx tsreplay ./backstage ./backstage.backstage.replay.txt <PATH_TO_tsserver.js>

Server exited prematurely with code unknown and signal SIGABRT

Server exited prematurely with code unknown and signal SIGABRT

Affected repos

calcom/cal.com Raw error text: RepoResults7/calcom.cal.com.rawError.txt in the artifact folder
Replay commands: RepoResults7/calcom.cal.com.replay.txt in the artifact folder

Last few requests

{"seq":54,"type":"request","command":"navbar","arguments":{"file":"@PROJECT_ROOT@/packages/trpc/index.ts"}}
{"seq":55,"type":"request","command":"completionInfo","arguments":{"file":"@PROJECT_ROOT@/packages/trpc/index.ts","line":1,"offset":7,"includeExternalModuleExports":false,"triggerKind":2,"triggerCharacter":""}}
{"seq":56,"type":"request","command":"updateOpen","arguments":{"changedFiles":[],"closedFiles":["@PROJECT_ROOT@/checkly.config.ts"],"openFiles":[]}}
{"seq":57,"type":"request","command":"updateOpen","arguments":{"changedFiles":[],"closedFiles":[],"openFiles":[{"file":"@PROJECT_ROOT@/packages/prisma/zod-utils.test.ts","projectRootPath":"@PROJECT_ROOT@"}]}}

Repro steps

#!/bin/bash
git clone https://github.com/calcom/cal.com --recurse-submodules
git -C "./cal.com" reset --hard 64845c670da99c16c12a794ef5695dade0d7488a
yarn --cwd "/mnt/ts_downloads/base/cal.com" install --no-immutable --mode=skip-build
downloadUrl=$(curl -s "https://typescript.visualstudio.com/TypeScript/_apis/build/builds/161891/artifacts?artifactName=RepoResults7&api-version=7.0"| jq -r ".resource.downloadUrl")
wget -O RepoResults7.zip "$downloadUrl"
unzip -p RepoResults7.zip RepoResults7/calcom.cal.com.replay.txt > calcom.cal.com.replay.txt
npm install --no-save @typescript/server-replay

To run the repro:

# `npx tsreplay --help` to learn about helpful switches for debugging, logging, etc.
npx tsreplay ./cal.com ./calcom.cal.com.replay.txt <PATH_TO_tsserver.js>

Server exited prematurely with code unknown and signal SIGABRT

Server exited prematurely with code unknown and signal SIGABRT

Affected repos

elastic/kibana Raw error text: RepoResults14/elastic.kibana.rawError.txt in the artifact folder
Replay commands: RepoResults14/elastic.kibana.replay.txt in the artifact folder

Last few requests

{"seq":805,"type":"request","command":"getOutliningSpans","arguments":{"file":"@PROJECT_ROOT@/x-pack/plugins/security_solution/common/translations.ts"}}
{"seq":806,"type":"request","command":"navtree","arguments":{"file":"@PROJECT_ROOT@/x-pack/plugins/security_solution/common/translations.ts"}}
{"seq":807,"type":"request","command":"navbar","arguments":{"file":"@PROJECT_ROOT@/x-pack/plugins/security_solution/common/translations.ts"}}
{"seq":808,"type":"request","command":"navto","arguments":{"searchValue":"a","maxResultCount":256}}

Repro steps

#!/bin/bash
git clone https://github.com/elastic/kibana --recurse-submodules
git -C "./kibana" reset --hard b1916090d03cb4038d0ae25507968dff0109a964
downloadUrl=$(curl -s "https://typescript.visualstudio.com/TypeScript/_apis/build/builds/161891/artifacts?artifactName=RepoResults14&api-version=7.0"| jq -r ".resource.downloadUrl")
wget -O RepoResults14.zip "$downloadUrl"
unzip -p RepoResults14.zip RepoResults14/elastic.kibana.replay.txt > elastic.kibana.replay.txt
npm install --no-save @typescript/server-replay

To run the repro:

# `npx tsreplay --help` to learn about helpful switches for debugging, logging, etc.
npx tsreplay ./kibana ./elastic.kibana.replay.txt <PATH_TO_tsserver.js>

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

For Uncommitted BugPR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@graphemecluster@typescript-bot@jakebailey@rbuckton@sandersn