Skip to content

Consistently use '...args' for diagnostic args #53193

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 12 commits into from
Mar 20, 2023

Conversation

jakebailey
Copy link
Member

I noticed this was inconsistent and somewhat annoying when I was working on the deprecation errors. I had to make a lot of changes to add a single arg, when the actual core infrastructure for diagnostics supports arbitrary arguments.

Along the way, this shows that we have accidentally been using escaped names in some error messages because some of these functions had their args typed as any.

But, no changes to any baselines.

Hopefully this isn't any slower given the bottommost level of this chain already uses variadic args.

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Mar 10, 2023
@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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 10, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 10, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 10, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 10, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 10, 2023

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

@@ -9118,7 +9119,7 @@ namespace Parser {

function parseReturnTag(start: number, tagName: Identifier, indent: number, indentText: string): JSDocReturnTag {
if (some(tags, isJSDocReturnTag)) {
parseErrorAt(tagName.pos, scanner.getTokenStart(), Diagnostics._0_tag_already_specified, tagName.escapedText);
parseErrorAt(tagName.pos, scanner.getTokenStart(), Diagnostics._0_tag_already_specified, unescapeLeadingUnderscores(tagName.escapedText));
Copy link
Member Author

Choose a reason for hiding this comment

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

Here's one example of accidentally using an escaped name in an error message.

Copy link
Member

Choose a reason for hiding this comment

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

True - though it's always going to be the text return anyhow.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is probably a bad example, yeah, it's just the first one shown in the unhidden diff.

@typescript-bot
Copy link
Collaborator

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

Everything looks good!

@typescript-bot
Copy link
Collaborator

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

Everything looks good!

@typescript-bot
Copy link
Collaborator

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

Branch only errors:

Package: dom-mediacapture-transform
Error:

Error: Errors in typescript@local for external dependencies:
../dom-webcodecs/webcodecs.generated.d.ts(132,5): error TS2687: All declarations of 'config' must have identical modifiers.
../dom-webcodecs/webcodecs.generated.d.ts(132,5): error TS2717: Subsequent property declarations must have the same type.  Property 'config' must be of type 'VideoDecoderConfig | undefined', but here has type 'VideoDecoderConfig'.
../dom-webcodecs/webcodecs.generated.d.ts(133,5): error TS2687: All declarations of 'supported' must have identical modifiers.
../dom-webcodecs/webcodecs.generated.d.ts(133,5): error TS2717: Subsequent property declarations must have the same type.  Property 'supported' must be of type 'boolean | undefined', but here has type 'boolean'.
../dom-webcodecs/webcodecs.generated.d.ts(153,5): error TS2717: Subsequent property declarations must have the same type.  Property 'keyFrame' must be of type 'boolean | undefined', but here has type 'boolean | null | undefined'.
../dom-webcodecs/webcodecs.generated.d.ts(162,5): error TS2687: All declarations of 'config' must have identical modifiers.
../dom-webcodecs/webcodecs.generated.d.ts(162,5): error TS2717: Subsequent property declarations must have the same type.  Property 'config' must be of type 'VideoEncoderConfig | undefined', but here has type 'VideoEncoderConfig'.
../dom-webcodecs/webcodecs.generated.d.ts(163,5): error TS2687: All declarations of 'supported' must have identical modifiers.
../dom-webcodecs/webcodecs.generated.d.ts(163,5): error TS2717: Subsequent property declarations must have the same type.  Property 'supported' must be of type 'boolean | undefined', but here has type 'boolean'.
../dom-webcodecs/webcodecs.generated.d.ts(369,14): error TS2717: Subsequent property declarations must have the same type.  Property 'timestamp' must be of type 'number', but here has type 'number | null'.
../dom-webcodecs/webcodecs.generated.d.ts(404,6): error TS2300: Duplicate identifier 'BitrateMode'.
../dom-webcodecs/webcodecs.generated.d.ts(406,6): error TS2300: Duplicate identifier 'AlphaOption'.
../dom-webcodecs/webcodecs.generated.d.ts(408,6): error TS2300: Duplicate identifier 'AvcBitstreamFormat'.
../dom-webcodecs/webcodecs.generated.d.ts(409,6): error TS2300: Duplicate identifier 'CodecState'.
../dom-webcodecs/webcodecs.generated.d.ts(411,6): error TS2300: Duplicate identifier 'EncodedVideoChunkType'.
../dom-webcodecs/webcodecs.generated.d.ts(413,6): error TS2300: Duplicate identifier 'LatencyMode'.
../dom-webcodecs/webcodecs.generated.d.ts(416,6): error TS2300: Duplicate identifier 'VideoPixelFormat'.
../../../../../../built/local/lib.dom.d.ts(2010,5): error TS2687: All declarations of 'config' must have identical modifiers.
../../../../../../built/local/lib.dom.d.ts(2011,5): error TS2687: All declarations of 'supported' must have identical modifiers.
../../../../../../built/local/lib.dom.d.ts(2040,5): error TS2687: All declarations of 'config' must have identical modifiers.
../../../../../../built/local/lib.dom.d.ts(2041,5): error TS2687: All declarations of 'supported' must have identical modifiers.
../../../../../../built/local/lib.dom.d.ts(19284,6): error TS2300: Duplicate identifier 'AlphaOption'.
../../../../../../built/local/lib.dom.d.ts(19295,6): error TS2300: Duplicate identifier 'AvcBitstreamFormat'.
../../../../../../built/local/lib.dom.d.ts(19298,6): error TS2300: Duplicate identifier 'BitrateMode'.
../../../../../../built/local/lib.dom.d.ts(19315,6): error TS2300: Duplicate identifier 'CodecState'.
../../../../../../built/local/lib.dom.d.ts(19327,6): error TS2300: Duplicate identifier 'EncodedVideoChunkType'.
../../../../../../built/local/lib.dom.d.ts(19354,6): error TS2300: Duplicate identifier 'LatencyMode'.
../../../../../../built/local/lib.dom.d.ts(19448,6): error TS2300: Duplicate identifier 'VideoPixelFormat'.

    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)

Package: dom-screen-wake-lock
Error:

Error: Errors in typescript@local for external dependencies:
../../../../../../built/local/lib.dom.d.ts(19450,6): error TS2300: Duplicate identifier 'WakeLockType'.

    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)

Package: web-animations-js
Error:

Error: /home/vsts/work/1/s/DefinitelyTyped-tools/packages/dtslint-runner/DefinitelyTyped/types/web-animations-js/index.d.ts:11:14
ERROR: 11:14  expect  TypeScript@local compile error: 
Subsequent property declarations must have the same type.  Property 'currentTime' must be of type 'CSSNumberish | null', but here has type 'number | null'.
ERROR: 12:14  expect  TypeScript@local compile error: 
Subsequent property declarations must have the same type.  Property 'timelineTime' must be of type 'CSSNumberish | null', but here has type 'number | null'.
ERROR: 23:5   expect  TypeScript@local compile error: 
Subsequent property declarations must have the same type.  Property 'currentTime' must be of type 'CSSNumberish | null | undefined', but here has type 'number | null | undefined'.
ERROR: 24:5   expect  TypeScript@local compile error: 
Subsequent property declarations must have the same type.  Property 'timelineTime' must be of type 'CSSNumberish | null | undefined', but here has type 'number | null | undefined'.
ERROR: 41:14  expect  TypeScript@local compile error: 
Subsequent property declarations must have the same type.  Property 'currentTime' must be of type 'CSSNumberish | null', but here has type 'number | null'.
ERROR: 73:5   expect  TypeScript@local compile error: 
Subsequent property declarations must have the same type.  Property 'currentTime' must be of type 'CSSNumberish | null', but here has type 'number | null'.
ERROR: 79:5   expect  TypeScript@local compile error: 
Subsequent property declarations must have the same type.  Property 'startTime' must be of type 'CSSNumberish | null', but here has type 'number | null'.

    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)

Package: webappsec-credential-management
Error:

Error: /home/vsts/work/1/s/DefinitelyTyped-tools/packages/dtslint-runner/DefinitelyTyped/types/webappsec-credential-management/index.d.ts:309:5
ERROR: 309:5  expect  TypeScript@local compile error: 
Subsequent property declarations must have the same type.  Property 'mediation' must be of type 'CredentialMediationRequirement | undefined', but here has type '"required" | "optional" | "silent" | undefined'.

    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)

Package: dom-webcodecs
Error:

Error: Errors in typescript@local for external dependencies:
../../../../../../built/local/lib.dom.d.ts(2010,5): error TS2687: All declarations of 'config' must have identical modifiers.
../../../../../../built/local/lib.dom.d.ts(2011,5): error TS2687: All declarations of 'supported' must have identical modifiers.
../../../../../../built/local/lib.dom.d.ts(2040,5): error TS2687: All declarations of 'config' must have identical modifiers.
../../../../../../built/local/lib.dom.d.ts(2041,5): error TS2687: All declarations of 'supported' must have identical modifiers.
../../../../../../built/local/lib.dom.d.ts(19284,6): error TS2300: Duplicate identifier 'AlphaOption'.
../../../../../../built/local/lib.dom.d.ts(19295,6): error TS2300: Duplicate identifier 'AvcBitstreamFormat'.
../../../../../../built/local/lib.dom.d.ts(19298,6): error TS2300: Duplicate identifier 'BitrateMode'.
../../../../../../built/local/lib.dom.d.ts(19315,6): error TS2300: Duplicate identifier 'CodecState'.
../../../../../../built/local/lib.dom.d.ts(19327,6): error TS2300: Duplicate identifier 'EncodedVideoChunkType'.
../../../../../../built/local/lib.dom.d.ts(19354,6): error TS2300: Duplicate identifier 'LatencyMode'.
../../../../../../built/local/lib.dom.d.ts(19448,6): error TS2300: Duplicate identifier 'VideoPixelFormat'.

    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)

Package: w3c-css-typed-object-model-level-1
Error:

Error: Errors in typescript@local for external dependencies:
../../../../../../built/local/lib.dom.d.ts(23,1): error TS6200: Definitions of the following identifiers conflict with those in another file: CSSStyleValue, CSSVariableReferenceValue, CSSUnparsedSegment, CSSUnparsedValue, CSSKeywordValue, CSSNumericValue, CSSUnitValue, CSSMathValue, CSSMathSum, CSSMathProduct, CSSMathNegate, CSSMathInvert, CSSMathMin, CSSMathMax, CSSNumericArray, CSSTransformValue, CSSTransformComponent, CSSTranslate, CSSRotate, CSSScale, CSSSkew, CSSSkewX, CSSSkewY, CSSPerspective, CSSMatrixComponent, CSSImageValue, StylePropertyMapReadOnly, StylePropertyMap
../../../../../../built/local/lib.dom.d.ts(177,5): error TS2687: All declarations of 'is2D' must have identical modifiers.
../../../../../../built/local/lib.dom.d.ts(181,5): error TS2687: All declarations of 'angle' must have identical modifiers.
../../../../../../built/local/lib.dom.d.ts(182,5): error TS2687: All declarations of 'flex' must have identical modifiers.
../../../../../../built/local/lib.dom.d.ts(183,5): error TS2687: All declarations of 'frequency' must have identical modifiers.
../../../../../../built/local/lib.dom.d.ts(184,5): error TS2687: All declarations of 'length' must have identical modifiers.
../../../../../../built/local/lib.dom.d.ts(185,5): error TS2687: All declarations of 'percent' must have identical modifiers.
../../../../../../built/local/lib.dom.d.ts(186,5): error TS2687: All declarations of 'percentHint' must have identical modifiers.
../../../../../../built/local/lib.dom.d.ts(187,5): error TS2687: All declarations of 'resolution' must have identical modifiers.
../../../../../../built/local/lib.dom.d.ts(188,5): error TS2687: All declarations of 'time' must have identical modifiers.
../../../../../../built/local/lib.dom.d.ts(19299,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations.
../../../../../../built/local/lib.dom.d.ts(19300,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations.

    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)

Package: use-color-scheme
Error:

Error: /home/vsts/work/1/s/DefinitelyTyped-tools/packages/dtslint-runner/DefinitelyTyped/types/use-color-scheme/use-color-scheme-tests.ts:8:1
ERROR: 8:1  expect  TypeScript@local expected type to be:
  "dark" | "light" | "no-preference"
got:
  "no-preference" | "dark" | "light"

    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)

Package: dom-mediacapture-record
Error:

Error: Errors in typescript@local for external dependencies:
../../../../../../built/local/lib.dom.d.ts(19298,6): error TS2300: Duplicate identifier 'BitrateMode'.

    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)

Package: ramda
Error:

Error: /home/vsts/work/1/s/DefinitelyTyped-tools/packages/dtslint-runner/DefinitelyTyped/types/ramda/test/binary-tests.ts:29:5
ERROR: 29:5  expect  TypeScript@local expected type to be:
  (head: number, head: undefined) => number[]
got:
  (head: number, head_1: undefined) => number[]
ERROR: 30:5  expect  TypeScript@local expected type to be:
  (head: number, head: number) => number[]
got:
  (head: number, head_1: number) => number[]
ERROR: 31:5  expect  TypeScript@local expected type to be:
  (head: number, head: number) => number[]
got:
  (head: number, head_1: number) => number[]

/home/vsts/work/1/s/DefinitelyTyped-tools/packages/dtslint-runner/DefinitelyTyped/types/ramda/test/nAry-tests.ts:22:5
ERROR: 22:5  expect  TypeScript@local expected type to be:
  (head: number, head: undefined) => number[]
got:
  (head: number, head_1: undefined) => number[]

    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.

@typescript-bot
Copy link
Collaborator

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

Here they are:

Compiler

Comparison Report - main..53193
Metric main 53193 Delta Best Worst p-value
Angular - node (v18.10.0, x64)
Memory used 363,459k (± 0.01%) 363,437k (± 0.00%) ~ 363,422k 363,466k p=0.078 n=6
Parse Time 3.37s (± 0.89%) 3.37s (± 0.16%) ~ 3.36s 3.37s p=0.663 n=6
Bind Time 1.12s (± 0.46%) 1.13s (± 0.56%) ~ 1.12s 1.14s p=0.091 n=6
Check Time 8.69s (± 0.27%) 8.65s (± 0.25%) -0.04s (- 0.48%) 8.62s 8.67s p=0.029 n=6
Emit Time 7.43s (± 0.12%) 7.42s (± 0.70%) ~ 7.37s 7.51s p=0.375 n=6
Total Time 20.62s (± 0.19%) 20.57s (± 0.24%) ~ 20.52s 20.66s p=0.066 n=6
Compiler-Unions - node (v18.10.0, x64)
Memory used 192,811k (± 1.50%) 194,878k (± 1.51%) +2,067k (+ 1.07%) 191,065k 196,858k p=0.031 n=6
Parse Time 1.50s (± 1.16%) 1.50s (± 0.34%) ~ 1.50s 1.51s p=0.437 n=6
Bind Time 0.77s (± 1.05%) 0.77s (± 1.09%) ~ 0.76s 0.78s p=0.125 n=6
Check Time 9.43s (± 0.61%) 9.35s (± 0.37%) -0.08s (- 0.83%) 9.31s 9.38s p=0.019 n=6
Emit Time 2.73s (± 1.96%) 2.73s (± 1.05%) ~ 2.70s 2.76s p=0.935 n=6
Total Time 14.44s (± 0.58%) 14.35s (± 0.41%) ~ 14.28s 14.41s p=0.108 n=6
Monaco - node (v18.10.0, x64)
Memory used 347,427k (± 0.01%) 347,463k (± 0.01%) ~ 347,401k 347,508k p=0.054 n=6
Parse Time 2.59s (± 1.19%) 2.59s (± 0.96%) ~ 2.57s 2.64s p=0.935 n=6
Bind Time 1.02s (± 2.03%) 1.01s (± 1.20%) ~ 1.00s 1.03s p=0.219 n=6
Check Time 7.05s (± 0.30%) 7.02s (± 0.30%) -0.03s (- 0.43%) 6.99s 7.05s p=0.043 n=6
Emit Time 4.24s (± 0.75%) 4.23s (± 0.35%) ~ 4.21s 4.25s p=0.629 n=6
Total Time 14.90s (± 0.44%) 14.85s (± 0.14%) ~ 14.82s 14.88s p=0.106 n=6
TFS - node (v18.10.0, x64)
Memory used 300,811k (± 0.01%) 300,792k (± 0.01%) ~ 300,725k 300,838k p=0.810 n=6
Parse Time 2.07s (± 1.35%) 2.06s (± 0.36%) ~ 2.05s 2.07s p=0.558 n=6
Bind Time 1.13s (± 0.46%) 1.14s (± 1.21%) ~ 1.12s 1.16s p=0.928 n=6
Check Time 6.53s (± 0.30%) 6.52s (± 0.36%) ~ 6.49s 6.56s p=1.000 n=6
Emit Time 3.88s (± 0.38%) 3.85s (± 0.46%) -0.03s (- 0.86%) 3.82s 3.86s p=0.015 n=6
Total Time 13.62s (± 0.36%) 13.57s (± 0.17%) -0.05s (- 0.34%) 13.53s 13.60s p=0.044 n=6
material-ui - node (v18.10.0, x64)
Memory used 478,408k (± 0.01%) 478,427k (± 0.01%) ~ 478,396k 478,482k p=0.378 n=6
Parse Time 3.01s (± 2.68%) 2.98s (± 2.66%) ~ 2.91s 3.10s p=0.687 n=6
Bind Time 0.97s (± 7.85%) 1.00s (± 7.94%) ~ 0.90s 1.07s p=0.686 n=6
Check Time 17.15s (± 0.81%) 17.12s (± 0.59%) ~ 17.01s 17.29s p=1.000 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 21.13s (± 0.71%) 21.11s (± 0.44%) ~ 21.02s 21.25s p=1.000 n=6
xstate - node (v18.10.0, x64)
Memory used 553,192k (± 0.02%) 553,157k (± 0.01%) ~ 553,030k 553,207k p=0.810 n=6
Parse Time 3.77s (± 0.56%) 3.77s (± 0.49%) ~ 3.75s 3.80s p=0.935 n=6
Bind Time 1.68s (± 0.45%) 1.68s (± 0.38%) ~ 1.67s 1.69s p=0.718 n=6
Check Time 2.78s (± 0.62%) 2.77s (± 0.59%) ~ 2.74s 2.78s p=0.105 n=6
Emit Time 0.08s (± 0.00%) 0.08s (± 0.00%) ~ 0.08s 0.08s p=1.000 n=6
Total Time 8.31s (± 0.31%) 8.30s (± 0.38%) ~ 8.24s 8.32s p=0.747 n=6
Angular - node (v16.17.1, x64)
Memory used 362,834k (± 0.01%) 362,808k (± 0.00%) -26k (- 0.01%) 362,793k 362,833k p=0.045 n=6
Parse Time 3.52s (± 0.89%) 3.52s (± 1.04%) ~ 3.47s 3.56s p=0.934 n=6
Bind Time 1.18s (± 0.69%) 1.18s (± 0.69%) ~ 1.17s 1.19s p=0.177 n=6
Check Time 9.45s (± 0.48%) 9.43s (± 0.45%) ~ 9.36s 9.48s p=0.809 n=6
Emit Time 7.95s (± 0.46%) 7.91s (± 0.30%) ~ 7.87s 7.93s p=0.061 n=6
Total Time 22.10s (± 0.23%) 22.03s (± 0.15%) -0.07s (- 0.32%) 22.00s 22.09s p=0.024 n=6
Compiler-Unions - node (v16.17.1, x64)
Memory used 192,725k (± 0.03%) 193,223k (± 0.70%) ~ 192,578k 195,990k p=0.810 n=6
Parse Time 1.59s (± 1.01%) 1.59s (± 1.42%) ~ 1.55s 1.61s p=1.000 n=6
Bind Time 0.82s (± 0.77%) 0.82s (± 0.63%) ~ 0.82s 0.83s p=0.386 n=6
Check Time 10.11s (± 0.36%) 10.09s (± 0.59%) ~ 10.03s 10.20s p=0.336 n=6
Emit Time 2.99s (± 0.84%) 3.02s (± 0.85%) +0.03s (+ 1.17%) 2.98s 3.06s p=0.041 n=6
Total Time 15.51s (± 0.28%) 15.52s (± 0.30%) ~ 15.46s 15.60s p=0.935 n=6
Monaco - node (v16.17.1, x64)
Memory used 346,684k (± 0.00%) 346,686k (± 0.00%) ~ 346,665k 346,706k p=0.810 n=6
Parse Time 2.72s (± 0.36%) 2.73s (± 0.51%) ~ 2.71s 2.74s p=0.504 n=6
Bind Time 1.08s (± 0.50%) 1.09s (± 0.69%) ~ 1.08s 1.10s p=0.476 n=6
Check Time 7.74s (± 0.63%) 7.73s (± 0.22%) ~ 7.71s 7.75s p=0.871 n=6
Emit Time 4.45s (± 0.48%) 4.46s (± 0.66%) ~ 4.42s 4.51s p=0.517 n=6
Total Time 15.99s (± 0.45%) 16.00s (± 0.26%) ~ 15.97s 16.07s p=0.514 n=6
TFS - node (v16.17.1, x64)
Memory used 300,146k (± 0.01%) 300,126k (± 0.01%) ~ 300,094k 300,168k p=0.378 n=6
Parse Time 2.17s (± 0.65%) 2.17s (± 0.38%) ~ 2.16s 2.18s p=0.503 n=6
Bind Time 1.23s (± 1.22%) 1.23s (± 1.11%) ~ 1.21s 1.25s p=0.557 n=6
Check Time 7.15s (± 0.34%) 7.17s (± 0.29%) ~ 7.15s 7.21s p=0.145 n=6
Emit Time 4.32s (± 0.54%) 4.33s (± 0.63%) ~ 4.29s 4.37s p=0.413 n=6
Total Time 14.87s (± 0.33%) 14.90s (± 0.22%) ~ 14.86s 14.95s p=0.572 n=6
material-ui - node (v16.17.1, x64)
Memory used 477,749k (± 0.02%) 477,728k (± 0.01%) ~ 477,598k 477,783k p=0.936 n=6
Parse Time 3.22s (± 0.39%) 3.21s (± 1.03%) ~ 3.16s 3.24s p=0.934 n=6
Bind Time 0.96s (± 0.88%) 0.95s (± 0.54%) ~ 0.95s 0.96s p=0.923 n=6
Check Time 18.14s (± 0.60%) 18.13s (± 0.76%) ~ 17.95s 18.28s p=0.936 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 22.31s (± 0.49%) 22.29s (± 0.55%) ~ 22.13s 22.45s p=1.000 n=6
xstate - node (v16.17.1, x64)
Memory used 550,679k (± 0.02%) 550,685k (± 0.02%) ~ 550,580k 550,844k p=1.000 n=6
Parse Time 3.96s (± 0.29%) 3.96s (± 0.41%) ~ 3.94s 3.98s p=0.744 n=6
Bind Time 1.79s (± 0.61%) 1.79s (± 0.42%) ~ 1.78s 1.80s p=1.000 n=6
Check Time 3.00s (± 0.63%) 3.00s (± 0.54%) ~ 2.97s 3.02s p=0.803 n=6
Emit Time 0.09s (± 0.00%) 0.09s (± 0.00%) ~ 0.09s 0.09s p=1.000 n=6
Total Time 8.84s (± 0.31%) 8.84s (± 0.28%) ~ 8.81s 8.87s p=1.000 n=6
Angular - node (v14.15.1, x64)
Memory used 356,643k (± 0.00%) 356,646k (± 0.01%) ~ 356,616k 356,675k p=0.936 n=6
Parse Time 3.57s (± 0.25%) 3.57s (± 0.55%) ~ 3.55s 3.60s p=0.458 n=6
Bind Time 1.24s (± 0.33%) 1.23s (± 0.51%) -0.01s (- 0.67%) 1.22s 1.24s p=0.033 n=6
Check Time 9.77s (± 0.31%) 9.76s (± 0.19%) ~ 9.74s 9.78s p=0.746 n=6
Emit Time 8.36s (± 0.56%) 8.31s (± 0.44%) ~ 8.27s 8.37s p=0.065 n=6
Total Time 22.94s (± 0.24%) 22.86s (± 0.25%) -0.07s (- 0.32%) 22.81s 22.94s p=0.036 n=6
Compiler-Unions - node (v14.15.1, x64)
Memory used 187,949k (± 0.01%) 187,943k (± 0.01%) ~ 187,925k 187,967k p=0.574 n=6
Parse Time 1.60s (± 0.61%) 1.61s (± 0.51%) ~ 1.60s 1.62s p=0.062 n=6
Bind Time 0.84s (± 0.75%) 0.84s (± 0.00%) ~ 0.84s 0.84s p=1.000 n=6
Check Time 10.16s (± 0.46%) 10.16s (± 0.39%) ~ 10.11s 10.22s p=1.000 n=6
Emit Time 3.13s (± 1.29%) 3.13s (± 0.60%) ~ 3.10s 3.15s p=0.808 n=6
Total Time 15.72s (± 0.48%) 15.74s (± 0.21%) ~ 15.70s 15.78s p=0.748 n=6
Monaco - node (v14.15.1, x64)
Memory used 341,693k (± 0.01%) 341,676k (± 0.01%) ~ 341,631k 341,698k p=0.173 n=6
Parse Time 2.83s (± 0.59%) 2.83s (± 0.37%) ~ 2.81s 2.84s p=0.742 n=6
Bind Time 1.10s (± 0.57%) 1.09s (± 0.47%) ~ 1.09s 1.10s p=0.091 n=6
Check Time 8.17s (± 0.54%) 8.12s (± 0.60%) ~ 8.06s 8.19s p=0.226 n=6
Emit Time 4.70s (± 0.53%) 4.66s (± 0.35%) -0.04s (- 0.74%) 4.64s 4.68s p=0.024 n=6
Total Time 16.80s (± 0.42%) 16.71s (± 0.35%) -0.09s (- 0.55%) 16.62s 16.78s p=0.045 n=6
TFS - node (v14.15.1, x64)
Memory used 295,229k (± 0.00%) 295,232k (± 0.00%) ~ 295,213k 295,243k p=0.574 n=6
Parse Time 2.41s (± 0.41%) 2.39s (± 0.63%) -0.02s (- 0.90%) 2.37s 2.41s p=0.039 n=6
Bind Time 1.07s (± 0.51%) 1.07s (± 0.78%) ~ 1.06s 1.08s p=0.855 n=6
Check Time 7.48s (± 0.36%) 7.49s (± 0.56%) ~ 7.43s 7.53s p=0.468 n=6
Emit Time 4.28s (± 0.40%) 4.31s (± 0.87%) ~ 4.26s 4.35s p=0.294 n=6
Total Time 15.24s (± 0.21%) 15.25s (± 0.39%) ~ 15.15s 15.33s p=0.418 n=6
material-ui - node (v14.15.1, x64)
Memory used 473,296k (± 0.00%) 473,288k (± 0.00%) ~ 473,271k 473,314k p=0.689 n=6
Parse Time 3.34s (± 0.52%) 3.36s (± 0.35%) +0.02s (+ 0.65%) 3.35s 3.38s p=0.042 n=6
Bind Time 1.00s (± 0.51%) 1.00s (± 0.41%) ~ 0.99s 1.00s p=0.114 n=6
Check Time 19.06s (± 0.84%) 18.95s (± 0.19%) ~ 18.90s 18.99s p=0.126 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 23.40s (± 0.70%) 23.31s (± 0.17%) ~ 23.25s 23.34s p=0.227 n=6
xstate - node (v14.15.1, x64)
Memory used 539,298k (± 0.00%) 539,308k (± 0.01%) ~ 539,256k 539,333k p=0.261 n=6
Parse Time 4.18s (± 1.64%) 4.26s (± 0.35%) +0.08s (+ 1.87%) 4.24s 4.27s p=0.023 n=6
Bind Time 1.71s (± 2.51%) 1.68s (± 0.33%) ~ 1.67s 1.68s p=0.510 n=6
Check Time 3.16s (± 0.71%) 3.16s (± 0.42%) ~ 3.14s 3.18s p=0.870 n=6
Emit Time 0.09s (± 0.00%) 0.09s (± 0.00%) ~ 0.09s 0.09s p=1.000 n=6
Total Time 9.13s (± 0.23%) 9.18s (± 0.16%) +0.04s (+ 0.47%) 9.16s 9.19s p=0.013 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 (v18.10.0, x64)
  • node (v16.17.1, x64)
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v18.10.0, x64)
  • Angular - node (v16.17.1, x64)
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v18.10.0, x64)
  • Compiler-Unions - node (v16.17.1, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v18.10.0, x64)
  • Monaco - node (v16.17.1, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v18.10.0, x64)
  • TFS - node (v16.17.1, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v18.10.0, x64)
  • material-ui - node (v16.17.1, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v18.10.0, x64)
  • xstate - node (v16.17.1, x64)
  • xstate - node (v14.15.1, x64)
Benchmark Name Iterations
Current 53193 6
Baseline main 6

TSServer

Comparison Report - main..53193
Metric main 53193 Delta Best Worst p-value
Compiler-UnionsTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,381ms (± 0.62%) 2,390ms (± 0.85%) ~ 2,358ms 2,411ms p=0.336 n=6
Req 2 - geterr 5,347ms (± 1.05%) 5,341ms (± 0.68%) ~ 5,282ms 5,373ms p=1.000 n=6
Req 3 - references 339ms (± 1.31%) 337ms (± 0.36%) ~ 335ms 338ms p=0.464 n=6
Req 4 - navto 281ms (± 0.29%) 280ms (± 0.67%) ~ 277ms 282ms p=0.087 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 82ms (± 2.67%) 82ms (± 8.08%) ~ 72ms 91ms p=0.683 n=6
CompilerTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,522ms (± 1.52%) 2,523ms (± 0.56%) ~ 2,506ms 2,545ms p=0.936 n=6
Req 2 - geterr 4,011ms (± 0.78%) 4,001ms (± 0.30%) ~ 3,984ms 4,012ms p=0.065 n=6
Req 3 - references 350ms (± 1.40%) 351ms (± 0.72%) ~ 347ms 353ms p=1.000 n=6
Req 4 - navto 292ms (± 0.96%) 292ms (± 0.93%) ~ 289ms 296ms p=0.737 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 77ms (±11.20%) 85ms (± 0.99%) +8ms (+ 9.98%) 83ms 85ms p=0.046 n=6
xstateTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 3,053ms (± 0.35%) 3,047ms (± 0.30%) ~ 3,036ms 3,059ms p=0.521 n=6
Req 2 - geterr 1,609ms (± 0.81%) 1,589ms (± 1.30%) -20ms (- 1.24%) 1,568ms 1,627ms p=0.044 n=6
Req 3 - references 109ms (± 2.39%) 109ms (± 0.82%) ~ 108ms 110ms p=0.807 n=6
Req 4 - navto 358ms (± 0.49%) 363ms (± 1.60%) ~ 356ms 373ms p=0.106 n=6
Req 5 - completionInfo count 3,177 (± 0.00%) 3,177 (± 0.00%) ~ 3,177 3,177 p=1.000 n=6
Req 5 - completionInfo 419ms (± 1.60%) 423ms (± 1.51%) ~ 412ms 431ms p=0.168 n=6
Compiler-UnionsTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,508ms (± 0.55%) 2,498ms (± 0.30%) ~ 2,490ms 2,507ms p=0.229 n=6
Req 2 - geterr 5,752ms (± 0.33%) 5,745ms (± 0.62%) ~ 5,695ms 5,779ms p=0.810 n=6
Req 3 - references 346ms (± 0.28%) 346ms (± 0.92%) ~ 342ms 350ms p=0.745 n=6
Req 4 - navto 279ms (± 0.42%) 279ms (± 0.42%) ~ 277ms 280ms p=0.611 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 74ms (± 0.70%) 74ms (± 4.09%) ~ 72ms 80ms p=0.351 n=6
CompilerTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,678ms (± 0.88%) 2,676ms (± 0.66%) ~ 2,662ms 2,706ms p=0.810 n=6
Req 2 - geterr 4,352ms (± 0.41%) 4,348ms (± 0.45%) ~ 4,324ms 4,376ms p=0.810 n=6
Req 3 - references 362ms (± 1.68%) 363ms (± 2.03%) ~ 358ms 378ms p=0.468 n=6
Req 4 - navto 290ms (± 0.69%) 290ms (± 0.57%) ~ 288ms 291ms p=0.666 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 76ms (± 5.80%) 77ms (± 2.64%) ~ 75ms 79ms p=1.000 n=6
xstateTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 3,198ms (± 0.19%) 3,198ms (± 0.11%) ~ 3,193ms 3,203ms p=1.000 n=6
Req 2 - geterr 1,756ms (± 1.17%) 1,744ms (± 0.75%) ~ 1,733ms 1,763ms p=0.517 n=6
Req 3 - references 118ms (± 1.65%) 120ms (± 0.88%) ~ 118ms 121ms p=0.078 n=6
Req 4 - navto 346ms (± 0.64%) 345ms (± 0.56%) ~ 342ms 347ms p=0.683 n=6
Req 5 - completionInfo count 3,177 (± 0.00%) 3,177 (± 0.00%) ~ 3,177 3,177 p=1.000 n=6
Req 5 - completionInfo 431ms (± 0.38%) 432ms (± 0.50%) ~ 429ms 435ms p=0.418 n=6
Compiler-UnionsTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 2,610ms (± 0.65%) 2,605ms (± 0.39%) ~ 2,595ms 2,620ms p=0.687 n=6
Req 2 - geterr 6,153ms (± 0.83%) 6,136ms (± 0.34%) ~ 6,110ms 6,163ms p=0.575 n=6
Req 3 - references 364ms (± 0.77%) 367ms (± 0.45%) ~ 365ms 369ms p=0.052 n=6
Req 4 - navto 284ms (± 1.58%) 281ms (± 0.95%) ~ 277ms 284ms p=0.126 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 93ms (± 5.84%) 92ms (±12.19%) ~ 81ms 103ms p=1.000 n=6
CompilerTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 2,818ms (± 0.34%) 2,815ms (± 0.81%) ~ 2,782ms 2,845ms p=0.936 n=6
Req 2 - geterr 4,500ms (± 2.09%) 4,526ms (± 2.54%) ~ 4,440ms 4,697ms p=0.688 n=6
Req 3 - references 404ms (± 7.53%) 399ms (± 7.54%) ~ 370ms 429ms p=0.332 n=6
Req 4 - navto 292ms (± 0.80%) 288ms (± 1.01%) ~ 284ms 293ms p=0.075 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 89ms (± 7.48%) 90ms (± 9.46%) ~ 81ms 101ms p=0.683 n=6
xstateTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 3,497ms (± 0.29%) 3,494ms (± 0.42%) ~ 3,473ms 3,515ms p=0.689 n=6
Req 2 - geterr 1,834ms (± 0.86%) 1,847ms (± 0.51%) ~ 1,840ms 1,865ms p=0.127 n=6
Req 3 - references 126ms (± 1.72%) 125ms (± 0.60%) ~ 124ms 126ms p=0.858 n=6
Req 4 - navto 368ms (± 0.43%) 367ms (± 0.32%) ~ 366ms 369ms p=0.287 n=6
Req 5 - completionInfo count 3,177 (± 0.00%) 3,177 (± 0.00%) ~ 3,177 3,177 p=1.000 n=6
Req 5 - completionInfo 445ms (± 1.92%) 452ms (± 2.11%) ~ 442ms 463ms p=0.421 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 (v18.10.0, x64)
  • node (v16.17.1, x64)
  • node (v14.15.1, x64)
Scenarios
  • Compiler-UnionsTSServer - node (v18.10.0, x64)
  • Compiler-UnionsTSServer - node (v16.17.1, x64)
  • Compiler-UnionsTSServer - node (v14.15.1, x64)
  • CompilerTSServer - node (v18.10.0, x64)
  • CompilerTSServer - node (v16.17.1, x64)
  • CompilerTSServer - node (v14.15.1, x64)
  • xstateTSServer - node (v18.10.0, x64)
  • xstateTSServer - node (v16.17.1, x64)
  • xstateTSServer - node (v14.15.1, x64)
Benchmark Name Iterations
Current 53193 6
Baseline main 6

Startup

Comparison Report - main..53193
Metric main 53193 Delta Best Worst p-value
tsc-startup - node (v16.17.1, x64)
Execution time 142.22ms (± 0.26%) 141.54ms (± 0.21%) -0.67ms (- 0.47%) 140.90ms 150.04ms p=0.000 n=600
tsserver-startup - node (v16.17.1, x64)
Execution time 228.64ms (± 0.42%) 226.79ms (± 0.13%) -1.85ms (- 0.81%) 225.80ms 230.54ms p=0.000 n=600
tsserverlibrary-startup - node (v16.17.1, x64)
Execution time 231.36ms (± 0.38%) 228.75ms (± 0.15%) -2.61ms (- 1.13%) 227.73ms 232.88ms p=0.000 n=600
typescript-startup - node (v16.17.1, x64)
Execution time 211.99ms (± 0.38%) 209.44ms (± 0.16%) -2.55ms (- 1.20%) 208.65ms 213.41ms p=0.000 n=600
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
  • 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 53193 6
Baseline main 6

Developer Information:

Download Benchmark

@jakebailey
Copy link
Member Author

Perf seems unchanged, seems like the usual noise.

@@ -6908,6 +6908,9 @@ export interface Diagnostic extends DiagnosticRelatedInformation {
/** @internal */ skippedOn?: keyof CompilerOptions;
}

/** @internal */
export type DiagnosticArguments = (string | number | undefined)[];
Copy link
Member

Choose a reason for hiding this comment

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

Allowing undefined feels too permissive to be honest.

Copy link
Member Author

@jakebailey jakebailey Mar 10, 2023

Choose a reason for hiding this comment

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

You're totally right, but, the bottommost calls already accepted undefined, and if I don't keep it, it's not possible to write a function which abstracts over a message and optional argumentss. To make that work, we'd need to strictly type our diagnostics to encode how many arguments they take, which technically sounds good but I'm guessing will be annoying.

Copy link
Member Author

Choose a reason for hiding this comment

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

But, let me try and make that change again and see how bad it is.

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, I gave it a shot, but I'd probably want to split some of it into another PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

FYI I did this; it was slightly more invasive than I hoped because tokenToString may return undefined, so I had to give it a stronger overload and fix up other code to make sure that we do it right.

@jakebailey jakebailey marked this pull request as draft March 11, 2023 02:24
@jakebailey jakebailey marked this pull request as ready for review March 13, 2023 04:55
@jakebailey jakebailey merged commit 79a414b into microsoft:main Mar 20, 2023
@jakebailey jakebailey deleted the cleanup-diagnostic-args branch March 20, 2023 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants