Skip to content

Remove incorrect handling of intersections in getStringMappingType #53383

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

Merged
merged 2 commits into from
Mar 20, 2023

Conversation

jakebailey
Copy link
Member

Fixes #53382

This line is no longer needed; I believe it's a relic of an earlier version of #52836 which more eagerly evaluated these intersections, but that's not what the final intent of the PR was.

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Mar 20, 2023
@@ -29,12 +29,12 @@ options1[`foo/${path}`] = false;

// Lowercase<`foo/${Path}`> => `foo/${Lowercase<Path>}`
declare const lowercasePath: Lowercase<`foo/${Path}`>;
>lowercasePath : `foo/${Lowercase<string> & { _pathBrand: any; }}`
Copy link
Member Author

Choose a reason for hiding this comment

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

I believe this was wrong in #52836; the intersection here should not be getting lifted out of the string mapping.

@jakebailey

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@jakebailey
Copy link
Member Author

@typescript-bot test this
@typescript-bot test top100
@typescript-bot user test this
@typescript-bot run dt
@typescript-bot perf test this faster

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 20, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 20, 2023

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 20, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 20, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 20, 2023

Heya @jakebailey, I've started to run the extended test suite on this PR at 8a6843f. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

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

Everything looks good!

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - main..53383

Metric main 53383 Delta Best Worst p-value
Angular - node (v16.17.1, x64)
Memory used 361,045k (± 0.01%) 361,057k (± 0.01%) ~ 361,017k 361,092k p=0.630 n=6
Parse Time 3.53s (± 0.49%) 3.52s (± 0.38%) ~ 3.50s 3.54s p=0.210 n=6
Bind Time 1.18s (± 0.64%) 1.19s (± 0.43%) ~ 1.18s 1.19s p=0.247 n=6
Check Time 9.45s (± 0.29%) 9.42s (± 0.24%) ~ 9.39s 9.45s p=0.089 n=6
Emit Time 7.93s (± 0.54%) 7.92s (± 0.98%) ~ 7.85s 8.04s p=0.688 n=6
Total Time 22.10s (± 0.22%) 22.05s (± 0.33%) ~ 21.98s 22.15s p=0.228 n=6
Compiler-Unions - node (v16.17.1, x64)
Memory used 193,088k (± 0.73%) 193,081k (± 0.67%) ~ 192,496k 195,739k p=0.471 n=6
Parse Time 1.58s (± 1.60%) 1.57s (± 1.42%) ~ 1.54s 1.60s p=0.512 n=6
Bind Time 0.82s (± 0.50%) 0.82s (± 1.33%) ~ 0.81s 0.84s p=0.445 n=6
Check Time 10.08s (± 0.57%) 10.09s (± 0.58%) ~ 9.99s 10.16s p=0.810 n=6
Emit Time 2.98s (± 0.86%) 3.00s (± 0.88%) ~ 2.96s 3.04s p=0.292 n=6
Total Time 15.46s (± 0.45%) 15.48s (± 0.53%) ~ 15.33s 15.57s p=0.687 n=6
Monaco - node (v16.17.1, x64)
Memory used 345,573k (± 0.01%) 345,573k (± 0.00%) ~ 345,547k 345,601k p=1.000 n=6
Parse Time 2.73s (± 0.38%) 2.73s (± 0.46%) ~ 2.72s 2.75s p=0.615 n=6
Bind Time 1.08s (± 0.50%) 1.09s (± 0.69%) ~ 1.08s 1.10s p=0.137 n=6
Check Time 7.70s (± 0.40%) 7.70s (± 0.36%) ~ 7.67s 7.75s p=0.807 n=6
Emit Time 4.48s (± 0.73%) 4.47s (± 1.01%) ~ 4.43s 4.56s p=0.624 n=6
Total Time 15.99s (± 0.40%) 16.00s (± 0.42%) ~ 15.90s 16.09s p=1.000 n=6
TFS - node (v16.17.1, x64)
Memory used 299,811k (± 0.01%) 299,807k (± 0.01%) ~ 299,759k 299,866k p=0.810 n=6
Parse Time 2.18s (± 0.82%) 2.17s (± 0.97%) ~ 2.15s 2.21s p=0.250 n=6
Bind Time 1.24s (± 0.66%) 1.24s (± 0.51%) ~ 1.23s 1.25s p=0.432 n=6
Check Time 7.16s (± 0.29%) 7.17s (± 0.33%) ~ 7.13s 7.19s p=0.627 n=6
Emit Time 4.34s (± 0.55%) 4.36s (± 1.04%) ~ 4.31s 4.43s p=0.627 n=6
Total Time 14.92s (± 0.32%) 14.94s (± 0.34%) ~ 14.86s 14.99s p=0.746 n=6
material-ui - node (v16.17.1, x64)
Memory used 476,373k (± 0.00%) 476,382k (± 0.00%) ~ 476,358k 476,407k p=0.422 n=6
Parse Time 3.22s (± 0.20%) 3.22s (± 0.52%) ~ 3.20s 3.24s p=0.801 n=6
Bind Time 0.96s (± 0.43%) 0.95s (± 0.54%) ~ 0.95s 0.96s p=0.112 n=6
Check Time 17.93s (± 0.35%) 17.87s (± 0.23%) ~ 17.82s 17.91s p=0.108 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 22.10s (± 0.31%) 22.04s (± 0.23%) ~ 21.99s 22.10s p=0.107 n=6
xstate - node (v16.17.1, x64)
Memory used 550,626k (± 0.01%) 550,638k (± 0.01%) ~ 550,583k 550,757k p=1.000 n=6
Parse Time 3.94s (± 0.30%) 3.95s (± 0.27%) ~ 3.93s 3.96s p=0.419 n=6
Bind Time 1.80s (± 0.29%) 1.79s (± 0.96%) ~ 1.77s 1.82s p=0.352 n=6
Check Time 3.04s (± 0.92%) 3.04s (± 0.66%) ~ 3.01s 3.07s p=1.000 n=6
Emit Time 0.09s (± 0.00%) 0.09s (± 0.00%) ~ 0.09s 0.09s p=1.000 n=6
Total Time 8.86s (± 0.41%) 8.87s (± 0.38%) ~ 8.82s 8.92s p=0.687 n=6
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-135-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
  • Angular - node (v16.17.1, x64)
  • Compiler-Unions - node (v16.17.1, x64)
  • Monaco - node (v16.17.1, x64)
  • TFS - node (v16.17.1, x64)
  • material-ui - node (v16.17.1, x64)
  • xstate - node (v16.17.1, x64)
Benchmark Name Iterations
Current 53383 6
Baseline main 6

Developer Information:

Download Benchmark

@jakebailey
Copy link
Member Author

Reading the DT logs ahead of time, it hit another npm timeout so this is going to fail to show that the error is fixed, unfortunately, unless I run it again.

@jakebailey
Copy link
Member Author

@typescript-bot run dt

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 20, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

@jakebailey Here are the results of running the top-repos suite comparing main and refs/pull/53383/merge:

Everything looks good!

@jakebailey jakebailey changed the title Remove unneeded handling of intersections in getStringMappingType Remove incorrect handling of intersections in getStringMappingType Mar 20, 2023
@typescript-bot
Copy link
Collaborator

Hey @jakebailey, the results of running the DT tests are ready.
There were interesting changes:

Main only errors:

Package: fragmented-store
Error:

Error: /home/vsts/work/1/s/DefinitelyTyped-tools/packages/dtslint-runner/DefinitelyTyped/types/fragmented-store/fragmented-store-tests.tsx:4:19
ERROR: 4:19   expect  TypeScript@local compile error: 
Property 'useUsername' does not exist on type 'StoreUtils<{ username: string; age: number; }>'.
ERROR: 4:32   expect  TypeScript@local compile error: 
Property 'useAge' does not exist on type 'StoreUtils<{ username: string; age: number; }>'.
ERROR: 30:41  expect  TypeScript@local compile error: 
Parameter 's' implicitly has an 'any' type.
ERROR: 42:38  expect  TypeScript@local compile error: 
Parameter 's' implicitly has an 'any' type.

    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.

@weswigham
Copy link
Member

weswigham commented Mar 20, 2023

Removes the intended main-only errors, nice.

@jakebailey jakebailey merged commit 3ba3ace into microsoft:main Mar 20, 2023
@jakebailey jakebailey deleted the fix-53382 branch March 20, 2023 20:44
@jakebailey
Copy link
Member Author

Glad to know that the infra works! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Milestone Bug PRs that fix a bug with a specific milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

#52836 breaks fragmented-store on DT
3 participants