Skip to content

Remove CheckMode.IsForStringLiteralArgumentCompletions - #55867

Merged
Daniel Rosenwasser (DanielRosenwasser) merged 1 commit into
microsoft:mainfrom
Andarist:get-rid-off-for-string-literal-arg-completions
Sep 29, 2023
Merged

Remove CheckMode.IsForStringLiteralArgumentCompletions#55867
Daniel Rosenwasser (DanielRosenwasser) merged 1 commit into
microsoft:mainfrom
Andarist:get-rid-off-for-string-literal-arg-completions

Conversation

@Andarist

Copy link
Copy Markdown
Contributor

It's just an internal refactor.

I initially removed this special check mode almost entirely in #53996 . It was brought up in #54121 . I managed to remove it while reviewing this PR (see here) but I concluded then that this change should be proposed as a follow up - so here it is :)

@typescript-botTypeScript Bot (typescript-bot) added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Sep 25, 2023
@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.

//// const nestedExpression = parse({ prop: "foo|/*ts2*/" })

verify.completions({ marker: ["ts", "ts2"], exact: ["foo|foo", "foo|bar", "foo|baz"] });
verify.completions({ marker: ["ts"], exact: ["foo", "bar", "baz", "foo|foo", "foo|bar", "foo|baz"] });

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

This matches Ron's initial expectations from #54121 .

The other case, ideally, should provide the same completions but currently, the ones based on the contextual types and the ones based on getCandidateSignaturesForStringLiteralCompletions work quite differently (and even more so with changes from #54121 ). I plan to close the gap between both a little bit but I'm leaving that for future PRs.

@jakebaileyJake Bailey (jakebailey) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seems good to me as a cleanup; I the fewer check modes the better 😄

@DanielRosenwasser

Copy link
Copy Markdown
Member

@typescript-bot

TypeScript Bot (typescript-bot) commented Sep 29, 2023

Copy link
Copy Markdown
Contributor

Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the tarball bundle task on this PR at d1477e0. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented Sep 29, 2023

Copy link
Copy Markdown
Contributor

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

Update: The results are in!

@typescript-bot

TypeScript Bot (typescript-bot) commented Sep 29, 2023

Copy link
Copy Markdown
Contributor

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

Update: The results are in!

@typescript-bot

TypeScript Bot (typescript-bot) commented Sep 29, 2023

Copy link
Copy Markdown
Contributor

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

Update: The results are in!

@typescript-bot

TypeScript Bot (typescript-bot) commented Sep 29, 2023

Copy link
Copy Markdown
Contributor

Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the regular perf test suite on this PR at d1477e0. You can monitor the build here.

Update: The results are in!

@typescript-bot

TypeScript Bot (typescript-bot) commented Sep 29, 2023

Copy link
Copy Markdown
Contributor

Hey Daniel Rosenwasser (@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/158016/artifacts?artifactName=tgz&fileId=702CF64F8B3FD4165BC45D1E0BFDFF9180E3E10721483ECE39D2EE338AB3500102&fileName=/typescript-5.3.0-insiders.20230929.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-55867-7".;

@typescript-bot

Copy link
Copy Markdown
Contributor

Daniel Rosenwasser (@DanielRosenwasser) Here are the results of running the user test suite comparing main and refs/pull/55867/merge:

Everything looks good!

@typescript-bot

Copy link
Copy Markdown
Contributor

Daniel Rosenwasser (@DanielRosenwasser)
The results of the perf run you requested are in!

Here they are:

Compiler

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Angular - node (v18.15.0, x64)
Memory used295,080k (± 0.01%)295,082k (± 0.01%)~295,043k295,158kp=0.810 n=6
Parse Time2.64s (± 0.52%)2.63s (± 0.62%)~2.61s2.65sp=0.324 n=6
Bind Time0.84s (± 1.06%)0.84s (± 0.97%)~0.83s0.85sp=0.550 n=6
Check Time8.08s (± 0.13%)8.05s (± 0.29%)~8.03s8.08sp=0.120 n=6
Emit Time7.04s (± 0.22%)7.05s (± 0.33%)~7.02s7.08sp=0.223 n=6
Total Time18.59s (± 0.12%)18.58s (± 0.22%)~18.53s18.64sp=0.421 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used193,638k (± 1.67%)191,651k (± 1.24%)~190,628k196,506kp=0.336 n=6
Parse Time1.35s (± 1.40%)1.35s (± 1.09%)~1.34s1.38sp=1.000 n=6
Bind Time0.73s (± 0.00%)0.73s (± 0.00%)~0.73s0.73sp=1.000 n=6
Check Time9.19s (± 0.84%)9.15s (± 0.27%)~9.12s9.19sp=0.295 n=6
Emit Time2.64s (± 0.81%)2.63s (± 0.51%)~2.61s2.65sp=0.279 n=6
Total Time13.92s (± 0.51%)13.86s (± 0.23%)~13.82s13.90sp=0.147 n=6
Monaco - node (v18.15.0, x64)
Memory used347,306k (± 0.00%)347,296k (± 0.01%)~347,259k347,312kp=0.296 n=6
Parse Time2.46s (± 0.70%)2.46s (± 0.66%)~2.44s2.48sp=0.625 n=6
Bind Time0.94s (± 0.43%)0.94s (± 0.00%)~0.94s0.94sp=0.405 n=6
Check Time6.92s (± 0.51%)6.90s (± 0.42%)~6.86s6.94sp=0.626 n=6
Emit Time4.02s (± 0.30%)4.02s (± 0.49%)~3.98s4.03sp=0.737 n=6
Total Time14.33s (± 0.29%)14.32s (± 0.26%)~14.29s14.39sp=0.743 n=6
TFS - node (v18.15.0, x64)
Memory used302,587k (± 0.02%)302,538k (± 0.01%)~302,513k302,560kp=0.092 n=6
Parse Time1.98s (± 0.26%)2.00s (± 0.69%)+0.02s (+ 1.09%)1.99s2.02sp=0.010 n=6
Bind Time1.01s (± 1.15%)1.00s (± 1.03%)~0.99s1.02sp=0.241 n=6
Check Time6.24s (± 0.30%)6.25s (± 0.38%)~6.21s6.28sp=0.418 n=6
Emit Time3.57s (± 0.35%)3.56s (± 0.58%)~3.54s3.60sp=0.622 n=6
Total Time12.81s (± 0.20%)12.83s (± 0.30%)~12.80s12.90sp=1.000 n=6
material-ui - node (v18.15.0, x64)
Memory used470,495k (± 0.00%)470,491k (± 0.01%)~470,458k470,524kp=0.378 n=6
Parse Time2.58s (± 0.47%)2.57s (± 0.20%)~2.57s2.58sp=0.923 n=6
Bind Time1.00s (± 1.04%)1.00s (± 1.38%)~0.98s1.02sp=0.618 n=6
Check Time16.67s (± 0.52%)16.61s (± 0.70%)~16.43s16.76sp=0.470 n=6
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)~0.00s0.00sp=1.000 n=6
Total Time20.25s (± 0.49%)20.18s (± 0.59%)~20.00s20.32sp=0.378 n=6
xstate - node (v18.15.0, x64)
Memory used512,610k (± 0.01%)512,601k (± 0.01%)~512,539k512,645kp=0.873 n=6
Parse Time3.27s (± 0.42%)3.27s (± 0.36%)~3.25s3.28sp=0.383 n=6
Bind Time1.55s (± 0.26%)1.55s (± 0.53%)~1.55s1.57sp=0.218 n=6
Check Time2.87s (± 1.09%)2.86s (± 0.58%)~2.84s2.88sp=0.332 n=6
Emit Time0.08s (± 0.00%)0.08s (± 5.21%)~0.07s0.08sp=0.405 n=6
Total Time7.76s (± 0.37%)7.76s (± 0.30%)~7.72s7.78sp=1.000 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)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

tsserver

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Compiler-UnionsTSServer - node (v18.15.0, x64)
Req 1 - updateOpen2,383ms (± 1.10%)2,386ms (± 1.43%)~2,342ms2,419msp=0.575 n=6
Req 2 - geterr5,330ms (± 1.39%)5,351ms (± 1.62%)~5,273ms5,466msp=1.000 n=6
Req 3 - references330ms (± 1.62%)328ms (± 0.71%)~326ms332msp=0.627 n=6
Req 4 - navto277ms (± 0.62%)277ms (± 0.63%)~274ms278msp=0.934 n=6
Req 5 - completionInfo count1,356 (± 0.00%)1,356 (± 0.00%)~1,3561,356p=1.000 n=6
Req 5 - completionInfo77ms (± 8.16%)80ms (± 9.33%)~75ms90msp=0.111 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen2,473ms (± 1.23%)2,456ms (± 1.03%)~2,423ms2,487msp=0.298 n=6
Req 2 - geterr4,112ms (± 1.64%)4,190ms (± 1.47%)+78ms (+ 1.89%)4,065ms4,222msp=0.031 n=6
Req 3 - references336ms (± 1.23%)334ms (± 0.51%)~332ms337msp=0.511 n=6
Req 4 - navto283ms (± 0.18%)284ms (± 0.29%)~283ms285msp=0.523 n=6
Req 5 - completionInfo count1,518 (± 0.00%)1,518 (± 0.00%)~1,5181,518p=1.000 n=6
Req 5 - completionInfo78ms (± 5.90%)76ms (± 0.68%)~75ms76msp=0.386 n=6
xstateTSServer - node (v18.15.0, x64)
Req 1 - updateOpen2,590ms (± 0.60%)2,592ms (± 0.74%)~2,561ms2,614msp=0.810 n=6
Req 2 - geterr1,704ms (± 2.65%)1,693ms (± 1.95%)~1,660ms1,737msp=0.630 n=6
Req 3 - references113ms (± 9.00%)110ms (± 6.94%)~105ms124msp=0.870 n=6
Req 4 - navto360ms (± 0.23%)359ms (± 0.14%)-2ms (- 0.46%)358ms359msp=0.009 n=6
Req 5 - completionInfo count2,071 (± 0.00%)2,071 (± 0.00%)~2,0712,071p=1.000 n=6
Req 5 - completionInfo304ms (± 1.86%)306ms (± 2.00%)~295ms314msp=0.685 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 time152.42ms (± 0.19%)152.28ms (± 0.18%)-0.14ms (- 0.09%)151.13ms155.03msp=0.000 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time227.30ms (± 0.14%)227.24ms (± 0.16%)-0.06ms (- 0.02%)225.93ms232.82msp=0.013 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time228.85ms (± 0.16%)228.99ms (± 0.17%)+0.14ms (+ 0.06%)227.03ms234.74msp=0.002 n=600
typescript-startup - node (v18.15.0, x64)
Execution time228.53ms (± 0.17%)228.50ms (± 0.17%)~227.02ms235.86msp=0.407 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

Daniel Rosenwasser (@DanielRosenwasser) Here are the results of running the top-repos suite comparing main and refs/pull/55867/merge:

Everything looks good!

1 similar comment
@typescript-bot

Copy link
Copy Markdown
Contributor

Daniel Rosenwasser (@DanielRosenwasser) Here are the results of running the top-repos suite comparing main and refs/pull/55867/merge:

Everything looks good!

@microsoftMicrosoft (microsoft) locked as resolved and limited conversation to collaborators Oct 22, 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.

4 participants

@Andarist@typescript-bot@DanielRosenwasser@jakebailey