Skip to content

fix(396): (Dis)allow Octal and Bad Escape Sequences in String and (Tagged) Template Literals - #51837

Merged
Daniel Rosenwasser (DanielRosenwasser) merged 8 commits into
microsoft:mainfrom
graphemecluster:escape-sequence
Mar 24, 2023
Merged

fix(396): (Dis)allow Octal and Bad Escape Sequences in String and (Tagged) Template Literals#51837
Daniel Rosenwasser (DanielRosenwasser) merged 8 commits into
microsoft:mainfrom
graphemecluster:escape-sequence

Conversation

@graphemecluster

@graphemeclustergraphemecluster (graphemecluster) commented Dec 9, 2022

Copy link
Copy Markdown
Contributor

#23801 makes bad escape sequences in tagged template allowable, but only in certain cases. #41030 aims to fix this but was closed.
In contrast, octal escape sequences in string literals (as in #396) should be disallowed.

Fully fixes#12700
Fixes#396
Fixes#39038
Fixes#39715
Fixes#42887
Fixes#39563 (#39698 attempts to fix this but was closed)

This PR currently disallow octal literals and escape sequences regardless of the target, strict mode or not as the Team is looking for simplicity (Refer to #396 (comment)).

@typescript-botTypeScript Bot (typescript-bot) added the For Backlog Bug PRs that fix a backlog bug label Dec 9, 2022
@graphemecluster

Copy link
Copy Markdown
ContributorAuthor

Bad escape sequences are now preserved by returning the raw string instead of "" regardless of the literal type (string or template) and whether errors should be emitted or not. If this is not desirable, I'll switch back to the empty string whenever errors are emitted.

@graphemeclustergraphemecluster (graphemecluster) changed the title Fix: Literal and Octal Escape Sequence Errorfix(396): (Dis)allow Octal and Bad Escape Sequences in String and (Tagged) Template LiteralsDec 9, 2022
@RyanCavanaugh

Copy link
Copy Markdown
Member

@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 9, 2022

Copy link
Copy Markdown
Contributor

Heya Ryan Cavanaugh (@RyanCavanaugh), I've started to run the perf test suite on this PR at d1ba506. You can monitor the build here.

Update: The results are in!

@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 9, 2022

Copy link
Copy Markdown
Contributor

Heya Ryan Cavanaugh (@RyanCavanaugh), I've started to run the parallelized Definitely Typed test suite on this PR at d1ba506. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 9, 2022

Copy link
Copy Markdown
Contributor

Heya Ryan Cavanaugh (@RyanCavanaugh), I've started to run the diff-based top-repos suite (tsserver) on this PR at d1ba506. You can monitor the build here.

Update: The results are in!

@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 9, 2022

Copy link
Copy Markdown
Contributor

Heya Ryan Cavanaugh (@RyanCavanaugh), I've started to run the diff-based user code test suite on this PR at d1ba506. You can monitor the build here.

Update: The results are in!

@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 9, 2022

Copy link
Copy Markdown
Contributor

Heya Ryan Cavanaugh (@RyanCavanaugh), I've started to run the diff-based top-repos suite on this PR at d1ba506. You can monitor the build here.

Update: The results are in!

@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 9, 2022

Copy link
Copy Markdown
Contributor

Heya Ryan Cavanaugh (@RyanCavanaugh), I've started to run the diff-based user code test suite (tsserver) on this PR at d1ba506. You can monitor the build here.

Update: The results are in!

@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 9, 2022

Copy link
Copy Markdown
Contributor

Heya Ryan Cavanaugh (@RyanCavanaugh), I've started to run the extended test suite on this PR at d1ba506. You can monitor the build here.

@typescript-bot

Copy link
Copy Markdown
Contributor

Ryan Cavanaugh (@RyanCavanaugh) Here are the results of running the user test suite comparing main and refs/pull/51837/merge:

Everything looks good!

1 similar comment
@typescript-bot

Copy link
Copy Markdown
Contributor

Ryan Cavanaugh (@RyanCavanaugh) Here are the results of running the user test suite comparing main and refs/pull/51837/merge:

Everything looks good!

@typescript-bot

Copy link
Copy Markdown
Contributor

Heya Ryan Cavanaugh (@RyanCavanaugh), I've run the RWC suite on this PR - assuming you're on the TS core team, you can view the resulting diff here.

@typescript-bot

Copy link
Copy Markdown
Contributor

Ryan Cavanaugh (@RyanCavanaugh)
The results of the perf run you requested are in!

Here they are:

Compiler

Comparison Report - main..51837
Metricmain51837DeltaBestWorst
Angular - node (v18.10.0, x64)
Memory used341,098k (± 0.01%)343,484k (± 0.02%)+2,386k (+ 0.70%)343,296k343,637k
Parse Time1.56s (± 0.52%)1.56s (± 0.60%)-0.00s (- 0.19%)1.54s1.58s
Bind Time0.53s (± 1.67%)0.53s (± 1.05%)+0.00s (+ 0.19%)0.52s0.54s
Check Time4.04s (± 0.63%)4.05s (± 0.77%)+0.01s (+ 0.32%)3.98s4.13s
Emit Time4.29s (± 0.97%)4.29s (± 0.58%)+0.00s (+ 0.07%)4.25s4.36s
Total Time10.41s (± 0.45%)10.43s (± 0.50%)+0.02s (+ 0.15%)10.30s10.57s
Compiler-Unions - node (v18.10.0, x64)
Memory used187,309k (± 1.09%)189,541k (± 1.01%)+2,232k (+ 1.19%)185,543k191,313k
Parse Time0.61s (± 1.06%)0.61s (± 1.01%)-0.00s (- 0.16%)0.60s0.63s
Bind Time0.33s (± 1.45%)0.33s (± 0.68%)+0.00s (+ 0.61%)0.32s0.33s
Check Time5.03s (± 0.68%)5.04s (± 0.72%)+0.01s (+ 0.16%)4.94s5.10s
Emit Time1.55s (± 0.91%)1.55s (± 0.86%)+0.00s (+ 0.19%)1.52s1.58s
Total Time7.52s (± 0.59%)7.53s (± 0.51%)+0.01s (+ 0.15%)7.41s7.60s
Monaco - node (v18.10.0, x64)
Memory used320,484k (± 0.01%)325,258k (± 0.01%)+4,774k (+ 1.49%)325,156k325,338k
Parse Time1.15s (± 1.14%)1.16s (± 1.16%)+0.01s (+ 1.04%)1.13s1.19s
Bind Time0.48s (± 0.70%)0.50s (± 0.73%)+0.01s (+ 2.69%)0.49s0.50s
Check Time3.86s (± 0.58%)3.85s (± 0.76%)-0.01s (- 0.18%)3.81s3.96s
Emit Time2.26s (± 1.23%)2.25s (± 0.97%)-0.01s (- 0.49%)2.20s2.30s
Total Time7.75s (± 0.57%)7.76s (± 0.48%)+0.00s (+ 0.03%)7.69s7.88s
TFS - node (v18.10.0, x64)
Memory used283,946k (± 0.27%)286,190k (± 0.25%)+2,245k (+ 0.79%)284,945k287,019k
Parse Time0.96s (± 1.61%)0.94s (± 1.27%)-0.02s (- 2.29%)0.92s0.97s
Bind Time0.46s (± 7.07%)0.52s (± 8.90%)+0.07s (+14.91%)0.44s0.58s
Check Time3.80s (± 0.44%)3.78s (± 0.54%)-0.02s (- 0.55%)3.74s3.83s
Emit Time2.22s (± 0.91%)2.21s (± 0.66%)-0.01s (- 0.59%)2.18s2.25s
Total Time7.44s (± 0.53%)7.45s (± 0.58%)+0.01s (+ 0.13%)7.34s7.50s
material-ui - node (v18.10.0, x64)
Memory used436,043k (± 0.02%)437,810k (± 0.01%)+1,766k (+ 0.41%)437,700k437,926k
Parse Time1.31s (± 1.04%)1.32s (± 0.59%)+0.01s (+ 0.61%)1.31s1.34s
Bind Time0.48s (± 3.19%)0.50s (± 2.30%)+0.03s (+ 5.66%)0.46s0.52s
Check Time10.37s (± 0.72%)10.32s (± 1.22%)-0.05s (- 0.48%)10.12s10.55s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time12.16s (± 0.72%)12.14s (± 1.05%)-0.02s (- 0.13%)11.95s12.40s
xstate - node (v18.10.0, x64)
Memory used518,581k (± 0.01%)522,656k (± 0.01%)+4,075k (+ 0.79%)522,540k522,846k
Parse Time1.88s (± 0.43%)1.89s (± 0.39%)+0.01s (+ 0.37%)1.88s1.91s
Bind Time0.71s (± 3.56%)0.76s (± 3.82%)+0.05s (+ 7.61%)0.70s0.82s
Check Time1.05s (± 0.91%)1.03s (± 0.46%)-0.01s (- 1.24%)1.02s1.04s
Emit Time0.05s (± 0.00%)0.05s (± 0.00%)0.00s ( 0.00%)0.05s0.05s
Total Time3.70s (± 0.77%)3.74s (± 0.84%)+0.05s (+ 1.27%)3.67s3.81s
Angular - node (v16.17.1, x64)
Memory used340,472k (± 0.02%)342,929k (± 0.02%)+2,456k (+ 0.72%)342,735k342,996k
Parse Time1.87s (± 0.64%)1.86s (± 0.18%)-0.01s (- 0.37%)1.85s1.87s
Bind Time0.65s (± 0.69%)0.65s (± 0.62%)+0.00s (+ 0.15%)0.64s0.66s
Check Time5.17s (± 0.51%)5.13s (± 0.50%)-0.04s (- 0.77%)5.07s5.19s
Emit Time5.13s (± 1.10%)5.06s (± 0.66%)-0.07s (- 1.27%)4.99s5.14s
Total Time12.81s (± 0.59%)12.69s (± 0.39%)-0.12s (- 0.91%)12.60s12.78s
Compiler-Unions - node (v16.17.1, x64)
Memory used187,977k (± 0.64%)189,196k (± 0.65%)+1,219k (+ 0.65%)187,137k190,735k
Parse Time0.80s (± 1.20%)0.79s (± 0.56%)-0.00s (- 0.38%)0.78s0.80s
Bind Time0.42s (± 0.79%)0.42s (± 0.82%)-0.00s (- 0.71%)0.41s0.42s
Check Time6.07s (± 0.57%)6.01s (± 0.63%)-0.06s (- 0.97%)5.95s6.11s
Emit Time1.95s (± 1.46%)1.94s (± 1.05%)-0.01s (- 0.36%)1.91s1.98s
Total Time9.24s (± 0.61%)9.16s (± 0.52%)-0.08s (- 0.83%)9.06s9.25s
Monaco - node (v16.17.1, x64)
Memory used319,822k (± 0.04%)324,581k (± 0.02%)+4,759k (+ 1.49%)324,493k324,683k
Parse Time1.41s (± 0.78%)1.41s (± 0.64%)-0.00s (- 0.14%)1.39s1.43s
Bind Time0.59s (± 0.56%)0.60s (± 0.74%)+0.01s (+ 2.03%)0.59s0.61s
Check Time4.87s (± 0.37%)4.86s (± 0.41%)-0.01s (- 0.12%)4.80s4.90s
Emit Time2.74s (± 0.93%)2.72s (± 0.93%)-0.02s (- 0.73%)2.68s2.78s
Total Time9.61s (± 0.47%)9.59s (± 0.46%)-0.02s (- 0.20%)9.51s9.69s
TFS - node (v16.17.1, x64)
Memory used282,290k (± 0.01%)284,407k (± 0.01%)+2,117k (+ 0.75%)284,351k284,434k
Parse Time1.17s (± 0.79%)1.15s (± 0.91%)-0.02s (- 2.05%)1.13s1.17s
Bind Time0.66s (± 4.99%)0.64s (± 4.71%)-0.01s (- 2.13%)0.59s0.70s
Check Time4.79s (± 0.34%)4.77s (± 0.38%)-0.02s (- 0.35%)4.73s4.81s
Emit Time2.82s (± 2.33%)2.79s (± 2.39%)-0.03s (- 1.10%)2.68s2.94s
Total Time9.44s (± 0.84%)9.35s (± 0.87%)-0.09s (- 0.94%)9.16s9.53s
material-ui - node (v16.17.1, x64)
Memory used435,343k (± 0.00%)437,090k (± 0.01%)+1,747k (+ 0.40%)437,048k437,249k
Parse Time1.62s (± 0.75%)1.63s (± 0.56%)+0.01s (+ 0.49%)1.61s1.65s
Bind Time0.50s (± 0.68%)0.50s (± 0.94%)-0.00s (- 0.60%)0.49s0.51s
Check Time11.81s (± 0.90%)11.76s (± 0.56%)-0.05s (- 0.40%)11.66s11.90s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time13.93s (± 0.80%)13.89s (± 0.48%)-0.04s (- 0.30%)13.79s14.05s
xstate - node (v16.17.1, x64)
Memory used516,198k (± 0.01%)520,332k (± 0.02%)+4,133k (+ 0.80%)520,207k520,531k
Parse Time2.27s (± 0.33%)2.28s (± 0.39%)+0.00s (+ 0.18%)2.25s2.29s
Bind Time0.83s (± 0.67%)0.83s (± 0.74%)-0.00s (- 0.12%)0.82s0.85s
Check Time1.36s (± 0.69%)1.36s (± 0.52%)+0.00s (+ 0.15%)1.35s1.38s
Emit Time0.06s (± 0.00%)0.06s (± 0.00%)0.00s ( 0.00%)0.06s0.06s
Total Time4.52s (± 0.29%)4.52s (± 0.28%)+0.00s (+ 0.09%)4.49s4.55s
Angular - node (v14.15.1, x64)
Memory used334,030k (± 0.01%)336,445k (± 0.01%)+2,416k (+ 0.72%)336,395k336,469k
Parse Time2.03s (± 0.45%)2.05s (± 0.33%)+0.02s (+ 1.13%)2.04s2.07s
Bind Time0.69s (± 0.32%)0.70s (± 0.74%)+0.01s (+ 1.45%)0.69s0.71s
Check Time5.52s (± 0.67%)5.49s (± 0.49%)-0.03s (- 0.56%)5.45s5.59s
Emit Time5.35s (± 0.59%)5.39s (± 0.62%)+0.05s (+ 0.86%)5.33s5.48s
Total Time13.59s (± 0.48%)13.64s (± 0.32%)+0.05s (+ 0.36%)13.53s13.75s
Compiler-Unions - node (v14.15.1, x64)
Memory used183,024k (± 0.67%)182,762k (± 0.51%)-262k (- 0.14%)182,100k185,554k
Parse Time0.89s (± 0.79%)0.89s (± 0.76%)+0.01s (+ 0.56%)0.88s0.91s
Bind Time0.46s (± 1.08%)0.46s (± 0.80%)0.00s ( 0.00%)0.45s0.46s
Check Time6.38s (± 0.66%)6.36s (± 0.56%)-0.02s (- 0.30%)6.30s6.44s
Emit Time2.05s (± 1.19%)2.06s (± 2.12%)+0.01s (+ 0.24%)2.01s2.22s
Total Time9.77s (± 0.53%)9.77s (± 0.70%)-0.01s (- 0.06%)9.68s10.01s
Monaco - node (v14.15.1, x64)
Memory used314,562k (± 0.01%)319,487k (± 0.04%)+4,925k (+ 1.57%)319,381k320,057k
Parse Time1.56s (± 0.37%)1.56s (± 0.44%)+0.01s (+ 0.45%)1.55s1.58s
Bind Time0.64s (± 1.08%)0.64s (± 0.46%)+0.01s (+ 1.10%)0.64s0.65s
Check Time5.20s (± 0.29%)5.20s (± 0.39%)-0.00s (- 0.04%)5.15s5.25s
Emit Time2.87s (± 0.46%)2.87s (± 0.67%)-0.00s (- 0.00%)2.83s2.93s
Total Time10.26s (± 0.18%)10.27s (± 0.36%)+0.01s (+ 0.14%)10.22s10.40s
TFS - node (v14.15.1, x64)
Memory used279,400k (± 0.01%)280,847k (± 0.26%)+1,447k (+ 0.52%)279,357k281,505k
Parse Time1.34s (± 1.96%)1.31s (± 0.86%)-0.03s (- 2.09%)1.29s1.34s
Bind Time0.59s (± 0.68%)0.60s (± 0.78%)+0.01s (+ 1.87%)0.59s0.61s
Check Time5.12s (± 0.45%)5.10s (± 0.57%)-0.03s (- 0.57%)5.03s5.16s
Emit Time3.10s (± 0.91%)3.07s (± 0.59%)-0.03s (- 0.81%)3.02s3.11s
Total Time10.15s (± 0.39%)10.08s (± 0.50%)-0.07s (- 0.68%)9.97s10.19s
material-ui - node (v14.15.1, x64)
Memory used430,803k (± 0.01%)432,550k (± 0.01%)+1,748k (+ 0.41%)432,469k432,613k
Parse Time1.85s (± 0.28%)1.86s (± 0.51%)+0.01s (+ 0.38%)1.84s1.88s
Bind Time0.53s (± 0.63%)0.54s (± 1.03%)+0.01s (+ 1.51%)0.53s0.55s
Check Time12.25s (± 0.56%)12.18s (± 0.36%)-0.07s (- 0.60%)12.10s12.31s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time14.63s (± 0.44%)14.57s (± 0.32%)-0.06s (- 0.38%)14.51s14.71s
xstate - node (v14.15.1, x64)
Memory used504,569k (± 0.02%)508,561k (± 0.01%)+3,991k (+ 0.79%)508,449k508,719k
Parse Time2.56s (± 0.56%)2.58s (± 0.53%)+0.02s (+ 0.70%)2.56s2.62s
Bind Time0.84s (± 0.43%)0.84s (± 0.68%)-0.00s (- 0.47%)0.83s0.85s
Check Time1.47s (± 0.51%)1.46s (± 0.20%)-0.01s (- 0.54%)1.46s1.47s
Emit Time0.07s (± 0.00%)0.07s (± 0.00%)0.00s ( 0.00%)0.07s0.07s
Total Time4.94s (± 0.33%)4.95s (± 0.34%)+0.01s (+ 0.18%)4.93s5.00s
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-131-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v18.10.0, x64)
  • node (v16.17.1, x64)
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v18.10.0, x64)
  • Angular - node (v16.17.1, x64)
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v18.10.0, x64)
  • Compiler-Unions - node (v16.17.1, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v18.10.0, x64)
  • Monaco - node (v16.17.1, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v18.10.0, x64)
  • TFS - node (v16.17.1, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v18.10.0, x64)
  • material-ui - node (v16.17.1, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v18.10.0, x64)
  • xstate - node (v16.17.1, x64)
  • xstate - node (v14.15.1, x64)
BenchmarkNameIterations
Current5183710
Baselinemain10

TSServer

Comparison Report - main..51837
Metricmain51837DeltaBestWorst
Compiler-UnionsTSServer - node (v18.10.0, x64)
Req 1 - updateOpen1,058ms (± 0.90%)1,062ms (± 1.13%)+4ms (+ 0.40%)1,035ms1,097ms
Req 2 - geterr2,595ms (± 0.69%)2,583ms (± 0.81%)-12ms (- 0.45%)2,546ms2,638ms
Req 3 - references164ms (± 0.24%)165ms (± 0.64%)+1ms (+ 0.79%)163ms168ms
Req 4 - navto139ms (± 0.59%)139ms (± 0.80%)0ms ( 0.00%)136ms141ms
Req 5 - completionInfo count1,356 (± 0.00%)1,356 (± 0.00%)0 ( 0.00%)1,3561,356
Req 5 - completionInfo61ms (± 2.35%)60ms (± 4.61%)-1ms (- 2.29%)52ms65ms
CompilerTSServer - node (v18.10.0, x64)
Req 1 - updateOpen1,103ms (± 0.51%)1,116ms (± 0.79%)+13ms (+ 1.16%)1,103ms1,131ms
Req 2 - geterr1,602ms (± 0.64%)1,614ms (± 0.63%)+12ms (+ 0.73%)1,596ms1,634ms
Req 3 - references169ms (± 0.41%)168ms (± 0.59%)-1ms (- 0.42%)165ms170ms
Req 4 - navto152ms (± 0.55%)151ms (± 0.74%)-1ms (- 0.66%)148ms153ms
Req 5 - completionInfo count1,518 (± 0.00%)1,518 (± 0.00%)0 ( 0.00%)1,5181,518
Req 5 - completionInfo53ms (± 1.32%)53ms (± 1.55%)-0ms (- 0.38%)51ms55ms
xstateTSServer - node (v18.10.0, x64)
Req 1 - updateOpen1,504ms (± 0.46%)1,519ms (± 0.82%)+14ms (+ 0.94%)1,502ms1,560ms
Req 2 - geterr558ms (± 0.66%)556ms (± 0.69%)-1ms (- 0.23%)547ms564ms
Req 3 - references58ms (± 1.62%)58ms (± 1.15%)-0ms (- 0.51%)57ms59ms
Req 4 - navto195ms (± 0.78%)197ms (± 0.85%)+2ms (+ 0.77%)193ms201ms
Req 5 - completionInfo count3,154 (± 0.00%)3,154 (± 0.00%)0 ( 0.00%)3,1543,154
Req 5 - completionInfo215ms (± 1.43%)215ms (± 1.51%)+1ms (+ 0.33%)205ms220ms
Compiler-UnionsTSServer - node (v16.17.1, x64)
Req 1 - updateOpen1,301ms (± 0.63%)1,304ms (± 0.55%)+3ms (+ 0.25%)1,290ms1,322ms
Req 2 - geterr3,231ms (± 0.43%)3,210ms (± 0.61%)-20ms (- 0.63%)3,170ms3,259ms
Req 3 - references192ms (± 0.55%)189ms (± 0.87%)-3ms (- 1.61%)186ms194ms
Req 4 - navto152ms (± 0.66%)152ms (± 1.10%)-0ms (- 0.26%)147ms155ms
Req 5 - completionInfo count1,356 (± 0.00%)1,356 (± 0.00%)0 ( 0.00%)1,3561,356
Req 5 - completionInfo62ms (± 2.82%)66ms (± 7.02%)+4ms (+ 6.83%)56ms71ms
CompilerTSServer - node (v16.17.1, x64)
Req 1 - updateOpen1,382ms (± 0.87%)1,381ms (± 0.71%)-1ms (- 0.08%)1,360ms1,399ms
Req 2 - geterr2,112ms (± 0.67%)2,111ms (± 0.44%)-1ms (- 0.05%)2,090ms2,137ms
Req 3 - references197ms (± 0.38%)200ms (± 0.67%)+3ms (+ 1.37%)198ms204ms
Req 4 - navto165ms (± 1.46%)165ms (± 0.78%)-1ms (- 0.30%)162ms168ms
Req 5 - completionInfo count1,518 (± 0.00%)1,518 (± 0.00%)0 ( 0.00%)1,5181,518
Req 5 - completionInfo56ms (± 2.51%)57ms (± 3.02%)+2ms (+ 2.87%)54ms60ms
xstateTSServer - node (v16.17.1, x64)
Req 1 - updateOpen1,817ms (± 0.43%)1,822ms (± 0.56%)+5ms (+ 0.29%)1,811ms1,855ms
Req 2 - geterr721ms (± 0.66%)715ms (± 0.59%)-6ms (- 0.83%)708ms729ms
Req 3 - references68ms (± 1.48%)69ms (± 1.43%)+1ms (+ 1.62%)67ms71ms
Req 4 - navto197ms (± 0.81%)198ms (± 1.14%)+1ms (+ 0.56%)193ms203ms
Req 5 - completionInfo count3,154 (± 0.00%)3,154 (± 0.00%)0 ( 0.00%)3,1543,154
Req 5 - completionInfo254ms (± 0.81%)257ms (± 1.30%)+3ms (+ 1.30%)250ms268ms
Compiler-UnionsTSServer - node (v14.15.1, x64)
Req 1 - updateOpen1,454ms (± 0.40%)1,457ms (± 0.59%)+3ms (+ 0.23%)1,441ms1,487ms
Req 2 - geterr3,448ms (± 0.59%)3,439ms (± 0.69%)-9ms (- 0.25%)3,391ms3,480ms
Req 3 - references206ms (± 0.94%)205ms (± 0.35%)-1ms (- 0.58%)204ms207ms
Req 4 - navto162ms (± 1.01%)162ms (± 0.90%)+0ms (+ 0.12%)159ms165ms
Req 5 - completionInfo count1,356 (± 0.00%)1,356 (± 0.00%)0 ( 0.00%)1,3561,356
Req 5 - completionInfo58ms (± 1.76%)57ms (± 0.78%)-0ms (- 0.52%)56ms58ms
CompilerTSServer - node (v14.15.1, x64)
Req 1 - updateOpen1,524ms (± 0.49%)1,534ms (± 0.45%)+10ms (+ 0.68%)1,524ms1,553ms
Req 2 - geterr2,298ms (± 0.59%)2,282ms (± 0.34%)-16ms (- 0.70%)2,263ms2,294ms
Req 3 - references217ms (± 0.79%)216ms (± 0.79%)-1ms (- 0.37%)214ms221ms
Req 4 - navto175ms (± 0.81%)174ms (± 0.58%)-1ms (- 0.52%)171ms176ms
Req 5 - completionInfo count1,518 (± 0.00%)1,518 (± 0.00%)0 ( 0.00%)1,5181,518
Req 5 - completionInfo56ms (± 1.19%)56ms (± 0.85%)-0ms (- 0.54%)55ms57ms
xstateTSServer - node (v14.15.1, x64)
Req 1 - updateOpen1,993ms (± 0.35%)1,997ms (± 0.55%)+4ms (+ 0.20%)1,981ms2,026ms
Req 2 - geterr746ms (± 0.36%)747ms (± 0.40%)+1ms (+ 0.15%)741ms755ms
Req 3 - references72ms (± 1.17%)70ms (± 1.42%)-2ms (- 2.23%)69ms72ms
Req 4 - navto218ms (± 0.62%)221ms (± 0.83%)+2ms (+ 1.10%)217ms226ms
Req 5 - completionInfo count3,154 (± 0.00%)3,154 (± 0.00%)0 ( 0.00%)3,1543,154
Req 5 - completionInfo270ms (± 0.61%)269ms (± 0.53%)-0ms (- 0.07%)266ms273ms
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-131-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v18.10.0, x64)
  • node (v16.17.1, x64)
  • node (v14.15.1, x64)
Scenarios
  • Compiler-UnionsTSServer - node (v18.10.0, x64)
  • Compiler-UnionsTSServer - node (v16.17.1, x64)
  • Compiler-UnionsTSServer - node (v14.15.1, x64)
  • CompilerTSServer - node (v18.10.0, x64)
  • CompilerTSServer - node (v16.17.1, x64)
  • CompilerTSServer - node (v14.15.1, x64)
  • xstateTSServer - node (v18.10.0, x64)
  • xstateTSServer - node (v16.17.1, x64)
  • xstateTSServer - node (v14.15.1, x64)
BenchmarkNameIterations
Current5183710
Baselinemain10

Startup

Comparison Report - main..51837
Metricmain51837DeltaBestWorst
tsc-startup - node (v16.17.1, x64)
Execution time117.31ms (± 0.40%)118.46ms (± 0.49%)+1.15ms (+ 0.98%)115.98ms126.77ms
tsserver-startup - node (v16.17.1, x64)
Execution time197.86ms (± 0.39%)197.65ms (± 0.30%)-0.20ms (- 0.10%)194.34ms206.15ms
tsserverlibrary-startup - node (v16.17.1, x64)
Execution time193.96ms (± 0.44%)192.53ms (± 0.34%)-1.43ms (- 0.74%)189.52ms201.77ms
typescript-startup - node (v16.17.1, x64)
Execution time178.59ms (± 0.41%)177.53ms (± 0.33%)-1.06ms (- 0.59%)175.01ms185.88ms
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-131-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v16.17.1, x64)
Scenarios
  • tsc-startup - node (v16.17.1, x64)
  • tsserver-startup - node (v16.17.1, x64)
  • tsserverlibrary-startup - node (v16.17.1, x64)
  • typescript-startup - node (v16.17.1, x64)
BenchmarkNameIterations
Current5183710
Baselinemain10

Developer Information:

Download Benchmark

@typescript-bot

Copy link
Copy Markdown
Contributor

Ryan Cavanaugh (@RyanCavanaugh) Here are the results of running the top-repos suite comparing main and refs/pull/51837/merge:

Everything looks good!

@typescript-bot

Copy link
Copy Markdown
Contributor

Ryan Cavanaugh (@RyanCavanaugh) Here are the results of running the top-repos suite comparing main and refs/pull/51837/merge:

Something interesting changed - please have a look.

Details

backstage/backstage

⚠️ Note that built also had errors ⚠️
Req #820 - completionInfo
at hasCovariantVoidArgument (/typescript-main/built/local/tsserver.js:59166:91)
at relateVariances (/typescript-main/built/local/tsserver.js:58416:64)
at structuredTypeRelatedToWorker (/typescript-main/built/local/tsserver.js:58085:32)
at structuredTypeRelatedTo (/typescript-main/built/local/tsserver.js:58006:21)
at recursiveTypeRelatedTo (/typescript-main/built/local/tsserver.js:57976:19)
at isRelatedTo (/typescript-main/built/local/tsserver.js:57535:16)
at compareProperties2 (/typescript-main/built/local/tsserver.js:59322:12)
at propertiesIdenticalTo (/typescript-main/built/local/tsserver.js:58784:25)
at propertiesRelatedTo (/typescript-main/built/local/tsserver.js:58636:16)
at structuredTypeRelatedToWorker (/typescript-main/built/local/tsserver.js:58375:21)
at structuredTypeRelatedTo (/typescript-main/built/local/tsserver.js:58006:21)
at recursiveTypeRelatedTo (/typescript-main/built/local/tsserver.js:57976:19)
at isRelatedTo (/typescript-main/built/local/tsserver.js:57535:16)
at checkTypeRelatedTo (/typescript-main/built/local/tsserver.js:57269:20)
at isTypeRelatedTo (/typescript-main/built/local/tsserver.js:57224:14)
at isTypeIdenticalTo (/typescript-main/built/local/tsserver.js:56553:12)
at isTypeOrBaseIdenticalTo (/typescript-main/built/local/tsserver.js:60769:42)
at inferFromMatchingTypes (/typescript-main/built/local/tsserver.js:60439:15)
at inferFromTypes (/typescript-main/built/local/tsserver.js:60271:44)
at inferTypes (/typescript-main/built/local/tsserver.js:60246:5)
at inferReverseMappedType (/typescript-main/built/local/tsserver.js:60079:5)
at /typescript-main/built/local/tsserver.js:60058:65
at map (/typescript-main/built/local/tsserver.js:2903:19)
at createReverseMappedType (/typescript-main/built/local/tsserver.js:60058:28)
at inferTypeForHomomorphicMappedType (/typescript-main/built/local/tsserver.js:60042:18)
at inferToMappedType (/typescript-main/built/local/tsserver.js:60559:32)
at inferFromObjectTypes (/typescript-main/built/local/tsserver.js:60646:13)
at invokeOnce (/typescript-main/built/local/tsserver.js:60424:9)
at inferFromTypes (/typescript-main/built/local/tsserver.js:60382:11)
at inferWithPriority (/typescript-main/built/local/tsserver.js:60389:7)
at inferFromObjectTypes (/typescript-main/built/local/tsserver.js:60687:17)
at invokeOnce (/typescript-main/built/local/tsserver.js:60424:9)
at inferFromTypes (/typescript-main/built/local/tsserver.js:60382:11)
at inferToMultipleTypes (/typescript-main/built/local/tsserver.js:60509:15)
at inferFromTypes (/typescript-main/built/local/tsserver.js:60363:9)
at inferFromProperties (/typescript-main/built/local/tsserver.js:60716:11)
at inferFromObjectTypes (/typescript-main/built/local/tsserver.js:60705:9)
at invokeOnce (/typescript-main/built/local/tsserver.js:60424:9)
at inferFromTypes (/typescript-main/built/local/tsserver.js:60382:11)
at inferTypes (/typescript-main/built/local/tsserver.js:60246:5)
at inferTypeArguments (/typescript-main/built/local/tsserver.js:65997:11)
at chooseOverload (/typescript-main/built/local/tsserver.js:66618:33)
at resolveCall (/typescript-main/built/local/tsserver.js:66485:16)
at resolveCallExpression (/typescript-main/built/local/tsserver.js:66816:12)
at resolveSignature (/typescript-main/built/local/tsserver.js:67161:16)
at getResolvedSignature (/typescript-main/built/local/tsserver.js:67181:20)
at getContextualTypeForArgumentAtIndex (/typescript-main/built/local/tsserver.js:63499:112)
at getContextualTypeForArgument (/typescript-main/built/local/tsserver.js:63493:39)
at getContextualType2 (/typescript-main/built/local/tsserver.js:63871:16)
at getApparentTypeOfContextualType (/typescript-main/built/local/tsserver.js:63815:120)
at getContextualTypeForObjectLiteralElement (/typescript-main/built/local/tsserver.js:63695:18)
at getContextualType2 (/typescript-main/built/local/tsserver.js:63879:16)
at getApparentTypeOfContextualType (/typescript-main/built/local/tsserver.js:63815:120)
at getContextualType2 (/typescript-main/built/local/tsserver.js:63884:22)
at Object.getContextualType (/typescript-main/built/local/tsserver.js:43268:14)
at getContextualType (/typescript-main/built/local/tsserver.js:134765:348)
at getCompletionData (/typescript-main/built/local/tsserver.js:134989:43)
at Object.getCompletionsAtPosition (/typescript-main/built/local/tsserver.js:133411:26)
at Object.getCompletionsAtPosition2 [as getCompletionsAtPosition] (/typescript-main/built/local/tsserver.js:121937:35)
at IOSession.getCompletions (/typescript-main/built/local/tsserver.js:159895:54)
at completionInfo (/typescript-main/built/local/tsserver.js:158576:43)
at /typescript-main/built/local/tsserver.js:160605:69
at IOSession.executeWithRequestId (/typescript-main/built/local/tsserver.js:160597:14)
at IOSession.executeCommand (/typescript-main/built/local/tsserver.js:160605:29)
at IOSession.onMessage (/typescript-main/built/local/tsserver.js:160633:51)
at Interface.<anonymous> (/typescript-main/built/local/tsserver.js:162032:14)
Req #820 - completionInfo
at hasCovariantVoidArgument (/typescript-51837/built/local/tsserver.js:59209:91)
at relateVariances (/typescript-51837/built/local/tsserver.js:58459:64)
at structuredTypeRelatedToWorker (/typescript-51837/built/local/tsserver.js:58128:32)
at structuredTypeRelatedTo (/typescript-51837/built/local/tsserver.js:58049:21)
at recursiveTypeRelatedTo (/typescript-51837/built/local/tsserver.js:58019:19)
at isRelatedTo (/typescript-51837/built/local/tsserver.js:57578:16)
at compareProperties2 (/typescript-51837/built/local/tsserver.js:59365:12)
at propertiesIdenticalTo (/typescript-51837/built/local/tsserver.js:58827:25)
at propertiesRelatedTo (/typescript-51837/built/local/tsserver.js:58679:16)
at structuredTypeRelatedToWorker (/typescript-51837/built/local/tsserver.js:58418:21)
at structuredTypeRelatedTo (/typescript-51837/built/local/tsserver.js:58049:21)
at recursiveTypeRelatedTo (/typescript-51837/built/local/tsserver.js:58019:19)
at isRelatedTo (/typescript-51837/built/local/tsserver.js:57578:16)
at checkTypeRelatedTo (/typescript-51837/built/local/tsserver.js:57312:20)
at isTypeRelatedTo (/typescript-51837/built/local/tsserver.js:57267:14)
at isTypeIdenticalTo (/typescript-51837/built/local/tsserver.js:56596:12)
at isTypeOrBaseIdenticalTo (/typescript-51837/built/local/tsserver.js:60812:42)
at inferFromMatchingTypes (/typescript-51837/built/local/tsserver.js:60482:15)
at inferFromTypes (/typescript-51837/built/local/tsserver.js:60314:44)
at inferTypes (/typescript-51837/built/local/tsserver.js:60289:5)
at inferReverseMappedType (/typescript-51837/built/local/tsserver.js:60122:5)
at /typescript-51837/built/local/tsserver.js:60101:65
at map (/typescript-51837/built/local/tsserver.js:2903:19)
at createReverseMappedType (/typescript-51837/built/local/tsserver.js:60101:28)
at inferTypeForHomomorphicMappedType (/typescript-51837/built/local/tsserver.js:60085:18)
at inferToMappedType (/typescript-51837/built/local/tsserver.js:60602:32)
at inferFromObjectTypes (/typescript-51837/built/local/tsserver.js:60689:13)
at invokeOnce (/typescript-51837/built/local/tsserver.js:60467:9)
at inferFromTypes (/typescript-51837/built/local/tsserver.js:60425:11)
at inferWithPriority (/typescript-51837/built/local/tsserver.js:60432:7)
at inferFromObjectTypes (/typescript-51837/built/local/tsserver.js:60730:17)
at invokeOnce (/typescript-51837/built/local/tsserver.js:60467:9)
at inferFromTypes (/typescript-51837/built/local/tsserver.js:60425:11)
at inferToMultipleTypes (/typescript-51837/built/local/tsserver.js:60552:15)
at inferFromTypes (/typescript-51837/built/local/tsserver.js:60406:9)
at inferFromProperties (/typescript-51837/built/local/tsserver.js:60759:11)
at inferFromObjectTypes (/typescript-51837/built/local/tsserver.js:60748:9)
at invokeOnce (/typescript-51837/built/local/tsserver.js:60467:9)
at inferFromTypes (/typescript-51837/built/local/tsserver.js:60425:11)
at inferTypes (/typescript-51837/built/local/tsserver.js:60289:5)
at inferTypeArguments (/typescript-51837/built/local/tsserver.js:66040:11)
at chooseOverload (/typescript-51837/built/local/tsserver.js:66661:33)
at resolveCall (/typescript-51837/built/local/tsserver.js:66528:16)
at resolveCallExpression (/typescript-51837/built/local/tsserver.js:66859:12)
at resolveSignature (/typescript-51837/built/local/tsserver.js:67204:16)
at getResolvedSignature (/typescript-51837/built/local/tsserver.js:67224:20)
at getContextualTypeForArgumentAtIndex (/typescript-51837/built/local/tsserver.js:63542:112)
at getContextualTypeForArgument (/typescript-51837/built/local/tsserver.js:63536:39)
at getContextualType2 (/typescript-51837/built/local/tsserver.js:63914:16)
at getApparentTypeOfContextualType (/typescript-51837/built/local/tsserver.js:63858:120)
at getContextualTypeForObjectLiteralElement (/typescript-51837/built/local/tsserver.js:63738:18)
at getContextualType2 (/typescript-51837/built/local/tsserver.js:63922:16)
at getApparentTypeOfContextualType (/typescript-51837/built/local/tsserver.js:63858:120)
at getContextualType2 (/typescript-51837/built/local/tsserver.js:63927:22)
at Object.getContextualType (/typescript-51837/built/local/tsserver.js:43311:14)
at getContextualType (/typescript-51837/built/local/tsserver.js:134808:348)
at getCompletionData (/typescript-51837/built/local/tsserver.js:135032:43)
at Object.getCompletionsAtPosition (/typescript-51837/built/local/tsserver.js:133454:26)
at Object.getCompletionsAtPosition2 [as getCompletionsAtPosition] (/typescript-51837/built/local/tsserver.js:121980:35)
at IOSession.getCompletions (/typescript-51837/built/local/tsserver.js:159938:54)
at completionInfo (/typescript-51837/built/local/tsserver.js:158619:43)
at /typescript-51837/built/local/tsserver.js:160648:69
at IOSession.executeWithRequestId (/typescript-51837/built/local/tsserver.js:160640:14)
at IOSession.executeCommand (/typescript-51837/built/local/tsserver.js:160648:29)
at IOSession.onMessage (/typescript-51837/built/local/tsserver.js:160676:51)
at Interface.<anonymous> (/typescript-51837/built/local/tsserver.js:162075:14)

That is a filtered view of the text. To see the raw error text, go to RepoResults4/backstage.backstage.rawError.txt in the artifact folder

Last few requests

{"seq":817,"type":"request","command":"definitionAndBoundSpan","arguments":{"file":"@PROJECT_ROOT@/packages/backend-test-utils/src/next/wiring/TestBackend.test.ts","line":52,"offset":12}}
{"seq":818,"type":"request","command":"references","arguments":{"file":"@PROJECT_ROOT@/packages/backend-test-utils/src/next/wiring/TestBackend.test.ts","line":52,"offset":12}}
{"seq":819,"type":"request","command":"completionInfo","arguments":{"file":"@PROJECT_ROOT@/packages/backend-test-utils/src/next/wiring/TestBackend.test.ts","line":52,"offset":12,"includeExternalModuleExports":false,"includeInsertTextCompletions":true,"triggerKind":1}}
{"seq":820,"type":"request","command":"completionInfo","arguments":{"file":"@PROJECT_ROOT@/packages/backend-test-utils/src/next/wiring/TestBackend.test.ts","line":53,"offset":9,"includeExternalModuleExports":false,"includeInsertTextCompletions":true,"triggerKind":1}}

Repro Steps

  1. git clone https://github.com/backstage/backstage --recurse-submodules
  2. In dir backstage, run git reset --hard dfd57a9a1dc8360687c54e891d6cf72545ffbb7c
  3. Install packages (exact steps are below, but it might be easier to follow the repo readme)
    1. In dir backstage/cypress, run yarn install --no-immutable --mode=skip-build
    2. In dir backstage/microsite, run yarn install --no-immutable --mode=skip-build
    3. In dir backstage, run yarn install --no-immutable --mode=skip-build
    4. In dir backstage/storybook, run yarn install --no-immutable --mode=skip-build
  4. Back in the initial folder, download RepoResults4/backstage.backstage.replay.txt from the artifact folder
  5. npm install --no-save @typescript/server-replay
  6. npx tsreplay ./backstage ./backstage.backstage.replay.txt path/to/tsserver.js
  7. npx tsreplay --help to learn about helpful switches for debugging, logging, etc

felixrieseberg/windows95

⚠️ Note that built also had errors ⚠️
Req #876 - references
at formatMessage2 (/typescript-main/built/local/tsserver.js:157984:21)
at IOSession.writeMessage (/typescript-main/built/local/tsserver.js:158991:21)
at IOSession.send (/typescript-main/built/local/tsserver.js:158988:10)
at IOSession.doOutput (/typescript-main/built/local/tsserver.js:159035:10)
at IOSession.onMessage (/typescript-main/built/local/tsserver.js:160646:14)
at Interface.<anonymous> (/typescript-main/built/local/tsserver.js:162032:14)
Req #876 - references
at formatMessage2 (/typescript-51837/built/local/tsserver.js:158027:21)
at IOSession.writeMessage (/typescript-51837/built/local/tsserver.js:159034:21)
at IOSession.send (/typescript-51837/built/local/tsserver.js:159031:10)
at IOSession.doOutput (/typescript-51837/built/local/tsserver.js:159078:10)
at IOSession.onMessage (/typescript-51837/built/local/tsserver.js:160689:14)
at Interface.<anonymous> (/typescript-51837/built/local/tsserver.js:162075:14)

That is a filtered view of the text. To see the raw error text, go to RepoResults4/felixrieseberg.windows95.rawError.txt in the artifact folder

Last few requests

{"seq":873,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/src/renderer/lib/_libwabt.js","line":13,"offset":272375,"entryNames":["_"]}}
{"seq":874,"type":"request","command":"definitionAndBoundSpan","arguments":{"file":"@PROJECT_ROOT@/src/renderer/lib/_libwabt.js","line":13,"offset":272546}}
{"seq":875,"type":"request","command":"definitionAndBoundSpan","arguments":{"file":"@PROJECT_ROOT@/src/renderer/lib/_libwabt.js","line":13,"offset":273913}}
{"seq":876,"type":"request","command":"references","arguments":{"file":"@PROJECT_ROOT@/src/renderer/lib/_libwabt.js","line":13,"offset":277159}}

Repro Steps

  1. git clone https://github.com/felixrieseberg/windows95 --recurse-submodules
  2. In dir windows95, run git reset --hard 17a81393467e2668eb2eea291ab4b6a749756dad
  3. In dir windows95, run yarn install --ignore-engines --ignore-scripts --silent
  4. Back in the initial folder, download RepoResults4/felixrieseberg.windows95.replay.txt from the artifact folder
  5. npm install --no-save @typescript/server-replay
  6. npx tsreplay ./windows95 ./felixrieseberg.windows95.replay.txt path/to/tsserver.js
  7. npx tsreplay --help to learn about helpful switches for debugging, logging, etc

palantir/blueprint

⚠️ Note that built also had errors ⚠️
Req #18812 - references
at resolveNameHelper (/typescript-main/built/local/tsserver.js:44343:29)
at resolveName (/typescript-main/built/local/tsserver.js:44341:12)
at getResolvedSymbol (/typescript-main/built/local/tsserver.js:60899:54)
at checkIdentifier (/typescript-main/built/local/tsserver.js:62804:20)
at checkExpressionWorker (/typescript-main/built/local/tsserver.js:69750:16)
at checkExpression (/typescript-main/built/local/tsserver.js:69709:32)
at checkNonNullExpression (/typescript-main/built/local/tsserver.js:65078:29)
at checkPropertyAccessExpression (/typescript-main/built/local/tsserver.js:65157:162)
at checkExpressionWorker (/typescript-main/built/local/tsserver.js:69784:16)
at checkExpression (/typescript-main/built/local/tsserver.js:69709:32)
at checkNonNullExpression (/typescript-main/built/local/tsserver.js:65078:29)
at getEffectsSignature (/typescript-main/built/local/tsserver.js:61649:22)
at getTypeAtFlowCall (/typescript-main/built/local/tsserver.js:61947:25)
at getTypeAtFlowNode (/typescript-main/built/local/tsserver.js:61842:18)
at getFlowTypeOfReference (/typescript-main/built/local/tsserver.js:61799:45)
at checkIdentifier (/typescript-main/built/local/tsserver.js:62901:22)
at checkExpressionWorker (/typescript-main/built/local/tsserver.js:69750:16)
at checkExpression (/typescript-main/built/local/tsserver.js:69709:32)
at checkNonNullExpression (/typescript-main/built/local/tsserver.js:65078:29)
at checkPropertyAccessExpression (/typescript-main/built/local/tsserver.js:65157:162)
at checkExpressionWorker (/typescript-main/built/local/tsserver.js:69784:16)
at checkExpression (/typescript-main/built/local/tsserver.js:69709:32)
at checkNonNullExpression (/typescript-main/built/local/tsserver.js:65078:29)
at getEffectsSignature (/typescript-main/built/local/tsserver.js:61649:22)
at getTypeAtFlowCall (/typescript-main/built/local/tsserver.js:61947:25)
at getTypeAtFlowNode (/typescript-main/built/local/tsserver.js:61842:18)
at getFlowTypeOfReference (/typescript-main/built/local/tsserver.js:61799:45)
at checkIdentifier (/typescript-main/built/local/tsserver.js:62901:22)
at checkExpressionWorker (/typescript-main/built/local/tsserver.js:69750:16)
at checkExpression (/typescript-main/built/local/tsserver.js:69709:32)
at checkNonNullExpression (/typescript-main/built/local/tsserver.js:65078:29)
at checkPropertyAccessExpression (/typescript-main/built/local/tsserver.js:65157:162)
at checkExpressionWorker (/typescript-main/built/local/tsserver.js:69784:16)
at checkExpression (/typescript-main/built/local/tsserver.js:69709:32)
at checkNonNullExpression (/typescript-main/built/local/tsserver.js:65078:29)
at getEffectsSignature (/typescript-main/built/local/tsserver.js:61649:22)
at getTypeAtFlowCall (/typescript-main/built/local/tsserver.js:61947:25)
at getTypeAtFlowNode (/typescript-main/built/local/tsserver.js:61842:18)
at getFlowTypeOfReference (/typescript-main/built/local/tsserver.js:61799:45)
at checkIdentifier (/typescript-main/built/local/tsserver.js:62901:22)
at checkExpressionWorker (/typescript-main/built/local/tsserver.js:69750:16)
at checkExpression (/typescript-main/built/local/tsserver.js:69709:32)
at checkNonNullExpression (/typescript-main/built/local/tsserver.js:65078:29)
at checkPropertyAccessExpression (/typescript-main/built/local/tsserver.js:65157:162)
at checkExpressionWorker (/typescript-main/built/local/tsserver.js:69784:16)
at checkExpression (/typescript-main/built/local/tsserver.js:69709:32)
at checkNonNullExpression (/typescript-main/built/local/tsserver.js:65078:29)
at getEffectsSignature (/typescript-main/built/local/tsserver.js:61649:22)
at getTypeAtFlowCall (/typescript-main/built/local/tsserver.js:61947:25)
at getTypeAtFlowNode (/typescript-main/built/local/tsserver.js:61842:18)
at getFlowTypeOfReference (/typescript-main/built/local/tsserver.js:61799:45)
at checkIdentifier (/typescript-main/built/local/tsserver.js:62901:22)
at checkExpressionWorker (/typescript-main/built/local/tsserver.js:69750:16)
at checkExpression (/typescript-main/built/local/tsserver.js:69709:32)
at checkNonNullExpression (/typescript-main/built/local/tsserver.js:65078:29)
at checkPropertyAccessExpression (/typescript-main/built/local/tsserver.js:65157:162)
at checkExpressionWorker (/typescript-main/built/local/tsserver.js:69784:16)
at checkExpression (/typescript-main/built/local/tsserver.js:69709:32)
at checkNonNullExpression (/typescript-main/built/local/tsserver.js:65078:29)
at getEffectsSignature (/typescript-main/built/local/tsserver.js:61649:22)
at getTypeAtFlowCall (/typescript-main/built/local/tsserver.js:61947:25)
at getTypeAtFlowNode (/typescript-main/built/local/tsserver.js:61842:18)
at getFlowTypeOfReference (/typescript-main/built/local/tsserver.js:61799:45)
at checkIdentifier (/typescript-main/built/local/tsserver.js:62901:22)
at checkExpressionWorker (/typescript-main/built/local/tsserver.js:69750:16)
at checkExpression (/typescript-main/built/local/tsserver.js:69709:32)
at checkNonNullExpression (/typescript-main/built/local/tsserver.js:65078:29)
at checkPropertyAccessExpression (/typescript-main/built/local/tsserver.js:65157:162)
at checkExpressionWorker (/typescript-main/built/local/tsserver.js:69784:16)
at checkExpression (/typescript-main/built/local/tsserver.js:69709:32)
at checkNonNullExpression (/typescript-main/built/local/tsserver.js:65078:29)
at getEffectsSignature (/typescript-main/built/local/tsserver.js:61649:22)
at getTypeAtFlowCall (/typescript-main/built/local/tsserver.js:61947:25)
at getTypeAtFlowNode (/typescript-main/built/local/tsserver.js:61842:18)
at getFlowTypeOfReference (/typescript-main/built/local/tsserver.js:61799:45)
at checkIdentifier (/typescript-main/built/local/tsserver.js:62901:22)
at checkExpressionWorker (/typescript-main/built/local/tsserver.js:69750:16)
at checkExpression (/typescript-main/built/local/tsserver.js:69709:32)
at checkNonNullExpression (/typescript-main/built/local/tsserver.js:65078:29)
at checkPropertyAccessExpression (/typescript-main/built/local/tsserver.js:65157:162)
at checkExpressionWorker (/typescript-main/built/local/tsserver.js:69784:16)
at checkExpression (/typescript-main/built/local/tsserver.js:69709:32)
at checkNonNullExpression (/typescript-main/built/local/tsserver.js:65078:29)
at getEffectsSignature (/typescript-main/built/local/tsserver.js:61649:22)
at getTypeAtFlowCall (/typescript-main/built/local/tsserver.js:61947:25)
at getTypeAtFlowNode (/typescript-main/built/local/tsserver.js:61842:18)
at getFlowTypeOfReference (/typescript-main/built/local/tsserver.js:61799:45)
at checkIdentifier (/typescript-main/built/local/tsserver.js:62901:22)
at checkExpressionWorker (/typescript-main/built/local/tsserver.js:69750:16)
at checkExpression (/typescript-main/built/local/tsserver.js:69709:32)
at checkNonNullExpression (/typescript-main/built/local/tsserver.js:65078:29)
at checkPropertyAccessExpression (/typescript-main/built/local/tsserver.js:65157:162)
at checkExpressionWorker (/typescript-main/built/local/tsserver.js:69784:16)
at checkExpression (/typescript-main/built/local/tsserver.js:69709:32)
at checkNonNullExpression (/typescript-main/built/local/tsserver.js:65078:29)
at getEffectsSignature (/typescript-main/built/local/tsserver.js:61649:22)
at getTypeAtFlowCall (/typescript-main/built/local/tsserver.js:61947:25)
at getTypeAtFlowNode (/typescript-main/built/local/tsserver.js:61842:18)
at getFlowTypeOfReference (/typescript-main/built/local/tsserver.js:61799:45)
at checkIdentifier (/typescript-main/built/local/tsserver.js:62901:22)
Req #18812 - references
at getEffectiveCallArguments (/typescript-51837/built/local/tsserver.js:66288:37)
at getContextualTypeForArgument (/typescript-51837/built/local/tsserver.js:63534:18)
at getContextualType2 (/typescript-51837/built/local/tsserver.js:63914:16)
at getApparentTypeOfContextualType (/typescript-51837/built/local/tsserver.js:63858:120)
at getContextualType2 (/typescript-51837/built/local/tsserver.js:63927:22)
at getApparentTypeOfContextualType (/typescript-51837/built/local/tsserver.js:63858:120)
at getContextualSignature (/typescript-51837/built/local/tsserver.js:64178:18)
at getNarrowedTypeOfSymbol (/typescript-51837/built/local/tsserver.js:62829:39)
at checkIdentifier (/typescript-51837/built/local/tsserver.js:62902:16)
at checkExpressionWorker (/typescript-51837/built/local/tsserver.js:69793:16)
at checkExpression (/typescript-51837/built/local/tsserver.js:69752:32)
at checkNonNullExpression (/typescript-51837/built/local/tsserver.js:65121:29)
at checkPropertyAccessExpression (/typescript-51837/built/local/tsserver.js:65200:162)
at checkExpressionWorker (/typescript-51837/built/local/tsserver.js:69827:16)
at checkExpression (/typescript-51837/built/local/tsserver.js:69752:32)
at checkNonNullExpression (/typescript-51837/built/local/tsserver.js:65121:29)
at getEffectsSignature (/typescript-51837/built/local/tsserver.js:61692:22)
at getTypeAtFlowCall (/typescript-51837/built/local/tsserver.js:61990:25)
at getTypeAtFlowNode (/typescript-51837/built/local/tsserver.js:61885:18)
at getFlowTypeOfReference (/typescript-51837/built/local/tsserver.js:61842:45)
at checkIdentifier (/typescript-51837/built/local/tsserver.js:62944:22)
at checkExpressionWorker (/typescript-51837/built/local/tsserver.js:69793:16)
at checkExpression (/typescript-51837/built/local/tsserver.js:69752:32)
at checkNonNullExpression (/typescript-51837/built/local/tsserver.js:65121:29)
at checkPropertyAccessExpression (/typescript-51837/built/local/tsserver.js:65200:162)
at checkExpressionWorker (/typescript-51837/built/local/tsserver.js:69827:16)
at checkExpression (/typescript-51837/built/local/tsserver.js:69752:32)
at checkNonNullExpression (/typescript-51837/built/local/tsserver.js:65121:29)
at getEffectsSignature (/typescript-51837/built/local/tsserver.js:61692:22)
at getTypeAtFlowCall (/typescript-51837/built/local/tsserver.js:61990:25)
at getTypeAtFlowNode (/typescript-51837/built/local/tsserver.js:61885:18)
at getFlowTypeOfReference (/typescript-51837/built/local/tsserver.js:61842:45)
at checkIdentifier (/typescript-51837/built/local/tsserver.js:62944:22)
at checkExpressionWorker (/typescript-51837/built/local/tsserver.js:69793:16)
at checkExpression (/typescript-51837/built/local/tsserver.js:69752:32)
at checkNonNullExpression (/typescript-51837/built/local/tsserver.js:65121:29)
at checkPropertyAccessExpression (/typescript-51837/built/local/tsserver.js:65200:162)
at checkExpressionWorker (/typescript-51837/built/local/tsserver.js:69827:16)
at checkExpression (/typescript-51837/built/local/tsserver.js:69752:32)
at checkNonNullExpression (/typescript-51837/built/local/tsserver.js:65121:29)
at getEffectsSignature (/typescript-51837/built/local/tsserver.js:61692:22)
at getTypeAtFlowCall (/typescript-51837/built/local/tsserver.js:61990:25)
at getTypeAtFlowNode (/typescript-51837/built/local/tsserver.js:61885:18)
at getFlowTypeOfReference (/typescript-51837/built/local/tsserver.js:61842:45)
at checkIdentifier (/typescript-51837/built/local/tsserver.js:62944:22)
at checkExpressionWorker (/typescript-51837/built/local/tsserver.js:69793:16)
at checkExpression (/typescript-51837/built/local/tsserver.js:69752:32)
at checkNonNullExpression (/typescript-51837/built/local/tsserver.js:65121:29)
at checkPropertyAccessExpression (/typescript-51837/built/local/tsserver.js:65200:162)
at checkExpressionWorker (/typescript-51837/built/local/tsserver.js:69827:16)
at checkExpression (/typescript-51837/built/local/tsserver.js:69752:32)
at checkNonNullExpression (/typescript-51837/built/local/tsserver.js:65121:29)
at getEffectsSignature (/typescript-51837/built/local/tsserver.js:61692:22)
at getTypeAtFlowCall (/typescript-51837/built/local/tsserver.js:61990:25)
at getTypeAtFlowNode (/typescript-51837/built/local/tsserver.js:61885:18)
at getFlowTypeOfReference (/typescript-51837/built/local/tsserver.js:61842:45)
at checkIdentifier (/typescript-51837/built/local/tsserver.js:62944:22)
at checkExpressionWorker (/typescript-51837/built/local/tsserver.js:69793:16)
at checkExpression (/typescript-51837/built/local/tsserver.js:69752:32)
at checkNonNullExpression (/typescript-51837/built/local/tsserver.js:65121:29)
at checkPropertyAccessExpression (/typescript-51837/built/local/tsserver.js:65200:162)
at checkExpressionWorker (/typescript-51837/built/local/tsserver.js:69827:16)
at checkExpression (/typescript-51837/built/local/tsserver.js:69752:32)
at checkNonNullExpression (/typescript-51837/built/local/tsserver.js:65121:29)
at getEffectsSignature (/typescript-51837/built/local/tsserver.js:61692:22)
at getTypeAtFlowCall (/typescript-51837/built/local/tsserver.js:61990:25)
at getTypeAtFlowNode (/typescript-51837/built/local/tsserver.js:61885:18)
at getFlowTypeOfReference (/typescript-51837/built/local/tsserver.js:61842:45)
at checkIdentifier (/typescript-51837/built/local/tsserver.js:62944:22)
at checkExpressionWorker (/typescript-51837/built/local/tsserver.js:69793:16)
at checkExpression (/typescript-51837/built/local/tsserver.js:69752:32)
at checkNonNullExpression (/typescript-51837/built/local/tsserver.js:65121:29)
at checkPropertyAccessExpression (/typescript-51837/built/local/tsserver.js:65200:162)
at checkExpressionWorker (/typescript-51837/built/local/tsserver.js:69827:16)
at checkExpression (/typescript-51837/built/local/tsserver.js:69752:32)
at checkNonNullExpression (/typescript-51837/built/local/tsserver.js:65121:29)
at getEffectsSignature (/typescript-51837/built/local/tsserver.js:61692:22)
at getTypeAtFlowCall (/typescript-51837/built/local/tsserver.js:61990:25)
at getTypeAtFlowNode (/typescript-51837/built/local/tsserver.js:61885:18)
at getFlowTypeOfReference (/typescript-51837/built/local/tsserver.js:61842:45)
at checkIdentifier (/typescript-51837/built/local/tsserver.js:62944:22)
at checkExpressionWorker (/typescript-51837/built/local/tsserver.js:69793:16)
at checkExpression (/typescript-51837/built/local/tsserver.js:69752:32)
at checkNonNullExpression (/typescript-51837/built/local/tsserver.js:65121:29)
at checkPropertyAccessExpression (/typescript-51837/built/local/tsserver.js:65200:162)
at checkExpressionWorker (/typescript-51837/built/local/tsserver.js:69827:16)
at checkExpression (/typescript-51837/built/local/tsserver.js:69752:32)
at checkNonNullExpression (/typescript-51837/built/local/tsserver.js:65121:29)
at getEffectsSignature (/typescript-51837/built/local/tsserver.js:61692:22)
at getTypeAtFlowCall (/typescript-51837/built/local/tsserver.js:61990:25)
at getTypeAtFlowNode (/typescript-51837/built/local/tsserver.js:61885:18)
at getFlowTypeOfReference (/typescript-51837/built/local/tsserver.js:61842:45)
at checkIdentifier (/typescript-51837/built/local/tsserver.js:62944:22)
at checkExpressionWorker (/typescript-51837/built/local/tsserver.js:69793:16)
at checkExpression (/typescript-51837/built/local/tsserver.js:69752:32)
at checkNonNullExpression (/typescript-51837/built/local/tsserver.js:65121:29)
at checkPropertyAccessExpression (/typescript-51837/built/local/tsserver.js:65200:162)
at checkExpressionWorker (/typescript-51837/built/local/tsserver.js:69827:16)
at checkExpression (/typescript-51837/built/local/tsserver.js:69752:32)
at checkNonNullExpression (/typescript-51837/built/local/tsserver.js:65121:29)

That is a filtered view of the text. To see the raw error text, go to RepoResults4/palantir.blueprint.rawError.txt in the artifact folder

Last few requests

{"seq":18809,"type":"request","command":"definitionAndBoundSpan","arguments":{"file":"@PROJECT_ROOT@/site/docs/versions/2/docs-app.js","line":1,"offset":59810}}
{"seq":18810,"type":"request","command":"completionInfo","arguments":{"file":"@PROJECT_ROOT@/site/docs/versions/2/docs-app.js","line":1,"offset":61909,"includeExternalModuleExports":false,"includeInsertTextCompletions":true,"triggerKind":2,"triggerCharacter":"\""}}
{"seq":18811,"type":"request","command":"definitionAndBoundSpan","arguments":{"file":"@PROJECT_ROOT@/site/docs/versions/2/docs-app.js","line":1,"offset":61962}}
{"seq":18812,"type":"request","command":"references","arguments":{"file":"@PROJECT_ROOT@/site/docs/versions/2/docs-app.js","line":1,"offset":62168}}

Repro Steps

  1. git clone https://github.com/palantir/blueprint --recurse-submodules
  2. In dir blueprint, run git reset --hard 0b13de29e33759b558992472c764cb39c7dc968c
  3. In dir blueprint, run yarn install --ignore-engines --ignore-scripts --silent
  4. Back in the initial folder, download RepoResults4/palantir.blueprint.replay.txt from the artifact folder
  5. npm install --no-save @typescript/server-replay
  6. npx tsreplay ./blueprint ./palantir.blueprint.replay.txt path/to/tsserver.js
  7. npx tsreplay --help to learn about helpful switches for debugging, logging, etc

type-challenges/type-challenges

⚠️ Note that built also had errors ⚠️
Req #1215 - completionEntryDetails
at isTypeReferenceNode (/typescript-main/built/local/tsserver.js:26079:15)
at isConstTypeReference (/typescript-main/built/local/tsserver.js:13988:10)
at Object.getSymbolDisplayPartsDocumentationAndSymbolKind (/typescript-main/built/local/tsserver.js:146729:60)
at /typescript-main/built/local/tsserver.js:134639:44
at Object.runWithCancellationToken (/typescript-main/built/local/tsserver.js:43435:16)
at createCompletionDetailsForSymbol (/typescript-main/built/local/tsserver.js:134637:69)
at Object.getCompletionEntryDetails (/typescript-main/built/local/tsserver.js:134586:14)
at Object.getCompletionEntryDetails2 [as getCompletionEntryDetails] (/typescript-main/built/local/tsserver.js:121952:35)
at /typescript-main/built/local/tsserver.js:159971:43
at mapDefined (/typescript-main/built/local/tsserver.js:3039:22)
at IOSession.getCompletionEntryDetails (/typescript-main/built/local/tsserver.js:159969:20)
at completionEntryDetails (/typescript-main/built/local/tsserver.js:158585:43)
at /typescript-main/built/local/tsserver.js:160605:69
at IOSession.executeWithRequestId (/typescript-main/built/local/tsserver.js:160597:14)
at IOSession.executeCommand (/typescript-main/built/local/tsserver.js:160605:29)
at IOSession.onMessage (/typescript-main/built/local/tsserver.js:160633:51)
at Interface.<anonymous> (/typescript-main/built/local/tsserver.js:162032:14)
Req #1215 - completionEntryDetails
at isTypeReferenceNode (/typescript-51837/built/local/tsserver.js:26115:15)
at isConstTypeReference (/typescript-51837/built/local/tsserver.js:14023:10)
at Object.getSymbolDisplayPartsDocumentationAndSymbolKind (/typescript-51837/built/local/tsserver.js:146772:60)
at /typescript-51837/built/local/tsserver.js:134682:44
at Object.runWithCancellationToken (/typescript-51837/built/local/tsserver.js:43478:16)
at createCompletionDetailsForSymbol (/typescript-51837/built/local/tsserver.js:134680:69)
at Object.getCompletionEntryDetails (/typescript-51837/built/local/tsserver.js:134629:14)
at Object.getCompletionEntryDetails2 [as getCompletionEntryDetails] (/typescript-51837/built/local/tsserver.js:121995:35)
at /typescript-51837/built/local/tsserver.js:160014:43
at mapDefined (/typescript-51837/built/local/tsserver.js:3039:22)
at IOSession.getCompletionEntryDetails (/typescript-51837/built/local/tsserver.js:160012:20)
at completionEntryDetails (/typescript-51837/built/local/tsserver.js:158628:43)
at /typescript-51837/built/local/tsserver.js:160648:69
at IOSession.executeWithRequestId (/typescript-51837/built/local/tsserver.js:160640:14)
at IOSession.executeCommand (/typescript-51837/built/local/tsserver.js:160648:29)
at IOSession.onMessage (/typescript-51837/built/local/tsserver.js:160676:51)
at Interface.<anonymous> (/typescript-51837/built/local/tsserver.js:162075:14)

That is a filtered view of the text. To see the raw error text, go to RepoResults2/type-challenges.type-challenges.rawError.txt in the artifact folder

Last few requests

{"seq":1212,"type":"request","command":"references","arguments":{"file":"@PROJECT_ROOT@/questions/03188-medium-tuple-to-nested-object/test-cases.ts","line":1,"offset":37}}
{"seq":1213,"type":"request","command":"updateOpen","arguments":{"changedFiles":[{"fileName":"@PROJECT_ROOT@/questions/03188-medium-tuple-to-nested-object/test-cases.ts","textChanges":[{"newText":" //comment","start":{"line":1,"offset":60},"end":{"line":1,"offset":60}}]}],"closedFiles":[],"openFiles":[]}}
{"seq":1214,"type":"request","command":"completionInfo","arguments":{"file":"@PROJECT_ROOT@/questions/03188-medium-tuple-to-nested-object/test-cases.ts","line":8,"offset":2,"includeExternalModuleExports":false,"includeInsertTextCompletions":true,"triggerKind":1}}
{"seq":1215,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/questions/03188-medium-tuple-to-nested-object/test-cases.ts","line":8,"offset":2,"entryNames":["a"]}}

Repro Steps

  1. git clone https://github.com/type-challenges/type-challenges --recurse-submodules
  2. In dir type-challenges, run git reset --hard e25c66945c5448b312bfcedb553e80fcca4bcac9
  3. Back in the initial folder, download RepoResults2/type-challenges.type-challenges.replay.txt from the artifact folder
  4. npm install --no-save @typescript/server-replay
  5. npx tsreplay ./type-challenges ./type-challenges.type-challenges.replay.txt path/to/tsserver.js
  6. npx tsreplay --help to learn about helpful switches for debugging, logging, etc

Comment threadtests/baselines/reference/api/typescript.d.ts
Comment threadsrc/compiler/factory/nodeFactory.ts Outdated
Comment threadsrc/compiler/binder.ts Outdated
Comment threadsrc/compiler/scanner.ts Outdated
Comment threadsrc/compiler/scanner.ts Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not sure if this PR is the right place to discuss this - but as we consider deprecating ES3 targets, and as I've reviewed more and more parsing issues in TypeScript that make decisions based on the language target, it feels like we should start reconsidering our approach.

Language target is really not the same as the parsing language version; and we're not always emitting code either. I wonder if there are opportunities to simplify.

@graphemecluster

graphemecluster (graphemecluster) commented Dec 13, 2022

Copy link
Copy Markdown
ContributorAuthor

Daniel Rosenwasser (@DanielRosenwasser) The point is whether the code is in strict mode, not the target.

We now have two options:

  • Emit the error in the scanner, regardless of strict mode or not – i.e. completely disallow octal escape sequence
  • Attempt to rescan the string in the binder if tokenFlags contains Octal

In either way I am going to root out rangesOfOctalSequences and remove the target check this time.

Edit: I've implemented the first approach. Please give it a review.

@typescript-bot

TypeScript Bot (typescript-bot) commented Mar 14, 2023

Copy link
Copy Markdown
Contributor

Heya Gabriela Araujo Britto (@gabritto), I've started to run the parallelized Definitely Typed test suite on this PR at 251e536. You can monitor the build here.

Update: The results are in!

@typescript-bot

Copy link
Copy Markdown
Contributor

Hey Gabriela Araujo Britto (@gabritto), the results of running the DT tests are ready.
There were interesting changes:

Branch only errors:

Package: vk-openapi
Error:

Error: /home/vsts/work/1/s/DefinitelyTyped-tools/packages/dtslint-runner/DefinitelyTyped/types/vk-openapi/vk-openapi-tests.ts:2251:20
ERROR: 2251:20 expect TypeScript@local compile error: Octal literals are not allowed. Use the syntax '0o7'.
at testTypesVersion (/home/vsts/work/1/s/DefinitelyTyped-tools/packages/dtslint-runner/node_modules/@definitelytyped/dtslint/dist/index.js:194:15)
at async runTests (/home/vsts/work/1/s/DefinitelyTyped-tools/packages/dtslint-runner/node_modules/@definitelytyped/dtslint/dist/index.js:151:9)

You can check the log here.

@sandersn

Copy link
Copy Markdown
Member

That DT failure is weird, since the line before has // @ts-expect-error.

@jakebailey

Copy link
Copy Markdown
Member

Are parse errors @ts-expect-error-silence-able?

@sandersn

Nathan Shively-Sanders (sandersn) commented Mar 14, 2023

Copy link
Copy Markdown
Member

Looks like not, eg var x = { also has an unsilenceable error.

Edit: So it's not a problem unique to this change; I think this PR is ready to go then.

Nathan Shively-Sanders (sandersn) added a commit to DefinitelyTyped/DefinitelyTyped that referenced this pull request Mar 14, 2023
Old-style octal literals become syntax errors in an upcoming TS PR: microsoft/TypeScript#51837
But syntax errors can't be silenced with ts-expect-error, and the octal
literal is not important to the vk-openapi test in question, so change
it to use new octal syntax.
@sandersn

Copy link
Copy Markdown
Member

Fix the DT test's throwaway reference from 007 to 0o7: DefinitelyTyped/DefinitelyTyped#64741

Nathan Shively-Sanders (sandersn) added a commit to DefinitelyTyped/DefinitelyTyped that referenced this pull request Mar 14, 2023
Old-style octal literals become syntax errors in an upcoming TS PR: microsoft/TypeScript#51837
But syntax errors can't be silenced with ts-expect-error, and the octal
literal is not important to the vk-openapi test in question, so change
it to use new octal syntax.

@jakebaileyJake Bailey (jakebailey) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The core of the change seems good, but I think we need to make sure that we aren't breaking the public API for those using the scanner; this changes the meaning of some scanner functions (and misses updating the public API to match).

Comment threadsrc/compiler/scanner.ts
Comment threadtests/baselines/reference/api/typescript.d.ts
@jakebailey

Copy link
Copy Markdown
Member

Daniel Rosenwasser (@DanielRosenwasser) Your review is the only red one; can you take another look to see if you see anything else?

@jakebailey

Copy link
Copy Markdown
Member

So, this looks good to me, but I'm still worried about people using our parser on previously-valid code and now getting parse errors. I'd be interested to test out some users of our public API like ts-loader or rollup-typescript-plugin to see what happens.

@DanielRosenwasser

Copy link
Copy Markdown
Member

Thank you graphemecluster (@graphemecluster)!

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

Labels

Breaking ChangeWould introduce errors in existing codeFor Backlog BugPRs that fix a backlog bug

Projects

Archived in project

7 participants

@graphemecluster@RyanCavanaugh@typescript-bot@DanielRosenwasser@sandersn@jakebailey@gabritto