Skip to content

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

Merged
Jake Bailey (jakebailey) merged 2 commits into
microsoft:mainfrom
timocov:expose-resolveName-api
Jan 19, 2024
Merged

Exposed TypeChecker.resolveName API to public along with SymbolFlags.All#56932
Jake Bailey (jakebailey) merged 2 commits into
microsoft:mainfrom
timocov:expose-resolveName-api

Conversation

@timocov

Copy link
Copy Markdown
Contributor

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

@typescript-botTypeScript Bot (typescript-bot) added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Jan 2, 2024
@typescript-bot

Copy link
Copy Markdown
Contributor

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 Daniel Rosenwasser (@DanielRosenwasser) and Ryan Cavanaugh (@RyanCavanaugh) are aware of the changes, just as a heads up.

Comment threadsrc/compiler/types.ts Outdated
@andrewbranch

Copy link
Copy Markdown
Member

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

@timocov

Copy link
Copy Markdown
ContributorAuthor

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
Andrew Branch (andrewbranch) marked this pull request as ready for review January 3, 2024 20:30
@typescript-bot

Copy link
Copy Markdown
Contributor

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
Copy Markdown
ContributorAuthor

Andrew Branch (@andrewbranch)Ron Buckton (@rbuckton) is there anything I can do to get this merged?

@jakebailey

Copy link
Copy Markdown
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.

Comment threadsrc/compiler/types.ts Outdated
Comment threadtests/baselines/reference/api/typescript.d.ts Outdated
@jakebailey

Copy link
Copy Markdown
Member

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

@jakebailey

Copy link
Copy Markdown
Member

@typescript-bot

TypeScript Bot (typescript-bot) commented Jan 19, 2024

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@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

TypeScript Bot (typescript-bot) commented Jan 19, 2024

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@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

TypeScript Bot (typescript-bot) commented Jan 19, 2024

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@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

TypeScript Bot (typescript-bot) commented Jan 19, 2024

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@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

TypeScript Bot (typescript-bot) commented Jan 19, 2024

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@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

TypeScript Bot (typescript-bot) commented Jan 19, 2024

Copy link
Copy Markdown
Contributor

Heya Jake Bailey (@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
Copy Markdown
Contributor

Jake Bailey (@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
Copy Markdown
Contributor

Jake Bailey (@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
Copy Markdown
Contributor

Hey Jake Bailey (@jakebailey), 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

Jake Bailey (@jakebailey)
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Angular - node (v18.15.0, x64)
Memory used295,666k (± 0.01%)295,666k (± 0.01%)~295,646k295,700kp=0.810 n=6
Parse Time2.66s (± 0.24%)2.65s (± 0.50%)~2.63s2.67sp=0.203 n=6
Bind Time0.83s (± 0.99%)0.83s (± 0.99%)~0.82s0.84sp=1.000 n=6
Check Time8.19s (± 0.42%)8.19s (± 0.34%)~8.15s8.23sp=0.808 n=6
Emit Time7.10s (± 0.21%)7.09s (± 0.19%)~7.07s7.11sp=0.459 n=6
Total Time18.78s (± 0.12%)18.77s (± 0.13%)~18.73s18.80sp=0.295 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used192,493k (± 1.23%)191,542k (± 0.01%)~191,499k191,580kp=0.471 n=6
Parse Time1.37s (± 1.10%)1.36s (± 1.00%)~1.35s1.38sp=0.680 n=6
Bind Time0.72s (± 0.00%)0.72s (± 0.00%)~0.72s0.72sp=1.000 n=6
Check Time9.36s (± 0.21%)9.35s (± 0.52%)~9.29s9.41sp=0.872 n=6
Emit Time2.62s (± 0.46%)2.61s (± 0.79%)~2.58s2.63sp=0.474 n=6
Total Time14.07s (± 0.16%)14.04s (± 0.39%)~13.94s14.09sp=0.290 n=6
Monaco - node (v18.15.0, x64)
Memory used347,448k (± 0.01%)347,439k (± 0.01%)~347,406k347,466kp=0.573 n=6
Parse Time2.48s (± 0.49%)2.48s (± 0.36%)~2.47s2.49sp=0.676 n=6
Bind Time0.93s (± 0.44%)0.93s (± 0.00%)~0.93s0.93sp=0.405 n=6
Check Time6.90s (± 0.35%)6.91s (± 0.35%)~6.88s6.94sp=0.415 n=6
Emit Time4.06s (± 0.44%)4.05s (± 0.34%)~4.04s4.07sp=0.743 n=6
Total Time14.37s (± 0.13%)14.38s (± 0.26%)~14.33s14.42sp=0.747 n=6
TFS - node (v18.15.0, x64)
Memory used302,832k (± 0.00%)302,826k (± 0.00%)~302,810k302,847kp=0.470 n=6
Parse Time2.01s (± 0.26%)2.02s (± 0.63%)~2.01s2.04sp=0.418 n=6
Bind Time1.00s (± 0.75%)1.00s (± 0.52%)~0.99s1.00sp=0.784 n=6
Check Time6.33s (± 0.39%)6.33s (± 0.36%)~6.30s6.36sp=0.565 n=6
Emit Time3.59s (± 0.35%)3.60s (± 0.42%)~3.57s3.61sp=0.314 n=6
Total Time12.93s (± 0.16%)12.94s (± 0.22%)~12.91s12.99sp=0.808 n=6
material-ui - node (v18.15.0, x64)
Memory used511,294k (± 0.00%)511,289k (± 0.01%)~511,256k511,328kp=0.575 n=6
Parse Time2.65s (± 0.65%)2.65s (± 0.31%)~2.64s2.66sp=0.677 n=6
Bind Time1.00s (± 0.63%)1.00s (± 0.41%)~0.99s1.00sp=0.673 n=6
Check Time17.28s (± 0.50%)17.23s (± 0.43%)~17.15s17.33sp=0.467 n=6
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)~0.00s0.00sp=1.000 n=6
Total Time20.92s (± 0.41%)20.89s (± 0.38%)~20.80s20.99sp=0.688 n=6
mui-docs - node (v18.15.0, x64)
Memory used1,695,954k (± 0.00%)1,695,931k (± 0.00%)~1,695,877k1,695,969kp=0.336 n=6
Parse Time6.53s (± 0.28%)6.53s (± 0.53%)~6.50s6.58sp=1.000 n=6
Bind Time2.35s (± 0.32%)2.35s (± 0.50%)~2.34s2.37sp=0.933 n=6
Check Time55.32s (± 0.37%)55.20s (± 0.43%)~54.74s55.43sp=0.378 n=6
Emit Time0.16s (± 0.00%)0.16s (± 0.00%)~0.16s0.16sp=1.000 n=6
Total Time64.37s (± 0.31%)64.25s (± 0.36%)~63.79s64.44sp=0.423 n=6
self-build-src - node (v18.15.0, x64)
Memory used2,413,055k (± 0.02%)2,412,646k (± 0.02%)~2,412,069k2,413,100kp=0.298 n=6
Parse Time4.94s (± 1.07%)4.94s (± 0.85%)~4.90s5.00sp=0.936 n=6
Bind Time1.86s (± 0.22%)1.88s (± 0.94%)+0.01s (+ 0.72%)1.86s1.91sp=0.033 n=6
Check Time33.21s (± 0.22%)33.37s (± 0.21%)+0.16s (+ 0.47%)33.29s33.47sp=0.013 n=6
Emit Time2.68s (± 0.84%)2.70s (± 1.23%)~2.66s2.75sp=0.572 n=6
Total Time42.74s (± 0.29%)42.91s (± 0.24%)~42.73s43.03sp=0.066 n=6
self-compiler - node (v18.15.0, x64)
Memory used419,689k (± 0.01%)419,692k (± 0.01%)~419,606k419,744kp=0.378 n=6
Parse Time2.78s (± 2.86%)2.81s (± 2.62%)~2.66s2.86sp=0.572 n=6
Bind Time1.12s (± 6.46%)1.10s (± 5.39%)~1.07s1.22sp=0.737 n=6
Check Time15.12s (± 0.39%)15.07s (± 0.30%)~15.01s15.13sp=0.148 n=6
Emit Time1.16s (± 1.52%)1.15s (± 1.28%)~1.13s1.17sp=0.803 n=6
Total Time20.18s (± 0.31%)20.13s (± 0.38%)~20.02s20.22sp=0.296 n=6
vscode - node (v18.15.0, x64)
Memory used2,807,337k (± 0.00%)2,807,306k (± 0.00%)~2,807,247k2,807,370kp=0.471 n=6
Parse Time10.62s (± 0.25%)10.61s (± 0.44%)~10.55s10.66sp=1.000 n=6
Bind Time3.38s (± 0.29%)3.38s (± 0.35%)~3.37s3.40sp=0.673 n=6
Check Time59.62s (± 0.21%)59.52s (± 0.33%)~59.26s59.83sp=0.378 n=6
Emit Time16.14s (± 0.46%)16.11s (± 0.49%)~15.99s16.22sp=0.419 n=6
Total Time89.77s (± 0.17%)89.62s (± 0.18%)~89.36s89.79sp=0.173 n=6
webpack - node (v18.15.0, x64)
Memory used392,384k (± 0.02%)392,357k (± 0.01%)~392,300k392,415kp=0.810 n=6
Parse Time3.05s (± 0.64%)3.07s (± 0.78%)~3.05s3.11sp=0.184 n=6
Bind Time1.40s (± 0.58%)1.39s (± 0.75%)~1.38s1.41sp=0.180 n=6
Check Time13.97s (± 0.40%)14.01s (± 0.40%)~13.95s14.10sp=0.173 n=6
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)~0.00s0.00sp=1.000 n=6
Total Time18.42s (± 0.36%)18.48s (± 0.37%)~18.39s18.56sp=0.227 n=6
xstate - node (v18.15.0, x64)
Memory used513,408k (± 0.01%)513,401k (± 0.02%)~513,296k513,495kp=0.936 n=6
Parse Time3.29s (± 0.36%)3.27s (± 0.30%)-0.02s (- 0.51%)3.26s3.28sp=0.040 n=6
Bind Time1.54s (± 0.26%)1.54s (± 0.27%)~1.53s1.54sp=0.218 n=6
Check Time2.85s (± 0.59%)2.85s (± 0.65%)~2.83s2.87sp=0.684 n=6
Emit Time0.08s (± 4.99%)0.08s (± 6.19%)~0.08s0.09sp=0.595 n=6
Total Time7.76s (± 0.18%)7.74s (± 0.27%)~7.71s7.77sp=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)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

tsserver

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Compiler-UnionsTSServer - node (v18.15.0, x64)
Req 1 - updateOpen2,357ms (± 0.70%)2,338ms (± 0.62%)~2,325ms2,364msp=0.093 n=6
Req 2 - geterr5,514ms (± 1.38%)5,554ms (± 1.39%)~5,450ms5,620msp=0.689 n=6
Req 3 - references323ms (± 1.14%)325ms (± 1.02%)~321ms329msp=0.223 n=6
Req 4 - navto276ms (± 1.06%)273ms (± 1.72%)~270ms280msp=0.503 n=6
Req 5 - completionInfo count1,356 (± 0.00%)1,356 (± 0.00%)~1,3561,356p=1.000 n=6
Req 5 - completionInfo88ms (± 4.92%)89ms (± 7.57%)~78ms95msp=0.511 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen2,482ms (± 0.93%)2,478ms (± 1.07%)~2,445ms2,516msp=0.688 n=6
Req 2 - geterr4,185ms (± 2.17%)4,185ms (± 2.15%)~4,091ms4,277msp=0.936 n=6
Req 3 - references337ms (± 1.52%)334ms (± 1.46%)~327ms341msp=0.225 n=6
Req 4 - navto285ms (± 0.34%)285ms (± 0.58%)~283ms287msp=0.557 n=6
Req 5 - completionInfo count1,518 (± 0.00%)1,518 (± 0.00%)~1,5181,518p=1.000 n=6
Req 5 - completionInfo84ms (± 8.25%)81ms (± 9.55%)~74ms91msp=0.627 n=6
xstateTSServer - node (v18.15.0, x64)
Req 1 - updateOpen2,613ms (± 0.40%)2,615ms (± 0.48%)~2,596ms2,633msp=1.000 n=6
Req 2 - geterr1,719ms (± 2.92%)1,733ms (± 2.10%)~1,692ms1,776msp=0.689 n=6
Req 3 - references120ms (± 8.75%)120ms (± 8.62%)~106ms128msp=0.742 n=6
Req 4 - navto370ms (± 0.96%)370ms (± 0.74%)~365ms373msp=0.808 n=6
Req 5 - completionInfo count2,078 (± 0.00%)2,078 (± 0.00%)~2,0782,078p=1.000 n=6
Req 5 - completionInfo311ms (± 1.92%)308ms (± 1.26%)~305ms315msp=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)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

startup

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
tsc-startup - node (v18.15.0, x64)
Execution time154.12ms (± 0.23%)153.91ms (± 0.19%)-0.21ms (- 0.14%)152.81ms156.87msp=0.000 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time229.90ms (± 0.16%)229.70ms (± 0.17%)-0.20ms (- 0.09%)228.13ms235.47msp=0.000 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time231.44ms (± 0.18%)231.35ms (± 0.18%)-0.09ms (- 0.04%)229.84ms237.42msp=0.008 n=600
typescript-startup - node (v18.15.0, x64)
Execution time231.24ms (± 0.22%)231.08ms (± 0.17%)-0.17ms (- 0.07%)229.49ms234.72msp=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)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Developer Information:

Download Benchmarks

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@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
Copy Markdown
Contributor

Jake Bailey (@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
Copy Markdown
Member

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

@jakebailey
Jake Bailey (jakebailey) merged commit 4282067 into microsoft:mainJan 19, 2024
@timocov
Evgeniy Timokhov (timocov) deleted the expose-resolveName-api branch January 20, 2024 00:22
Evgeniy Timokhov (timocov) added a commit to timocov/dts-bundle-generator that referenced this pull request Jan 20, 2024
@microsoftMicrosoft (microsoft) locked as resolved and limited conversation to collaborators Oct 16, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

For Uncommitted BugPR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@timocov@typescript-bot@andrewbranch@jakebailey@rbuckton