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

Exposed TypeChecker.resolveName API to public along with SymbolFlags.All #56932

Merged
merged 2 commits into from
Jan 19, 2024
Merged

Exposed TypeChecker.resolveName API to public along with SymbolFlags.All #56932

merged 2 commits into from
Jan 19, 2024

Conversation

timocov
Copy link
Contributor

@timocov timocov commented Jan 2, 2024

Related to #46793 (doesn't actually fixes it, but partially addresses - see #46793 (comment))

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Jan 2, 2024
@typescript-bot
Copy link
Collaborator

Looks like you're introducing a change to the public API surface area. If this includes breaking changes, please document them on our wiki's API Breaking Changes page.

Also, please make sure @DanielRosenwasser and @RyanCavanaugh are aware of the changes, just as a heads up.

src/compiler/types.ts Outdated Show resolved Hide resolved
@andrewbranch
Copy link
Member

@timocov is there a reason this is a draft? Were you planning to add anything else?

@timocov
Copy link
Contributor Author

timocov commented Jan 3, 2024

Not really, I wasn't sure if this is the change you'd want to see in the compiler (asked in the linked issue but haven't got any response yet). If that's alright I can mark it as ready for review.

@andrewbranch andrewbranch marked this pull request as ready for review January 3, 2024 20:30
@typescript-bot
Copy link
Collaborator

This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.

@timocov
Copy link
Contributor Author

timocov commented Jan 10, 2024

@andrewbranch @rbuckton is there anything I can do to get this merged?

@jakebailey
Copy link
Member

FWIW we did decide to expose this in today's design meeting, so it's just the -1 thing and then this should be good to get in before the beta cutoff.

src/compiler/types.ts Outdated Show resolved Hide resolved
@jakebailey
Copy link
Member

I just merged the suggestion to get this along; want to get this in before we cut for the beta.

@jakebailey
Copy link
Member

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

@typescript-bot perf test this

@typescript-bot user test tsserver
@typescript-bot test tsserver top100

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 19, 2024

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 19, 2024

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 19, 2024

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 19, 2024

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 19, 2024

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 19, 2024

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

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

Everything looks good!

@typescript-bot
Copy link
Collaborator

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

There were infrastructure failures potentially unrelated to your change:

  • 1 instance 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

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
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
Angular - node (v18.15.0, x64)
Memory used 295,666k (± 0.01%) 295,666k (± 0.01%) ~ 295,646k 295,700k p=0.810 n=6
Parse Time 2.66s (± 0.24%) 2.65s (± 0.50%) ~ 2.63s 2.67s p=0.203 n=6
Bind Time 0.83s (± 0.99%) 0.83s (± 0.99%) ~ 0.82s 0.84s p=1.000 n=6
Check Time 8.19s (± 0.42%) 8.19s (± 0.34%) ~ 8.15s 8.23s p=0.808 n=6
Emit Time 7.10s (± 0.21%) 7.09s (± 0.19%) ~ 7.07s 7.11s p=0.459 n=6
Total Time 18.78s (± 0.12%) 18.77s (± 0.13%) ~ 18.73s 18.80s p=0.295 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used 192,493k (± 1.23%) 191,542k (± 0.01%) ~ 191,499k 191,580k p=0.471 n=6
Parse Time 1.37s (± 1.10%) 1.36s (± 1.00%) ~ 1.35s 1.38s p=0.680 n=6
Bind Time 0.72s (± 0.00%) 0.72s (± 0.00%) ~ 0.72s 0.72s p=1.000 n=6
Check Time 9.36s (± 0.21%) 9.35s (± 0.52%) ~ 9.29s 9.41s p=0.872 n=6
Emit Time 2.62s (± 0.46%) 2.61s (± 0.79%) ~ 2.58s 2.63s p=0.474 n=6
Total Time 14.07s (± 0.16%) 14.04s (± 0.39%) ~ 13.94s 14.09s p=0.290 n=6
Monaco - node (v18.15.0, x64)
Memory used 347,448k (± 0.01%) 347,439k (± 0.01%) ~ 347,406k 347,466k p=0.573 n=6
Parse Time 2.48s (± 0.49%) 2.48s (± 0.36%) ~ 2.47s 2.49s p=0.676 n=6
Bind Time 0.93s (± 0.44%) 0.93s (± 0.00%) ~ 0.93s 0.93s p=0.405 n=6
Check Time 6.90s (± 0.35%) 6.91s (± 0.35%) ~ 6.88s 6.94s p=0.415 n=6
Emit Time 4.06s (± 0.44%) 4.05s (± 0.34%) ~ 4.04s 4.07s p=0.743 n=6
Total Time 14.37s (± 0.13%) 14.38s (± 0.26%) ~ 14.33s 14.42s p=0.747 n=6
TFS - node (v18.15.0, x64)
Memory used 302,832k (± 0.00%) 302,826k (± 0.00%) ~ 302,810k 302,847k p=0.470 n=6
Parse Time 2.01s (± 0.26%) 2.02s (± 0.63%) ~ 2.01s 2.04s p=0.418 n=6
Bind Time 1.00s (± 0.75%) 1.00s (± 0.52%) ~ 0.99s 1.00s p=0.784 n=6
Check Time 6.33s (± 0.39%) 6.33s (± 0.36%) ~ 6.30s 6.36s p=0.565 n=6
Emit Time 3.59s (± 0.35%) 3.60s (± 0.42%) ~ 3.57s 3.61s p=0.314 n=6
Total Time 12.93s (± 0.16%) 12.94s (± 0.22%) ~ 12.91s 12.99s p=0.808 n=6
material-ui - node (v18.15.0, x64)
Memory used 511,294k (± 0.00%) 511,289k (± 0.01%) ~ 511,256k 511,328k p=0.575 n=6
Parse Time 2.65s (± 0.65%) 2.65s (± 0.31%) ~ 2.64s 2.66s p=0.677 n=6
Bind Time 1.00s (± 0.63%) 1.00s (± 0.41%) ~ 0.99s 1.00s p=0.673 n=6
Check Time 17.28s (± 0.50%) 17.23s (± 0.43%) ~ 17.15s 17.33s p=0.467 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 20.92s (± 0.41%) 20.89s (± 0.38%) ~ 20.80s 20.99s p=0.688 n=6
mui-docs - node (v18.15.0, x64)
Memory used 1,695,954k (± 0.00%) 1,695,931k (± 0.00%) ~ 1,695,877k 1,695,969k p=0.336 n=6
Parse Time 6.53s (± 0.28%) 6.53s (± 0.53%) ~ 6.50s 6.58s p=1.000 n=6
Bind Time 2.35s (± 0.32%) 2.35s (± 0.50%) ~ 2.34s 2.37s p=0.933 n=6
Check Time 55.32s (± 0.37%) 55.20s (± 0.43%) ~ 54.74s 55.43s p=0.378 n=6
Emit Time 0.16s (± 0.00%) 0.16s (± 0.00%) ~ 0.16s 0.16s p=1.000 n=6
Total Time 64.37s (± 0.31%) 64.25s (± 0.36%) ~ 63.79s 64.44s p=0.423 n=6
self-build-src - node (v18.15.0, x64)
Memory used 2,413,055k (± 0.02%) 2,412,646k (± 0.02%) ~ 2,412,069k 2,413,100k p=0.298 n=6
Parse Time 4.94s (± 1.07%) 4.94s (± 0.85%) ~ 4.90s 5.00s p=0.936 n=6
Bind Time 1.86s (± 0.22%) 1.88s (± 0.94%) +0.01s (+ 0.72%) 1.86s 1.91s p=0.033 n=6
Check Time 33.21s (± 0.22%) 33.37s (± 0.21%) +0.16s (+ 0.47%) 33.29s 33.47s p=0.013 n=6
Emit Time 2.68s (± 0.84%) 2.70s (± 1.23%) ~ 2.66s 2.75s p=0.572 n=6
Total Time 42.74s (± 0.29%) 42.91s (± 0.24%) ~ 42.73s 43.03s p=0.066 n=6
self-compiler - node (v18.15.0, x64)
Memory used 419,689k (± 0.01%) 419,692k (± 0.01%) ~ 419,606k 419,744k p=0.378 n=6
Parse Time 2.78s (± 2.86%) 2.81s (± 2.62%) ~ 2.66s 2.86s p=0.572 n=6
Bind Time 1.12s (± 6.46%) 1.10s (± 5.39%) ~ 1.07s 1.22s p=0.737 n=6
Check Time 15.12s (± 0.39%) 15.07s (± 0.30%) ~ 15.01s 15.13s p=0.148 n=6
Emit Time 1.16s (± 1.52%) 1.15s (± 1.28%) ~ 1.13s 1.17s p=0.803 n=6
Total Time 20.18s (± 0.31%) 20.13s (± 0.38%) ~ 20.02s 20.22s p=0.296 n=6
vscode - node (v18.15.0, x64)
Memory used 2,807,337k (± 0.00%) 2,807,306k (± 0.00%) ~ 2,807,247k 2,807,370k p=0.471 n=6
Parse Time 10.62s (± 0.25%) 10.61s (± 0.44%) ~ 10.55s 10.66s p=1.000 n=6
Bind Time 3.38s (± 0.29%) 3.38s (± 0.35%) ~ 3.37s 3.40s p=0.673 n=6
Check Time 59.62s (± 0.21%) 59.52s (± 0.33%) ~ 59.26s 59.83s p=0.378 n=6
Emit Time 16.14s (± 0.46%) 16.11s (± 0.49%) ~ 15.99s 16.22s p=0.419 n=6
Total Time 89.77s (± 0.17%) 89.62s (± 0.18%) ~ 89.36s 89.79s p=0.173 n=6
webpack - node (v18.15.0, x64)
Memory used 392,384k (± 0.02%) 392,357k (± 0.01%) ~ 392,300k 392,415k p=0.810 n=6
Parse Time 3.05s (± 0.64%) 3.07s (± 0.78%) ~ 3.05s 3.11s p=0.184 n=6
Bind Time 1.40s (± 0.58%) 1.39s (± 0.75%) ~ 1.38s 1.41s p=0.180 n=6
Check Time 13.97s (± 0.40%) 14.01s (± 0.40%) ~ 13.95s 14.10s p=0.173 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 18.42s (± 0.36%) 18.48s (± 0.37%) ~ 18.39s 18.56s p=0.227 n=6
xstate - node (v18.15.0, x64)
Memory used 513,408k (± 0.01%) 513,401k (± 0.02%) ~ 513,296k 513,495k p=0.936 n=6
Parse Time 3.29s (± 0.36%) 3.27s (± 0.30%) -0.02s (- 0.51%) 3.26s 3.28s p=0.040 n=6
Bind Time 1.54s (± 0.26%) 1.54s (± 0.27%) ~ 1.53s 1.54s p=0.218 n=6
Check Time 2.85s (± 0.59%) 2.85s (± 0.65%) ~ 2.83s 2.87s p=0.684 n=6
Emit Time 0.08s (± 4.99%) 0.08s (± 6.19%) ~ 0.08s 0.09s p=0.595 n=6
Total Time 7.76s (± 0.18%) 7.74s (± 0.27%) ~ 7.71s 7.77s p=0.090 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)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - 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,357ms (± 0.70%) 2,338ms (± 0.62%) ~ 2,325ms 2,364ms p=0.093 n=6
Req 2 - geterr 5,514ms (± 1.38%) 5,554ms (± 1.39%) ~ 5,450ms 5,620ms p=0.689 n=6
Req 3 - references 323ms (± 1.14%) 325ms (± 1.02%) ~ 321ms 329ms p=0.223 n=6
Req 4 - navto 276ms (± 1.06%) 273ms (± 1.72%) ~ 270ms 280ms p=0.503 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 88ms (± 4.92%) 89ms (± 7.57%) ~ 78ms 95ms p=0.511 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,482ms (± 0.93%) 2,478ms (± 1.07%) ~ 2,445ms 2,516ms p=0.688 n=6
Req 2 - geterr 4,185ms (± 2.17%) 4,185ms (± 2.15%) ~ 4,091ms 4,277ms p=0.936 n=6
Req 3 - references 337ms (± 1.52%) 334ms (± 1.46%) ~ 327ms 341ms p=0.225 n=6
Req 4 - navto 285ms (± 0.34%) 285ms (± 0.58%) ~ 283ms 287ms p=0.557 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 84ms (± 8.25%) 81ms (± 9.55%) ~ 74ms 91ms p=0.627 n=6
xstateTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,613ms (± 0.40%) 2,615ms (± 0.48%) ~ 2,596ms 2,633ms p=1.000 n=6
Req 2 - geterr 1,719ms (± 2.92%) 1,733ms (± 2.10%) ~ 1,692ms 1,776ms p=0.689 n=6
Req 3 - references 120ms (± 8.75%) 120ms (± 8.62%) ~ 106ms 128ms p=0.742 n=6
Req 4 - navto 370ms (± 0.96%) 370ms (± 0.74%) ~ 365ms 373ms p=0.808 n=6
Req 5 - completionInfo count 2,078 (± 0.00%) 2,078 (± 0.00%) ~ 2,078 2,078 p=1.000 n=6
Req 5 - completionInfo 311ms (± 1.92%) 308ms (± 1.26%) ~ 305ms 315ms p=0.628 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 154.12ms (± 0.23%) 153.91ms (± 0.19%) -0.21ms (- 0.14%) 152.81ms 156.87ms p=0.000 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time 229.90ms (± 0.16%) 229.70ms (± 0.17%) -0.20ms (- 0.09%) 228.13ms 235.47ms p=0.000 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time 231.44ms (± 0.18%) 231.35ms (± 0.18%) -0.09ms (- 0.04%) 229.84ms 237.42ms p=0.008 n=600
typescript-startup - node (v18.15.0, x64)
Execution time 231.24ms (± 0.22%) 231.08ms (± 0.17%) -0.17ms (- 0.07%) 229.49ms 234.72ms p=0.001 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

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

Something interesting changed - please have a look.

Details

chakra-ui/chakra-ui

4 of 28 projects failed to build with the old tsc and were ignored

packages/components/tsconfig.build.json

  • error TS5056: Cannot write file '/mnt/ts_downloads/chakra-ui/packages/components/dist/types/menu/menu.stories.d.ts' because it would be overwritten by multiple input files.
    • Project Scope

@typescript-bot
Copy link
Collaborator

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

Something interesting changed - please have a look.

Details

Server exited prematurely with code unknown and signal SIGABRT

Server exited prematurely with code unknown and signal SIGABRT

Affected repos

calcom/cal.com Raw error text: RepoResults7/calcom.cal.com.rawError.txt in the artifact folder

Last few requests

{"seq":754,"type":"request","command":"definitionAndBoundSpan","arguments":{"file":"@PROJECT_ROOT@/apps/swagger/pages/index.tsx","line":4,"offset":52}}
{"seq":755,"type":"request","command":"references","arguments":{"file":"@PROJECT_ROOT@/apps/swagger/pages/index.tsx","line":4,"offset":52}}
{"seq":756,"type":"request","command":"updateOpen","arguments":{"changedFiles":[],"closedFiles":["@PROJECT_ROOT@/apps/api/test/lib/middleware/httpMethods.test.ts"],"openFiles":[]}}
{"seq":757,"type":"request","command":"updateOpen","arguments":{"changedFiles":[],"closedFiles":[],"openFiles":[{"file":"@PROJECT_ROOT@/apps/web/abTest/middlewareFactory.ts","projectRootPath":"@PROJECT_ROOT@"}]}}

Repro steps

  1. git clone https://github.com/calcom/cal.com --recurse-submodules
  2. In dir cal.com, run git reset --hard 728a386bf090ff39837c5ecb87d5308c47fc91eb
  3. In dir cal.com, run yarn install --no-immutable --mode=skip-build
  4. Back in the initial folder, download RepoResults7/calcom.cal.com.replay.txt from the artifact folder
  5. npm install --no-save @typescript/server-replay
  6. npx tsreplay ./cal.com ./calcom.cal.com.replay.txt path/to/tsserver.js
  7. npx tsreplay --help to learn about helpful switches for debugging, logging, etc

@jakebailey
Copy link
Member

None of the above is new; merging. Thanks for the PR, @timocov!

@jakebailey jakebailey merged commit 4282067 into microsoft:main Jan 19, 2024
19 checks passed
@timocov timocov deleted the expose-resolveName-api branch January 20, 2024 00:22
timocov added a commit to timocov/dts-bundle-generator that referenced this pull request Jan 20, 2024
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.

5 participants