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

Fixed accidental possibility to create Infinity/-Infinity number literal types #56301

Closed

Conversation

Andarist
Copy link
Contributor

@Andarist Andarist commented Nov 3, 2023

closes #56272

While there are some issues open about allowing those in some form, I think that - for the time being - the fact that they can be constructed (somewhat) should be considered a bug.

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Nov 3, 2023
@typescript-bot
Copy link
Collaborator

The TypeScript team hasn't accepted the linked issue #56272. If you can get it accepted, this PR will have a better chance of being reviewed.

@jakebailey
Copy link
Member

@typescript-bot test top200
@typescript-bot user test this
@typescript-bot run dt

@typescript-bot perf test this
@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 13, 2023

Heya @jakebailey, I've started to run the diff-based user code test suite on this PR at e56d3c9. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 13, 2023

Heya @jakebailey, I've started to run the diff-based top-repos suite on this PR at e56d3c9. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 13, 2023

Heya @jakebailey, I've started to run the tarball bundle task on this PR at e56d3c9. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 13, 2023

Heya @jakebailey, I've started to run the regular perf test suite on this PR at e56d3c9. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 13, 2023

Heya @jakebailey, I've started to run the parallelized Definitely Typed test suite on this PR at e56d3c9. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 13, 2023

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/158562/artifacts?artifactName=tgz&fileId=9871919655992580B3C2C5C2A0869800491FAAC90E99AFFD7550D5FCCA784BAE02&fileName=/typescript-5.4.0-insiders.20231113.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/[email protected]".;

@typescript-bot
Copy link
Collaborator

@jakebailey Here are the results of running the user test suite comparing main and refs/pull/56301/merge:

There were infrastructure failures potentially unrelated to your change:

  • 2 instances of "Package install failed"

Otherwise...

Something interesting changed - please have a look.

Details

puppeteer

packages/browsers/test/src/tsconfig.json

@typescript-bot
Copy link
Collaborator

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

Here they are:

Compiler

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Angular - node (v18.15.0, x64)
Memory used 295,164k (± 0.01%) 295,173k (± 0.02%) ~ 295,127k 295,245k p=1.000 n=6
Parse Time 2.63s (± 0.47%) 2.64s (± 0.46%) ~ 2.62s 2.65s p=0.187 n=6
Bind Time 0.83s (± 0.62%) 0.84s (± 0.97%) ~ 0.83s 0.85s p=0.523 n=6
Check Time 8.03s (± 0.27%) 8.02s (± 0.21%) ~ 7.99s 8.04s p=0.460 n=6
Emit Time 7.09s (± 0.19%) 7.08s (± 0.30%) ~ 7.05s 7.11s p=0.568 n=6
Total Time 18.58s (± 0.17%) 18.57s (± 0.15%) ~ 18.53s 18.60s p=0.518 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used 193,594k (± 1.64%) 192,649k (± 1.56%) ~ 190,668k 196,557k p=1.000 n=6
Parse Time 1.35s (± 0.73%) 1.34s (± 1.02%) ~ 1.32s 1.36s p=0.720 n=6
Bind Time 0.73s (± 0.00%) 0.73s (± 0.00%) ~ 0.73s 0.73s p=1.000 n=6
Check Time 9.16s (± 0.16%) 9.18s (± 0.15%) ~ 9.16s 9.19s p=0.161 n=6
Emit Time 2.63s (± 0.67%) 2.62s (± 0.61%) ~ 2.61s 2.65s p=0.506 n=6
Total Time 13.87s (± 0.12%) 13.88s (± 0.19%) ~ 13.83s 13.90s p=0.258 n=6
Monaco - node (v18.15.0, x64)
Memory used 347,343k (± 0.00%) 347,364k (± 0.00%) +21k (+ 0.01%) 347,355k 347,374k p=0.031 n=6
Parse Time 2.45s (± 0.92%) 2.47s (± 0.34%) ~ 2.45s 2.47s p=0.458 n=6
Bind Time 0.94s (± 0.43%) 0.94s (± 0.55%) ~ 0.94s 0.95s p=0.595 n=6
Check Time 6.93s (± 0.53%) 6.93s (± 0.37%) ~ 6.89s 6.96s p=0.809 n=6
Emit Time 4.04s (± 0.21%) 4.04s (± 0.00%) ~ 4.04s 4.04s p=0.121 n=6
Total Time 14.37s (± 0.24%) 14.37s (± 0.17%) ~ 14.34s 14.40s p=0.936 n=6
TFS - node (v18.15.0, x64)
Memory used 302,581k (± 0.01%) 302,608k (± 0.01%) ~ 302,581k 302,672k p=0.066 n=6
Parse Time 2.01s (± 0.49%) 2.00s (± 0.97%) ~ 1.97s 2.03s p=0.548 n=6
Bind Time 1.00s (± 0.41%) 1.00s (± 1.03%) ~ 0.99s 1.02s p=0.924 n=6
Check Time 6.25s (± 0.43%) 6.27s (± 0.25%) ~ 6.25s 6.29s p=0.328 n=6
Emit Time 3.58s (± 0.38%) 3.59s (± 0.64%) ~ 3.56s 3.62s p=0.807 n=6
Total Time 12.85s (± 0.20%) 12.86s (± 0.26%) ~ 12.82s 12.90s p=0.466 n=6
material-ui - node (v18.15.0, x64)
Memory used 470,570k (± 0.00%) 470,577k (± 0.00%) ~ 470,558k 470,590k p=0.514 n=6
Parse Time 2.56s (± 0.38%) 2.57s (± 0.29%) ~ 2.56s 2.58s p=0.300 n=6
Bind Time 0.99s (± 1.05%) 1.00s (± 0.75%) ~ 0.99s 1.01s p=0.063 n=6
Check Time 16.64s (± 0.30%) 16.66s (± 0.43%) ~ 16.56s 16.77s p=0.521 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 20.18s (± 0.22%) 20.23s (± 0.34%) ~ 20.13s 20.33s p=0.230 n=6
xstate - node (v18.15.0, x64)
Memory used 512,817k (± 0.01%) 512,811k (± 0.01%) ~ 512,759k 512,863k p=0.688 n=6
Parse Time 3.27s (± 0.46%) 3.27s (± 0.42%) ~ 3.25s 3.29s p=0.933 n=6
Bind Time 1.54s (± 0.33%) 1.55s (± 0.33%) ~ 1.54s 1.55s p=0.311 n=6
Check Time 2.86s (± 0.14%) 2.86s (± 0.78%) ~ 2.83s 2.89s p=1.000 n=6
Emit Time 0.08s (± 4.99%) 0.08s (± 6.19%) ~ 0.08s 0.09s p=0.595 n=6
Total Time 7.75s (± 0.11%) 7.75s (± 0.49%) ~ 7.69s 7.80s p=0.745 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)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

tsserver

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-UnionsTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,383ms (± 1.19%) 2,374ms (± 0.50%) ~ 2,357ms 2,390ms p=0.261 n=6
Req 2 - geterr 5,378ms (± 1.43%) 5,424ms (± 1.35%) ~ 5,317ms 5,481ms p=0.471 n=6
Req 3 - references 328ms (± 0.69%) 327ms (± 0.47%) ~ 325ms 329ms p=0.807 n=6
Req 4 - navto 277ms (± 1.06%) 275ms (± 1.09%) ~ 273ms 279ms p=0.546 n=6
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) ~ 1,356 1,356 p=1.000 n=6
Req 5 - completionInfo 80ms (± 7.49%) 85ms (± 8.79%) ~ 75ms 90ms p=0.315 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,508ms (± 0.67%) 2,509ms (± 1.44%) ~ 2,458ms 2,556ms p=0.873 n=6
Req 2 - geterr 4,082ms (± 1.92%) 4,134ms (± 1.92%) ~ 4,031ms 4,193ms p=0.173 n=6
Req 3 - references 342ms (± 1.19%) 337ms (± 1.58%) ~ 333ms 344ms p=0.123 n=6
Req 4 - navto 282ms (± 0.29%) 282ms (± 0.29%) ~ 281ms 283ms p=0.204 n=6
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) ~ 1,518 1,518 p=1.000 n=6
Req 5 - completionInfo 88ms (± 5.50%) 82ms (± 7.23%) ~ 78ms 90ms p=0.262 n=6
xstateTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,602ms (± 0.41%) 2,591ms (± 0.18%) ~ 2,583ms 2,597ms p=0.109 n=6
Req 2 - geterr 1,729ms (± 1.89%) 1,713ms (± 2.42%) ~ 1,670ms 1,772ms p=0.810 n=6
Req 3 - references 111ms (± 8.51%) 113ms (± 8.43%) ~ 100ms 123ms p=0.936 n=6
Req 4 - navto 365ms (± 0.41%) 366ms (± 0.56%) ~ 364ms 369ms p=0.510 n=6
Req 5 - completionInfo count 2,073 (± 0.00%) 2,073 (± 0.00%) ~ 2,073 2,073 p=1.000 n=6
Req 5 - completionInfo 316ms (± 1.13%) 309ms (± 1.67%) -7ms (- 2.27%) 303ms 315ms p=0.019 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)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Startup

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
tsc-startup - node (v18.15.0, x64)
Execution time 152.31ms (± 0.22%) 152.22ms (± 0.19%) -0.09ms (- 0.06%) 151.08ms 154.28ms p=0.001 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time 228.30ms (± 0.16%) 227.94ms (± 0.14%) -0.36ms (- 0.16%) 226.56ms 230.50ms p=0.000 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time 229.21ms (± 0.17%) 229.23ms (± 0.16%) ~ 227.80ms 235.82ms p=0.527 n=600
typescript-startup - node (v18.15.0, x64)
Execution time 228.95ms (± 0.14%) 228.92ms (± 0.15%) ~ 227.37ms 231.91ms p=0.165 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)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@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 top-repos suite comparing main and refs/pull/56301/merge:

Everything looks good!

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

Successfully merging this pull request may close these issues.

Infinities as number literal types
3 participants