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

[Interactive inlay hints] Get source file from parameter node #55476

Merged
merged 4 commits into from
Aug 23, 2023

Conversation

MariaSolOs
Copy link
Contributor

Fixes #55474

@typescript-bot typescript-bot added the For Milestone Bug PRs that fix a bug with a specific milestone label Aug 23, 2023
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.

Looks good, but you need a test case.

src/server/session.ts Outdated Show resolved Hide resolved
@MariaSolOs
Copy link
Contributor Author

Looks good, but you need a test case.

Yep, I was going to publish it once I added that.

@MariaSolOs MariaSolOs marked this pull request as ready for review August 23, 2023 01:14
verify.baselineInlayHints(undefined, {
includeInlayParameterNameHints: "all",
interactiveInlayHints: true
})
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
})
});

Copy link
Member

Choose a reason for hiding this comment

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

image

@DanielRosenwasser
Copy link
Member

@typescript-bot pack this
@typescript-bot user test tsserver
@typescript-bot test tsserver top100
@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 23, 2023

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 23, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 23, 2023

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 23, 2023

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

@DanielRosenwasser
Copy link
Member

@typescript-bot cherry-pick this to release-5.2 and LKG

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 23, 2023

Heya @DanielRosenwasser, I've started to run the task to cherry-pick this into release-5.2 on this PR at 647dc07. You can monitor the build here.

@DanielRosenwasser DanielRosenwasser merged commit 5fe88ea into microsoft:main Aug 23, 2023
19 checks passed
@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 23, 2023

Hey @DanielRosenwasser, 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/156871/artifacts?artifactName=tgz&fileId=EC7F3FA79042593271D240E9305343171AE453E67B66D470F86070A65BFA282502&fileName=/typescript-5.3.0-insiders.20230823.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.3.0-pr-55476-8".;

@MariaSolOs MariaSolOs deleted the inlay-hints-sourcefile branch August 23, 2023 23:44
@typescript-bot
Copy link
Collaborator

Hey @DanielRosenwasser, I couldn't open a PR with the cherry-pick. (You can check the log here). You may need to squash and pick this PR into release-5.2 manually.

@typescript-bot
Copy link
Collaborator

@DanielRosenwasser
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 (v16.17.1, x64)
Memory used 300,272k (± 0.00%) 300,276k (± 0.01%) ~ 300,253k 300,306k p=0.873 n=6
Parse Time 3.02s (± 0.18%) 3.03s (± 0.13%) ~ 3.02s 3.03s p=0.282 n=6
Bind Time 0.93s (± 0.00%) 0.93s (± 0.00%) ~ 0.93s 0.93s p=1.000 n=6
Check Time 9.30s (± 0.20%) 9.30s (± 0.23%) ~ 9.28s 9.34s p=0.933 n=6
Emit Time 7.62s (± 0.19%) 7.63s (± 0.27%) ~ 7.60s 7.65s p=0.623 n=6
Total Time 20.88s (± 0.09%) 20.89s (± 0.14%) ~ 20.86s 20.94s p=0.511 n=6
Compiler-Unions - node (v16.17.1, x64)
Memory used 193,893k (± 0.01%) 193,878k (± 0.01%) ~ 193,862k 193,903k p=0.128 n=6
Parse Time 1.58s (± 0.26%) 1.58s (± 0.26%) ~ 1.58s 1.59s p=1.000 n=6
Bind Time 0.80s (± 0.00%) 0.80s (± 0.51%) ~ 0.79s 0.80s p=0.405 n=6
Check Time 9.95s (± 0.28%) 9.97s (± 0.27%) ~ 9.92s 9.99s p=0.257 n=6
Emit Time 2.74s (± 0.30%) 2.73s (± 0.36%) ~ 2.72s 2.74s p=0.498 n=6
Total Time 15.06s (± 0.17%) 15.08s (± 0.19%) ~ 15.03s 15.11s p=0.258 n=6
Monaco - node (v16.17.1, x64)
Memory used 347,150k (± 0.01%) 347,153k (± 0.01%) ~ 347,104k 347,173k p=0.471 n=6
Parse Time 2.69s (± 0.33%) 2.69s (± 0.28%) ~ 2.68s 2.70s p=0.798 n=6
Bind Time 0.99s (± 0.00%) 0.99s (± 0.00%) ~ 0.99s 0.99s p=1.000 n=6
Check Time 7.92s (± 0.48%) 7.93s (± 0.43%) ~ 7.89s 7.97s p=1.000 n=6
Emit Time 4.25s (± 0.35%) 4.27s (± 0.39%) +0.02s (+ 0.43%) 4.25s 4.29s p=0.049 n=6
Total Time 15.86s (± 0.30%) 15.88s (± 0.29%) ~ 15.83s 15.93s p=0.571 n=6
TFS - node (v16.17.1, x64)
Memory used 301,157k (± 0.00%) 301,157k (± 0.00%) ~ 301,142k 301,167k p=0.809 n=6
Parse Time 2.18s (± 0.70%) 2.17s (± 0.50%) ~ 2.16s 2.18s p=0.666 n=6
Bind Time 1.11s (± 0.46%) 1.11s (± 0.00%) ~ 1.11s 1.11s p=0.174 n=6
Check Time 7.25s (± 0.45%) 7.25s (± 0.17%) ~ 7.24s 7.27s p=1.000 n=6
Emit Time 3.98s (± 0.43%) 3.97s (± 0.26%) ~ 3.96s 3.99s p=0.410 n=6
Total Time 14.52s (± 0.21%) 14.51s (± 0.10%) ~ 14.49s 14.53s p=1.000 n=6
material-ui - node (v16.17.1, x64)
Memory used 479,414k (± 0.00%) 479,413k (± 0.00%) ~ 479,395k 479,434k p=0.810 n=6
Parse Time 3.15s (± 0.13%) 3.15s (± 0.24%) ~ 3.14s 3.16s p=1.000 n=6
Bind Time 0.91s (± 0.00%) 0.91s (± 0.00%) ~ 0.91s 0.91s p=1.000 n=6
Check Time 17.79s (± 0.32%) 17.81s (± 0.46%) ~ 17.71s 17.91s p=0.810 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 21.85s (± 0.27%) 21.87s (± 0.39%) ~ 21.77s 21.97s p=0.873 n=6
xstate - node (v16.17.1, x64)
Memory used 542,863k (± 0.01%) 542,841k (± 0.01%) ~ 542,800k 542,907k p=0.378 n=6
Parse Time 3.70s (± 0.11%) 3.70s (± 0.33%) ~ 3.69s 3.72s p=0.285 n=6
Bind Time 1.38s (± 4.42%) 1.40s (± 4.83%) ~ 1.33s 1.46s p=0.553 n=6
Check Time 3.29s (± 2.84%) 3.25s (± 2.70%) ~ 3.17s 3.34s p=0.515 n=6
Emit Time 0.08s (± 0.00%) 0.08s (± 0.00%) ~ 0.08s 0.08s p=1.000 n=6
Total Time 8.44s (± 0.36%) 8.44s (± 0.36%) ~ 8.40s 8.47s p=0.936 n=6
System info unknown
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 pr 6
Baseline baseline 6

tsserver

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-UnionsTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,493ms (± 0.15%) 2,491ms (± 0.10%) ~ 2,488ms 2,495ms p=0.570 n=6
Req 2 - geterr 5,965ms (± 0.48%) 5,945ms (± 0.38%) ~ 5,928ms 5,988ms p=0.126 n=6
Req 3 - references 342ms (± 0.12%) 342ms (± 0.30%) ~ 341ms 344ms p=0.924 n=6
Req 4 - navto 278ms (± 0.44%) 277ms (± 0.29%) ~ 276ms 278ms p=0.177 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 84ms (± 8.89%) 84ms (± 8.17%) ~ 76ms 93ms p=0.935 n=6
CompilerTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,621ms (± 0.52%) 2,629ms (± 0.92%) ~ 2,600ms 2,663ms p=0.575 n=6
Req 2 - geterr 4,772ms (± 0.25%) 4,764ms (± 0.16%) ~ 4,755ms 4,776ms p=0.229 n=6
Req 3 - references 350ms (± 0.29%) 350ms (± 0.21%) ~ 349ms 351ms p=0.437 n=6
Req 4 - navto 270ms (± 0.39%) 270ms (± 0.20%) ~ 269ms 270ms p=1.000 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 79ms (± 0.00%) 79ms (± 0.65%) ~ 79ms 80ms p=0.174 n=6
xstateTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,713ms (± 0.19%) 2,717ms (± 0.06%) ~ 2,715ms 2,719ms p=0.170 n=6
Req 2 - geterr 1,948ms (± 1.75%) 1,944ms (± 1.39%) ~ 1,901ms 1,974ms p=0.872 n=6
Req 3 - references 138ms (± 2.70%) 134ms (± 1.46%) ~ 131ms 137ms p=0.218 n=6
Req 4 - navto 353ms (± 0.42%) 353ms (± 0.23%) ~ 352ms 354ms p=0.508 n=6
Req 5 - completionInfo count 2,071 (± 0.00%) 2,071 (± 0.00%) ~ 2,071 2,071 p=1.000 n=6
Req 5 - completionInfo 313ms (± 1.56%) 311ms (± 0.32%) ~ 310ms 313ms p=0.868 n=6
System info unknown
Hosts
  • node (v16.17.1, x64)
Scenarios
  • CompilerTSServer - node (v16.17.1, x64)
  • Compiler-UnionsTSServer - node (v16.17.1, x64)
  • xstateTSServer - node (v16.17.1, 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 (v16.17.1, x64)
Execution time 155.63ms (± 0.15%) 155.52ms (± 0.16%) -0.11ms (- 0.07%) 154.53ms 158.24ms p=0.000 n=600
tsserver-startup - node (v16.17.1, x64)
Execution time 230.20ms (± 0.12%) 230.91ms (± 0.14%) +0.71ms (+ 0.31%) 229.37ms 237.31ms p=0.000 n=600
tsserverlibrary-startup - node (v16.17.1, x64)
Execution time 234.93ms (± 0.14%) 236.12ms (± 0.12%) +1.19ms (+ 0.50%) 235.06ms 242.41ms p=0.000 n=600
typescript-startup - node (v16.17.1, x64)
Execution time 236.02ms (± 0.19%) 235.85ms (± 0.19%) -0.17ms (- 0.07%) 234.56ms 251.31ms p=0.000 n=600
System info unknown
Hosts
  • node (v16.17.1, x64)
Scenarios
  • tsc-startup - node (v16.17.1, x64)
  • tsserver-startup - node (v16.17.1, x64)
  • tsserverlibrary-startup - node (v16.17.1, x64)
  • typescript-startup - node (v16.17.1, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

DanielRosenwasser added a commit that referenced this pull request Aug 24, 2023
…and LKG (#55487)

Co-authored-by: Maria José Solano <majosolano99@gmail.com>
snovader pushed a commit to mestro-se/TypeScript that referenced this pull request Sep 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

Clickable inlay hints don't work correctly across files
3 participants