Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report unreachable on enums #58380

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

jakebailey
Copy link
Member

Fixes #58379. I think...

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Apr 30, 2024
@jakebailey
Copy link
Member Author

@typescript-bot test it
@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 30, 2024

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

Command Status Results
test top400 ✅ Started ✅ Results
user test this ✅ Started ✅ Results
run dt ✅ Started ✅ Results
perf test this faster ✅ Started 👀 Results
pack this ✅ Started ✅ Results

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 30, 2024

Hey @jakebailey, 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/161578/artifacts?artifactName=tgz&fileId=D3F40B62AD78B59BAB96414F0AECB3FB65A5F0751FF60600BA61828C96046C3F02&fileName=/typescript-5.5.0-insiders.20240430.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.5.0-pr-58380-2".;

@typescript-bot
Copy link
Collaborator

Hey @jakebailey, the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@typescript-bot
Copy link
Collaborator

@jakebailey Here are the results of running the user tests comparing main and refs/pull/58380/merge:

Everything looks good!

@jakebailey jakebailey marked this pull request as draft May 1, 2024 00:10
@typescript-bot
Copy link
Collaborator

@jakebailey
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-Unions - node (v18.15.0, x64)
Errors 30 30 ~ ~ ~ p=1.000 n=6
Symbols 62,154 62,154 ~ ~ ~ p=1.000 n=6
Types 50,273 50,273 ~ ~ ~ p=1.000 n=6
Memory used 192,817k (± 0.80%) 192,187k (± 0.02%) ~ 192,131k 192,229k p=0.936 n=6
Parse Time 1.29s (± 1.58%) 1.29s (± 1.03%) ~ 1.27s 1.31s p=0.934 n=6
Bind Time 0.72s 0.72s ~ ~ ~ p=1.000 n=6
Check Time 9.53s (± 0.21%) 9.53s (± 0.40%) ~ 9.50s 9.60s p=0.462 n=6
Emit Time 2.64s (± 0.24%) 2.64s (± 0.44%) ~ 2.62s 2.65s p=1.000 n=6
Total Time 14.18s (± 0.17%) 14.17s (± 0.31%) ~ 14.12s 14.24s p=0.627 n=6
angular-1 - node (v18.15.0, x64)
Errors 5 5 ~ ~ ~ p=1.000 n=6
Symbols 945,322 945,322 ~ ~ ~ p=1.000 n=6
Types 408,088 408,088 ~ ~ ~ p=1.000 n=6
Memory used 1,222,797k (± 0.00%) 1,222,816k (± 0.00%) ~ 1,222,772k 1,222,860k p=0.575 n=6
Parse Time 6.77s (± 0.30%) 6.78s (± 0.34%) ~ 6.74s 6.81s p=0.560 n=6
Bind Time 1.87s (± 0.71%) 1.88s (± 0.65%) ~ 1.86s 1.89s p=0.652 n=6
Check Time 31.32s (± 0.36%) 31.27s (± 0.20%) ~ 31.19s 31.36s p=0.520 n=6
Emit Time 14.64s (± 0.90%) 14.66s (± 0.88%) ~ 14.41s 14.78s p=1.000 n=6
Total Time 54.59s (± 0.20%) 54.58s (± 0.20%) ~ 54.37s 54.68s p=0.936 n=6
mui-docs - node (v18.15.0, x64)
Errors 5 5 ~ ~ ~ p=1.000 n=6
Symbols 1,956,164 1,956,164 ~ ~ ~ p=1.000 n=6
Types 676,919 676,919 ~ ~ ~ p=1.000 n=6
Memory used 1,757,740k (± 0.00%) 1,757,749k (± 0.00%) ~ 1,757,714k 1,757,783k p=0.689 n=6
Parse Time 6.71s (± 0.29%) 6.71s (± 0.30%) ~ 6.69s 6.74s p=0.806 n=6
Bind Time 2.31s (± 0.52%) 2.30s (± 0.71%) ~ 2.28s 2.32s p=0.265 n=6
Check Time 56.11s (± 0.43%) 56.01s (± 0.52%) ~ 55.51s 56.32s p=0.630 n=6
Emit Time 0.13s (± 3.10%) 0.13s (± 3.10%) ~ 0.13s 0.14s p=1.000 n=6
Total Time 65.26s (± 0.38%) 65.16s (± 0.46%) ~ 64.64s 65.46s p=0.630 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,217,124 1,217,124 ~ ~ ~ p=1.000 n=6
Types 258,216 258,217 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 2,327,099k (± 0.03%) 2,327,118k (± 0.03%) ~ 2,326,301k 2,328,071k p=1.000 n=6
Parse Time 4.99s (± 0.83%) 4.92s (± 1.02%) ~ 4.85s 5.00s p=0.064 n=6
Bind Time 1.86s (± 0.81%) 1.88s (± 1.42%) ~ 1.85s 1.92s p=0.402 n=6
Check Time 33.44s (± 0.26%) 33.35s (± 0.41%) ~ 33.13s 33.55s p=0.297 n=6
Emit Time 2.59s (± 1.91%) 2.58s (± 1.82%) ~ 2.52s 2.63s p=0.810 n=6
Total Time 42.90s (± 0.36%) 42.74s (± 0.35%) ~ 42.46s 42.87s p=0.199 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,217,124 1,217,124 ~ ~ ~ p=1.000 n=6
Types 258,216 258,217 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 2,401,607k (± 0.02%) 2,401,581k (± 0.01%) ~ 2,400,983k 2,401,876k p=1.000 n=6
Parse Time 6.14s (± 0.42%) 6.16s (± 0.60%) ~ 6.13s 6.21s p=0.470 n=6
Bind Time 2.04s (± 1.23%) 2.02s (± 1.93%) ~ 1.97s 2.07s p=0.572 n=6
Check Time 40.00s (± 0.20%) 40.07s (± 0.19%) ~ 39.95s 40.19s p=0.378 n=6
Emit Time 3.14s (± 0.94%) 3.15s (± 0.95%) ~ 3.12s 3.19s p=1.000 n=6
Total Time 51.32s (± 0.18%) 51.41s (± 0.19%) ~ 51.24s 51.50s p=0.093 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 256,229 256,229 ~ ~ ~ p=1.000 n=6
Types 103,713 103,714 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 424,282k (± 0.01%) 424,282k (± 0.01%) ~ 424,258k 424,327k p=0.936 n=6
Parse Time 3.35s (± 0.49%) 3.34s (± 0.65%) ~ 3.31s 3.37s p=0.465 n=6
Bind Time 1.30s (± 0.58%) 1.30s (± 0.31%) ~ 1.30s 1.31s p=0.389 n=6
Check Time 17.69s (± 0.38%) 17.69s (± 0.32%) ~ 17.63s 17.80s p=0.570 n=6
Emit Time 1.36s (± 1.18%) 1.36s (± 1.91%) ~ 1.31s 1.39s p=0.934 n=6
Total Time 23.69s (± 0.29%) 23.69s (± 0.34%) ~ 23.62s 23.84s p=0.470 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 35 35 ~ ~ ~ p=1.000 n=6
Symbols 224,824 224,824 ~ ~ ~ p=1.000 n=6
Types 93,390 93,390 ~ ~ ~ p=1.000 n=6
Memory used 369,300k (± 0.00%) 369,296k (± 0.01%) ~ 369,252k 369,339k p=0.936 n=6
Parse Time 3.51s (± 0.63%) 3.53s (± 1.01%) ~ 3.47s 3.58s p=0.223 n=6
Bind Time 1.94s (± 1.10%) 1.95s (± 1.35%) ~ 1.92s 1.98s p=0.807 n=6
Check Time 19.35s (± 0.28%) 19.34s (± 0.20%) ~ 19.31s 19.39s p=0.746 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 24.79s (± 0.23%) 24.82s (± 0.18%) ~ 24.78s 24.89s p=0.573 n=6
vscode - node (v18.15.0, x64)
Errors 4 4 ~ ~ ~ p=1.000 n=6
Symbols 2,799,582 2,799,582 ~ ~ ~ p=1.000 n=6
Types 950,968 950,968 ~ ~ ~ p=1.000 n=6
Memory used 2,928,376k (± 0.01%) 2,928,361k (± 0.01%) ~ 2,927,844k 2,928,483k p=0.748 n=6
Parse Time 13.30s (± 0.26%) 13.33s (± 0.44%) ~ 13.27s 13.42s p=0.421 n=6
Bind Time 4.20s (± 2.39%) 4.26s (± 1.99%) ~ 4.09s 4.31s p=0.372 n=6
Check Time 72.81s (± 0.22%) 72.92s (± 0.52%) ~ 72.53s 73.57s p=1.000 n=6
Emit Time 20.08s (± 4.32%) 19.95s (± 3.66%) ~ 19.44s 21.42s p=0.688 n=6
Total Time 110.40s (± 0.89%) 110.46s (± 0.74%) ~ 109.54s 111.91s p=1.000 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 265,858 265,858 ~ ~ ~ p=1.000 n=6
Types 108,442 108,442 ~ ~ ~ p=1.000 n=6
Memory used 410,415k (± 0.01%) 410,457k (± 0.02%) ~ 410,367k 410,558k p=0.336 n=6
Parse Time 4.75s (± 0.42%) 4.78s (± 0.51%) ~ 4.75s 4.81s p=0.124 n=6
Bind Time 2.05s (± 0.51%) 2.04s (± 0.80%) ~ 2.02s 2.06s p=0.250 n=6
Check Time 20.92s (± 0.46%) 20.96s (± 0.29%) ~ 20.89s 21.04s p=0.378 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 27.73s (± 0.37%) 27.78s (± 0.22%) ~ 27.70s 27.87s p=0.469 n=6
xstate-main - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 524,146 524,146 ~ ~ ~ p=1.000 n=6
Types 178,732 178,732 ~ ~ ~ p=1.000 n=6
Memory used 462,182k (± 0.02%) 462,239k (± 0.02%) ~ 462,086k 462,334k p=0.378 n=6
Parse Time 3.90s (± 0.44%) 3.89s (± 0.66%) ~ 3.86s 3.92s p=0.517 n=6
Bind Time 1.46s (± 1.41%) 1.47s (± 1.65%) ~ 1.45s 1.51s p=1.000 n=6
Check Time 22.52s (± 0.56%) 22.46s (± 0.77%) ~ 22.21s 22.75s p=0.261 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 27.88s (± 0.42%) 27.81s (± 0.57%) ~ 27.64s 28.11s p=0.297 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)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@typescript-bot
Copy link
Collaborator

@jakebailey Here are the results of running the top 400 repos comparing main and refs/pull/58380/merge:

Everything looks good!

@@ -3785,6 +3785,7 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void {
(isStatementButNotDeclaration(node) && node.kind !== SyntaxKind.EmptyStatement) ||
// report error on class declarations
node.kind === SyntaxKind.ClassDeclaration ||
(node.kind === SyntaxKind.EnumDeclaration && (!isEnumConst(node as EnumDeclaration) || shouldPreserveConstEnums(options))) ||
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
(node.kind === SyntaxKind.EnumDeclaration && (!isEnumConst(node as EnumDeclaration) || shouldPreserveConstEnums(options))) ||
// report errors on enums with preserved emit
(node.kind === SyntaxKind.EnumDeclaration && (!isEnumConst(node as EnumDeclaration) || shouldPreserveConstEnums(options))) ||

Copy link
Member

@DanielRosenwasser DanielRosenwasser left a comment

Choose a reason for hiding this comment

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

Not a great error span but it's fine.

@jakebailey
Copy link
Member Author

Yeah, this isn't quite done; classes get a better message here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing reachability error on non-const enum
3 participants