Skip to content

Enforce identical enum values in compatibility checks - #55924

Merged
Daniel Rosenwasser (DanielRosenwasser) merged 17 commits into
mainfrom
enum-value-checks
Dec 20, 2023
Merged

Enforce identical enum values in compatibility checks#55924
Daniel Rosenwasser (DanielRosenwasser) merged 17 commits into
mainfrom
enum-value-checks

Conversation

@DanielRosenwasser

@DanielRosenwasserDaniel Rosenwasser (DanielRosenwasser) commented Sep 30, 2023

Copy link
Copy Markdown
Member

Fixes#55915.

This change proposes a new check for compatibility between two distinct enum declarations. On top of previous expectations around enum compatibility, where

  1. the declared enum must have an identical name
  2. each of the enum members in the source must have an enum member declared in the target with an identical name

this change checks that each enum member in the source must have a known value, and that value must have an identical known value in the target.

You can view some examples here.
// Example 1.// Both declarations of `SomeEnum` should be compatible.// All enum members have identical values.namespaceexample1{namespaceFirst{exportenumSomeEnum{A=0,B=1,}}namespaceSecond{exportenumSomeEnum{A=0,B=1,}}functionfoo(x: First.SomeEnum,y: Second.SomeEnum){x=y;y=x;}}// Example 2.// Declarations of `SomeEnum` should be *incompatible*.// The value of `SomeEnum.B` is different.namespaceexample2{namespaceFirst{exportenumSomeEnum{A=0,B=1,}}namespaceSecond{exportenumSomeEnum{A=0,B=2,}}functionfoo(x: First.SomeEnum,y: Second.SomeEnum){x=y;// ~~~~~ error!// Type 'Second.SomeEnum' is not assignable to type 'First.SomeEnum'.// Each declaration of 'SomeEnum.B' differs in its value,// where '1' was expected but '2' was given.y=x;// ~~~~~ error!// Type 'First.SomeEnum' is not assignable to type 'Second.SomeEnum'.// Each declaration of 'SomeEnum.B' differs in its value,// where '2' was expected but '1' was given.}}// Example 3.// Declarations of `SomeEnum` should be *incompatible*.// The value of `Second.SomeEnum.B` is not fully known because// `Second.SomeEnum` is ambient and it does not specify a value for `B`.namespaceexample3{namespaceFirst{exportenumSomeEnum{A=0,B,}}namespaceSecond{exportdeclareenumSomeEnum{A=0,B,}}functionfoo(x: First.SomeEnum,y: Second.SomeEnum){x=y;// ~~~~~ error!// Type 'Second.SomeEnum' is not assignable to type 'First.SomeEnum'.// Values of 'SomeEnum.B' are not sufficiently known.y=x;// ~~~~~ error!// Type 'Second.SomeEnum' is not assignable to type 'First.SomeEnum'.// Values of 'SomeEnum.B' are not sufficiently known.}}// Example 4.// Declarations of `SomeEnum` should be *incompatible*.// The value of `Second.SomeEnum.B` is not fully known because// all members are dynamically computed.namespaceexample4{declarefunctionrandom(): number;namespaceFirst{exportenumSomeEnum{A=random(),B=random(),}}namespaceSecond{exportenumSomeEnum{A=random(),B=random(),}}functionfoo(x: First.SomeEnum,y: Second.SomeEnum){// ~~~~~ error!// Type 'Second.SomeEnum' is not assignable to type 'First.SomeEnum'.// Values of 'SomeEnum.A' are not sufficiently known.y=x;// ~~~~~ error!// Type 'Second.SomeEnum' is not assignable to type 'First.SomeEnum'.// Values of 'SomeEnum.A' are not sufficiently known.}}

You can also see these in action in a recent playground build.

Important

This is an update that the aforementioned playground link and examples reflect older behavior where known values were incompatible with unknown values. Check the introduced tests to get a sense of the new behavior.

@DanielRosenwasser

Copy link
Copy Markdown
MemberAuthor

@typescript-bot

TypeScript Bot (typescript-bot) commented Sep 30, 2023

Copy link
Copy Markdown
Contributor

Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the parallelized Definitely Typed test suite on this PR at 41e7790. You can monitor the build here.

Update: The results are in!

@typescript-bot

TypeScript Bot (typescript-bot) commented Sep 30, 2023

Copy link
Copy Markdown
Contributor

Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the regular perf test suite on this PR at 41e7790. You can monitor the build here.

Update: The results are in!

@typescript-bot

TypeScript Bot (typescript-bot) commented Sep 30, 2023

Copy link
Copy Markdown
Contributor

Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the diff-based top-repos suite on this PR at 41e7790. You can monitor the build here.

Update: The results are in!

@typescript-bot

TypeScript Bot (typescript-bot) commented Sep 30, 2023

Copy link
Copy Markdown
Contributor

Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the tarball bundle task on this PR at 41e7790. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented Sep 30, 2023

Copy link
Copy Markdown
Contributor

Hey Daniel Rosenwasser (@DanielRosenwasser), I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
"devDependencies": {
"typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/158034/artifacts?artifactName=tgz&fileId=67DB04192934E1DD37668DD2D239A0103C85A5572F439C5A8870481CE0771FF302&fileName=/typescript-5.3.0-insiders.20230930.tgz"
}
}

and then running npm install.


There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/pr-build@5.3.0-pr-55924-5".;

@typescript-bot

Copy link
Copy Markdown
Contributor

Daniel Rosenwasser (@DanielRosenwasser)
The results of the perf run you requested are in!

Here they are:

Compiler

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Angular - node (v18.15.0, x64)
Memory used295,041k (± 0.01%)295,096k (± 0.01%)+56k (+ 0.02%)295,066k295,139kp=0.013 n=6
Parse Time2.63s (± 0.88%)2.64s (± 0.20%)~2.63s2.64sp=0.797 n=6
Bind Time0.84s (± 0.90%)0.84s (± 1.30%)~0.83s0.85sp=0.865 n=6
Check Time8.06s (± 0.30%)8.06s (± 0.26%)~8.04s8.09sp=1.000 n=6
Emit Time7.05s (± 0.42%)7.03s (± 0.42%)~6.99s7.07sp=0.294 n=6
Total Time18.59s (± 0.21%)18.57s (± 0.19%)~18.51s18.62sp=0.809 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used192,080k (± 1.26%)192,660k (± 1.56%)~190,702k196,603kp=0.173 n=6
Parse Time1.35s (± 0.87%)1.34s (± 0.47%)~1.33s1.35sp=0.177 n=6
Bind Time0.73s (± 0.00%)0.73s (± 0.00%)~0.73s0.73sp=1.000 n=6
Check Time9.24s (± 0.97%)9.17s (± 0.39%)~9.13s9.23sp=0.173 n=6
Emit Time2.63s (± 0.48%)2.62s (± 0.95%)~2.60s2.67sp=0.157 n=6
Total Time13.95s (± 0.64%)13.86s (± 0.27%)-0.08s (- 0.60%)13.83s13.91sp=0.043 n=6
Monaco - node (v18.15.0, x64)
Memory used347,318k (± 0.01%)347,306k (± 0.00%)~347,286k347,317kp=0.261 n=6
Parse Time2.46s (± 0.66%)2.46s (± 0.48%)~2.45s2.48sp=0.805 n=6
Bind Time0.94s (± 0.43%)0.94s (± 0.00%)~0.94s0.94sp=0.405 n=6
Check Time6.90s (± 0.44%)6.92s (± 0.46%)~6.89s6.98sp=0.414 n=6
Emit Time4.02s (± 0.48%)4.01s (± 0.47%)~3.99s4.04sp=0.627 n=6
Total Time14.32s (± 0.27%)14.34s (± 0.21%)~14.31s14.39sp=0.575 n=6
TFS - node (v18.15.0, x64)
Memory used302,541k (± 0.01%)302,550k (± 0.00%)~302,532k302,563kp=0.261 n=6
Parse Time1.99s (± 0.53%)2.00s (± 0.88%)+0.02s (+ 1.01%)1.98s2.03sp=0.048 n=6
Bind Time1.01s (± 1.22%)1.00s (± 1.22%)~0.99s1.02sp=1.000 n=6
Check Time6.25s (± 0.53%)6.25s (± 0.46%)~6.21s6.29sp=0.936 n=6
Emit Time3.56s (± 0.68%)3.57s (± 0.41%)~3.55s3.59sp=0.627 n=6
Total Time12.81s (± 0.35%)12.82s (± 0.29%)~12.77s12.88sp=0.629 n=6
material-ui - node (v18.15.0, x64)
Memory used470,492k (± 0.00%)470,499k (± 0.00%)~470,468k470,537kp=0.748 n=6
Parse Time2.58s (± 0.45%)2.58s (± 0.68%)~2.55s2.60sp=0.680 n=6
Bind Time0.99s (± 0.82%)1.00s (± 1.05%)~0.98s1.01sp=0.865 n=6
Check Time16.60s (± 0.43%)16.57s (± 0.45%)~16.49s16.68sp=0.688 n=6
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)~0.00s0.00sp=1.000 n=6
Total Time20.17s (± 0.40%)20.14s (± 0.35%)~20.06s20.25sp=0.575 n=6
xstate - node (v18.15.0, x64)
Memory used512,562k (± 0.01%)512,573k (± 0.01%)~512,497k512,675kp=0.810 n=6
Parse Time3.26s (± 0.41%)3.27s (± 0.16%)~3.26s3.27sp=0.437 n=6
Bind Time1.55s (± 0.26%)1.55s (± 0.41%)~1.54s1.56sp=0.673 n=6
Check Time2.88s (± 0.48%)2.88s (± 1.31%)~2.83s2.92sp=1.000 n=6
Emit Time0.08s (± 0.00%)0.08s (± 0.00%)~0.08s0.08sp=1.000 n=6
Total Time7.76s (± 0.19%)7.77s (± 0.49%)~7.72s7.81sp=0.624 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Angular - node (v18.15.0, x64)
  • Compiler-Unions - node (v18.15.0, x64)
  • Monaco - node (v18.15.0, x64)
  • TFS - node (v18.15.0, x64)
  • material-ui - node (v18.15.0, x64)
  • xstate - 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,372ms (± 1.64%)2,403ms (± 1.06%)~2,352ms2,419msp=0.173 n=6
Req 2 - geterr5,356ms (± 1.63%)5,297ms (± 0.31%)~5,275ms5,315msp=0.296 n=6
Req 3 - references331ms (± 1.25%)343ms (± 8.00%)~326ms398msp=0.520 n=6
Req 4 - navto277ms (± 0.74%)277ms (± 1.90%)~267ms283msp=0.739 n=6
Req 5 - completionInfo count1,356 (± 0.00%)1,356 (± 0.00%)~1,3561,356p=1.000 n=6
Req 5 - completionInfo79ms (± 8.93%)77ms (± 5.45%)~74ms85msp=0.933 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen2,470ms (± 0.50%)2,470ms (± 0.72%)~2,437ms2,489msp=0.810 n=6
Req 2 - geterr4,105ms (± 1.75%)4,081ms (± 1.44%)~4,048ms4,200msp=0.575 n=6
Req 3 - references337ms (± 1.28%)340ms (± 1.54%)~332ms344msp=0.256 n=6
Req 4 - navto284ms (± 0.29%)284ms (± 0.59%)~282ms287msp=0.866 n=6
Req 5 - completionInfo count1,518 (± 0.00%)1,518 (± 0.00%)~1,5181,518p=1.000 n=6
Req 5 - completionInfo80ms (± 6.82%)83ms (± 7.14%)~75ms87msp=0.342 n=6
xstateTSServer - node (v18.15.0, x64)
Req 1 - updateOpen2,590ms (± 0.44%)2,596ms (± 0.54%)~2,577ms2,614msp=0.575 n=6
Req 2 - geterr1,705ms (± 3.02%)1,687ms (± 2.88%)~1,619ms1,742msp=0.471 n=6
Req 3 - references109ms (± 7.82%)106ms (± 1.25%)~104ms108msp=0.735 n=6
Req 4 - navto359ms (± 0.29%)360ms (± 0.37%)~358ms362msp=0.098 n=6
Req 5 - completionInfo count2,071 (± 0.00%)2,071 (± 0.00%)~2,0712,071p=1.000 n=6
Req 5 - completionInfo305ms (± 2.03%)305ms (± 2.68%)~295ms318msp=1.000 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)
  • xstateTSServer - node (v18.15.0, x64)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Startup

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
tsc-startup - node (v18.15.0, x64)
Execution time152.34ms (± 0.18%)152.11ms (± 0.15%)-0.23ms (- 0.15%)151.14ms154.47msp=0.000 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time227.11ms (± 0.17%)226.88ms (± 0.17%)-0.23ms (- 0.10%)225.55ms230.75msp=0.000 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time228.95ms (± 0.16%)228.95ms (± 0.16%)~227.17ms233.82msp=0.689 n=600
typescript-startup - node (v18.15.0, x64)
Execution time228.44ms (± 0.16%)228.51ms (± 0.16%)~226.95ms232.28msp=0.158 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

@typescript-bot

Copy link
Copy Markdown
Contributor

Hey Daniel Rosenwasser (@DanielRosenwasser), 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

Daniel Rosenwasser (@DanielRosenwasser) Here are the results of running the top-repos suite comparing main and refs/pull/55924/merge:

Everything looks good!

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 think this is worth trying for 5.4.

Comment threadsrc/compiler/diagnosticMessages.json Outdated
"category": "Error",
"code": 4124
},
"The values of '{0}.{1}' differ in their declarations, where '{2}' was expected but '{3}' was given.": {

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.

'First.E.c' has value '2' but 'Decl.E.c' has value '3'.

Suggested change
"The values of '{0}.{1}' differ in their declarations, where '{2}' was expected but '{3}' was given.": {
"'{0}.{1}' has value '{2}', but '{3}.{1}' has value '{4}'.": {

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

The problem is that each of them have identical names between members and enums 😄

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Unless I fully qualified the name - but the earlier error message will have done that anyway.

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 agree with Nathan's suggestion that it would be better to use the fully qualified names when talking about the members and the different values, even though you can figure it out with the current error message + elaboration.

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.

It's definitely redundant, but the redundancy makes it easier to read in this case because there's less context to piece together, and less work to do overall to read the message.

Comment threadtests/baselines/reference/enumAssignmentCompat3.errors.txt Outdated
Comment threadtests/baselines/reference/enumAssignmentCompat3.errors.txt Outdated
@DanielRosenwasser

Copy link
Copy Markdown
MemberAuthor

@typescript-bot

TypeScript Bot (typescript-bot) commented Nov 3, 2023

Copy link
Copy Markdown
Contributor

Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the diff-based top-repos suite on this PR at b2033b3. You can monitor the build here.

Update: The results are in!

@typescript-bot

TypeScript Bot (typescript-bot) commented Nov 3, 2023

Copy link
Copy Markdown
Contributor

Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the parallelized Definitely Typed test suite on this PR at b2033b3. You can monitor the build here.

Update: The results are in!

@typescript-bot

Copy link
Copy Markdown
Contributor

Hey Daniel Rosenwasser (@DanielRosenwasser), 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

Daniel Rosenwasser (@DanielRosenwasser) Here are the results of running the top-repos suite comparing main and refs/pull/55924/merge:

Everything looks good!

@typescript-botTypeScript Bot (typescript-bot) added For Milestone Bug PRs that fix a bug with a specific milestone and removed For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Nov 17, 2023
@DanielRosenwasser

Copy link
Copy Markdown
MemberAuthor

@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 7, 2023

Copy link
Copy Markdown
Contributor

Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the parallelized Definitely Typed test suite on this PR at af7f5b8. You can monitor the build here.

Update: The results are in!

@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 7, 2023

Copy link
Copy Markdown
Contributor

Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the regular perf test suite on this PR at af7f5b8. You can monitor the build here.

Update: The results are in!

@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 7, 2023

Copy link
Copy Markdown
Contributor

Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the tarball bundle task on this PR at af7f5b8. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 7, 2023

Copy link
Copy Markdown
Contributor

Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the diff-based top-repos suite on this PR at af7f5b8. You can monitor the build here.

Update: The results are in!

@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 7, 2023

Copy link
Copy Markdown
Contributor

Hey Daniel Rosenwasser (@DanielRosenwasser), I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
"devDependencies": {
"typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/158992/artifacts?artifactName=tgz&fileId=2722BB2A780D85F3D4B196A2255D19D8292C1A506716247F2DAB09B95737127B02&fileName=/typescript-5.4.0-insiders.20231207.tgz"
}
}

and then running npm install.


There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/pr-build@5.4.0-pr-55924-28".;

@typescript-bot

Copy link
Copy Markdown
Contributor

Daniel Rosenwasser (@DanielRosenwasser)
The results of the perf run you requested are in!

Here they are:

Compiler

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Angular - node (v18.15.0, x64)
Memory used295,371k (± 0.01%)295,365k (± 0.01%)~295,318k295,428kp=0.810 n=6
Parse Time2.65s (± 0.32%)2.65s (± 0.19%)~2.64s2.65sp=0.923 n=6
Bind Time0.82s (± 0.50%)0.82s (± 0.00%)~0.82s0.82sp=0.405 n=6
Check Time8.12s (± 0.29%)8.12s (± 0.15%)~8.11s8.14sp=0.871 n=6
Emit Time7.09s (± 0.25%)7.08s (± 0.19%)~7.05s7.09sp=0.304 n=6
Total Time18.68s (± 0.18%)18.67s (± 0.10%)~18.64s18.69sp=1.000 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used192,374k (± 1.23%)191,817k (± 0.55%)~191,373k193,965kp=0.336 n=6
Parse Time1.36s (± 0.93%)1.36s (± 0.89%)~1.35s1.38sp=0.675 n=6
Bind Time0.72s (± 0.00%)0.72s (± 1.13%)~0.72s0.74sp=0.405 n=6
Check Time9.27s (± 0.41%)9.27s (± 0.36%)~9.22s9.32sp=0.687 n=6
Emit Time2.62s (± 0.37%)2.62s (± 0.56%)~2.59s2.63sp=0.865 n=6
Total Time13.98s (± 0.36%)13.97s (± 0.31%)~13.94s14.05sp=0.570 n=6
Monaco - node (v18.15.0, x64)
Memory used347,375k (± 0.00%)347,380k (± 0.00%)~347,366k347,396kp=0.936 n=6
Parse Time2.46s (± 0.81%)2.45s (± 0.66%)~2.43s2.47sp=0.684 n=6
Bind Time0.92s (± 0.56%)0.93s (± 0.44%)~0.92s0.93sp=0.112 n=6
Check Time6.90s (± 0.39%)6.92s (± 0.65%)~6.88s7.00sp=0.518 n=6
Emit Time4.04s (± 0.43%)4.06s (± 0.48%)~4.04s4.09sp=0.164 n=6
Total Time14.33s (± 0.28%)14.36s (± 0.34%)~14.30s14.42sp=0.198 n=6
TFS - node (v18.15.0, x64)
Memory used302,628k (± 0.00%)302,644k (± 0.00%)~302,627k302,653kp=0.078 n=6
Parse Time1.99s (± 0.93%)2.00s (± 0.99%)~1.96s2.02sp=0.411 n=6
Bind Time1.01s (± 0.97%)1.00s (± 1.17%)~0.99s1.02sp=0.314 n=6
Check Time6.30s (± 0.33%)6.28s (± 0.33%)~6.25s6.31sp=0.222 n=6
Emit Time3.57s (± 0.47%)3.59s (± 0.35%)+0.02s (+ 0.56%)3.58s3.61sp=0.040 n=6
Total Time12.88s (± 0.25%)12.87s (± 0.27%)~12.82s12.91sp=0.936 n=6
material-ui - node (v18.15.0, x64)
Memory used506,741k (± 0.01%)506,759k (± 0.00%)~506,741k506,797kp=0.335 n=6
Parse Time2.57s (± 0.32%)2.58s (± 0.53%)~2.56s2.60sp=0.858 n=6
Bind Time1.00s (± 1.09%)0.99s (± 1.18%)~0.98s1.01sp=0.246 n=6
Check Time16.86s (± 0.30%)16.82s (± 0.18%)~16.79s16.87sp=0.191 n=6
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)~0.00s0.00sp=1.000 n=6
Total Time20.44s (± 0.23%)20.39s (± 0.17%)~20.34s20.43sp=0.107 n=6
xstate - node (v18.15.0, x64)
Memory used512,707k (± 0.01%)512,721k (± 0.01%)~512,663k512,795kp=0.936 n=6
Parse Time3.28s (± 0.25%)3.28s (± 0.31%)~3.27s3.30sp=0.270 n=6
Bind Time1.53s (± 0.34%)1.54s (± 0.49%)~1.53s1.55sp=0.069 n=6
Check Time2.80s (± 0.45%)2.79s (± 0.45%)~2.78s2.81sp=0.187 n=6
Emit Time0.08s (± 0.00%)0.08s (± 0.00%)~0.08s0.08sp=1.000 n=6
Total Time7.69s (± 0.15%)7.69s (± 0.28%)~7.67s7.72sp=0.807 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Angular - node (v18.15.0, x64)
  • Compiler-Unions - node (v18.15.0, x64)
  • Monaco - node (v18.15.0, x64)
  • TFS - node (v18.15.0, x64)
  • material-ui - node (v18.15.0, x64)
  • xstate - 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,346ms (± 0.59%)2,342ms (± 0.25%)~2,336ms2,353msp=0.936 n=6
Req 2 - geterr5,399ms (± 1.51%)5,411ms (± 1.85%)~5,335ms5,541msp=0.689 n=6
Req 3 - references326ms (± 1.46%)323ms (± 1.17%)~320ms330msp=0.142 n=6
Req 4 - navto278ms (± 1.03%)278ms (± 1.26%)~273ms280msp=1.000 n=6
Req 5 - completionInfo count1,356 (± 0.00%)1,356 (± 0.00%)~1,3561,356p=1.000 n=6
Req 5 - completionInfo85ms (± 6.05%)86ms (± 5.88%)~82ms93msp=0.273 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen2,471ms (± 1.12%)2,463ms (± 1.21%)~2,433ms2,514msp=0.575 n=6
Req 2 - geterr4,132ms (± 2.28%)4,139ms (± 1.99%)~4,053ms4,222msp=0.575 n=6
Req 3 - references342ms (± 1.47%)342ms (± 1.42%)~335ms346msp=0.936 n=6
Req 4 - navto287ms (± 1.46%)286ms (± 1.01%)~283ms291msp=0.517 n=6
Req 5 - completionInfo count1,518 (± 0.00%)1,518 (± 0.00%)~1,5181,518p=1.000 n=6
Req 5 - completionInfo83ms (± 7.90%)85ms (± 7.17%)~77ms90msp=0.623 n=6
xstateTSServer - node (v18.15.0, x64)
Req 1 - updateOpen2,595ms (± 0.69%)2,612ms (± 0.31%)~2,597ms2,618msp=0.173 n=6
Req 2 - geterr1,683ms (± 2.22%)1,690ms (± 1.73%)~1,647ms1,720msp=0.936 n=6
Req 3 - references112ms (± 9.29%)115ms (± 8.53%)~102ms123msp=0.935 n=6
Req 4 - navto368ms (± 2.39%)365ms (± 0.41%)~363ms367msp=0.743 n=6
Req 5 - completionInfo count2,073 (± 0.00%)2,073 (± 0.00%)~2,0732,073p=1.000 n=6
Req 5 - completionInfo305ms (± 2.04%)308ms (± 1.56%)~301ms313msp=0.377 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)
  • xstateTSServer - node (v18.15.0, x64)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Startup

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
tsc-startup - node (v18.15.0, x64)
Execution time152.94ms (± 0.22%)152.85ms (± 0.20%)-0.09ms (- 0.06%)151.79ms155.54msp=0.004 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time228.46ms (± 0.17%)228.41ms (± 0.14%)~227.00ms231.60msp=0.252 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time229.70ms (± 0.19%)229.75ms (± 0.18%)~228.03ms233.30msp=0.079 n=600
typescript-startup - node (v18.15.0, x64)
Execution time229.34ms (± 0.18%)229.40ms (± 0.18%)~227.95ms235.79msp=0.058 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

@typescript-bot

Copy link
Copy Markdown
Contributor

Hey Daniel Rosenwasser (@DanielRosenwasser), 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

Daniel Rosenwasser (@DanielRosenwasser) Here are the results of running the top-repos suite comparing main and refs/pull/55924/merge:

Everything looks good!

Comment threadsrc/compiler/checker.ts
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: TeamBreaking ChangeWould introduce errors in existing codeFor Milestone BugPRs that fix a bug with a specific milestone

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

TypeScript silently omits enum assignment type error between two enums with the same name

4 participants

@DanielRosenwasser@typescript-bot@sandersn@gabritto