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

feat(7411): JSX namespaced attribute syntax not supported #47356

Merged
merged 22 commits into from
Apr 14, 2023

Conversation

a-tarasyuk
Copy link
Contributor

Fixes #7411
Fixes #47219

JSX Spec

JSXElementName:
 - JSXIdentifier
 - JSXNamespacedName
 - JSXMemberExpression
JSXAttributeName:
 - JSXIdentifier
 - JSXNamespacedName
JSXNamespacedName:
 - JSXIdentifier : JSXIdentifier

@typescript-bot typescript-bot added the For Backlog Bug PRs that fix a backlog bug label Jan 9, 2022
@a-tarasyuk a-tarasyuk marked this pull request as ready for review January 10, 2022 20:04
@typescript-bot
Copy link
Collaborator

The TypeScript team hasn't accepted the linked issue #7411. If you can get it accepted, this PR will have a better chance of being reviewed.

Copy link
Member

@weswigham weswigham left a comment

Choose a reason for hiding this comment

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

Can we get tests with more variety of odd namespace names in both tag name and property name positions? Like Component:foo or some-thing:bar? Specifically, in the case of the first one, I'd like to know if it tries to somehow lookup a Component:foo local variable (which'd be odd) for the type of the tag. (You could technically make this with an assignment to globalThis["Component:foo"], except the lookup for the tag probably has no shot of resolving at runtime - do namespaced custom tags even work?) which I'm down with just looking up intrinsics named svg:path and so on and props named ns:prop and so on, so that part of the checking seems fine. But do we need errors when a react-ish emit mode is set? react doesn't use namespaces as far as I'm aware. Maybe this should be flagged in some way because of that? (it's flagged in babel afaik)

Additionally, ping @RyanCavanaugh for the go/no go on this; we didn't want em for a long time, but I guess some framework (vue2?) uses the namespace syntax now, even though you have to silence an error in babel to use it.

@a-tarasyuk
Copy link
Contributor Author

@weswigham Thanks for the review.

Can we get tests with more variety of odd namespace names in both tag name and property name positions? Like Component:foo or some-thing:bar?

I'm not sure I fully understood the requested changes. Do you mean something like this? Or do you mean that I need to define global types to check name resolution?

// @jsx: preserve
// @filename: a.tsx

<A:foo></A:foo>;

Could you provide some examples that I can use as tests?

@weswigham
Copy link
Member

weswigham commented Mar 7, 2022

Do you mean something like this?

Yeah, with both capital-letter-starting and dash-containing names. (The first being an indication of function components and the later indicating non-identifier builtins). For checking intrinsics, adding namespaced dashed names to intrinsic tag names should be fine. For the capital-letter variant, I don't think there's any reasonable way to check it or even transpile it, after all React.createElement(Component:foo) is obviously invalid syntax, so it probably needs to be an error.

@a-tarasyuk
Copy link
Contributor Author

a-tarasyuk commented Mar 7, 2022

For the capital-letter variant, I don't think there's any reasonable way to check it or even transpile it, after all React.createElement(Component:foo) is obviously invalid syntax, so it probably needs to be an error.

Shouldn't we transpile it as React.createElement("Component:foo")? Some bundles just emit it as React.createElement("Component:foo")

@weswigham
Copy link
Member

No - only intrinsic names do that, and only names starting with a lower case character are intrinsic names.

@a-tarasyuk
Copy link
Contributor Author

a-tarasyuk commented Mar 7, 2022

@weswigham Oke. Should TS parse it as JSXNamespacedName and throw an error in the checker? Or at the parser stage?

@weswigham
Copy link
Member

Mmmm, checker is better for error recovery, usually.

@a-tarasyuk
Copy link
Contributor Author

Additionally, ping @RyanCavanaugh for the go/no go on this; we didn't want em for a long time, but I guess some framework (vue2?) uses the namespace syntax now, even though you have to silence an error in babel to use it.

@RyanCavanaugh What do you think about JSXNamespacedName support?

Copy link
Member

@weswigham weswigham left a comment

Choose a reason for hiding this comment

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

This looks OK to me, but I'm going to kick it over to @RyanCavanaugh for final approval and merging after community tests have come back, since it's up to him if this much support for namespace names is actually what we wanted (or if we just wanted better parser recovery).

@weswigham
Copy link
Member

@typescript-bot test this
@typescript-bot run dt
@typescript-bot test top100
@typescript-bot perf test this
@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 20, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 20, 2023

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 20, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 20, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 20, 2023

Heya @weswigham, I've started to run the tarball bundle task on this PR at 23379dd. You can monitor the build here.

@weswigham weswigham assigned RyanCavanaugh and unassigned weswigham Mar 20, 2023
@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 20, 2023

Hey @weswigham, 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/150274/artifacts?artifactName=tgz&fileId=AE5479640F8658C66EE2CB5865EE83E8322E764552171451F22E07134C18045802&fileName=/typescript-5.1.0-insiders.20230320.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.1.0-pr-47356-14".;

@typescript-bot
Copy link
Collaborator

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

Everything looks good!

@typescript-bot
Copy link
Collaborator

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

Branch only errors:

Package: fbt
Error:

Error: /home/vsts/work/1/s/DefinitelyTyped-tools/packages/dtslint-runner/DefinitelyTyped/types/fbt/fbt-tests.tsx:406:13
ERROR: 406:13  expect  TypeScript@local compile error: 
Unused '@ts-expect-error' directive.
ERROR: 416:13  expect  TypeScript@local compile error: 
Unused '@ts-expect-error' directive.
ERROR: 427:13  expect  TypeScript@local compile error: 
Unused '@ts-expect-error' directive.
ERROR: 433:1   expect  TypeScript@local compile error: 
Unused '@ts-expect-error' directive.
ERROR: 458:10  expect  TypeScript@local compile error: 
Unused '@ts-expect-error' directive.
ERROR: 465:10  expect  TypeScript@local compile error: 
Unused '@ts-expect-error' directive.
ERROR: 527:13  expect  TypeScript@local compile error: 
Unused '@ts-expect-error' directive.
ERROR: 537:13  expect  TypeScript@local compile error: 
Unused '@ts-expect-error' directive.
ERROR: 548:13  expect  TypeScript@local compile error: 
Unused '@ts-expect-error' directive.
ERROR: 554:1   expect  TypeScript@local compile error: 
Unused '@ts-expect-error' directive.

    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

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

Here they are:

Compiler

Comparison Report - main..47356
Metric main 47356 Delta Best Worst p-value
Angular - node (v18.10.0, x64)
Memory used 361,721k (± 0.01%) 361,709k (± 0.01%) ~ 361,684k 361,730k p=0.335 n=6
Parse Time 3.38s (± 0.61%) 3.39s (± 0.40%) ~ 3.37s 3.41s p=0.317 n=6
Bind Time 1.12s (± 1.08%) 1.12s (± 0.49%) ~ 1.11s 1.12s p=0.855 n=6
Check Time 8.67s (± 0.38%) 8.70s (± 0.34%) ~ 8.66s 8.74s p=0.169 n=6
Emit Time 7.44s (± 0.69%) 7.45s (± 0.77%) ~ 7.38s 7.53s p=0.687 n=6
Total Time 20.60s (± 0.35%) 20.66s (± 0.45%) ~ 20.51s 20.76s p=0.296 n=6
Compiler-Unions - node (v18.10.0, x64)
Memory used 192,677k (± 1.53%) 192,835k (± 1.54%) ~ 190,893k 196,779k p=0.173 n=6
Parse Time 1.49s (± 1.82%) 1.52s (± 0.99%) ~ 1.50s 1.53s p=0.099 n=6
Bind Time 0.77s (± 0.00%) 0.77s (± 0.82%) ~ 0.76s 0.78s p=1.000 n=6
Check Time 9.44s (± 0.86%) 9.49s (± 0.65%) ~ 9.38s 9.54s p=0.229 n=6
Emit Time 2.73s (± 1.33%) 2.73s (± 0.79%) ~ 2.70s 2.76s p=0.808 n=6
Total Time 14.42s (± 0.70%) 14.50s (± 0.61%) ~ 14.37s 14.60s p=0.228 n=6
Monaco - node (v18.10.0, x64)
Memory used 346,260k (± 0.01%) 346,316k (± 0.01%) +56k (+ 0.02%) 346,253k 346,372k p=0.045 n=6
Parse Time 2.59s (± 0.97%) 2.61s (± 0.80%) ~ 2.59s 2.64s p=0.090 n=6
Bind Time 1.01s (± 1.02%) 1.01s (± 0.40%) ~ 1.01s 1.02s p=0.268 n=6
Check Time 7.03s (± 0.62%) 7.06s (± 0.50%) ~ 7.02s 7.10s p=0.293 n=6
Emit Time 4.24s (± 1.18%) 4.26s (± 0.74%) ~ 4.22s 4.31s p=0.469 n=6
Total Time 14.87s (± 0.69%) 14.95s (± 0.51%) ~ 14.87s 15.07s p=0.126 n=6
TFS - node (v18.10.0, x64)
Memory used 300,459k (± 0.01%) 300,459k (± 0.01%) ~ 300,420k 300,487k p=0.936 n=6
Parse Time 2.06s (± 1.09%) 2.09s (± 1.19%) +0.04s (+ 1.78%) 2.07s 2.13s p=0.038 n=6
Bind Time 1.14s (± 0.86%) 1.14s (± 0.91%) ~ 1.12s 1.15s p=0.591 n=6
Check Time 6.52s (± 0.50%) 6.53s (± 0.31%) ~ 6.50s 6.56s p=0.686 n=6
Emit Time 3.88s (± 0.45%) 3.88s (± 0.72%) ~ 3.84s 3.92s p=1.000 n=6
Total Time 13.61s (± 0.36%) 13.64s (± 0.20%) ~ 13.60s 13.67s p=0.260 n=6
material-ui - node (v18.10.0, x64)
Memory used 477,159k (± 0.01%) 477,152k (± 0.01%) ~ 477,110k 477,186k p=1.000 n=6
Parse Time 2.99s (± 2.16%) 3.02s (± 2.63%) ~ 2.93s 3.10s p=0.513 n=6
Bind Time 0.99s (± 8.57%) 0.99s (± 9.07%) ~ 0.90s 1.08s p=0.935 n=6
Check Time 16.93s (± 0.46%) 16.93s (± 0.68%) ~ 16.81s 17.12s p=0.935 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 20.90s (± 0.40%) 20.93s (± 0.54%) ~ 20.84s 21.13s p=0.936 n=6
xstate - node (v18.10.0, x64)
Memory used 552,968k (± 0.02%) 552,908k (± 0.01%) ~ 552,878k 552,959k p=0.378 n=6
Parse Time 3.77s (± 0.83%) 3.81s (± 0.27%) ~ 3.80s 3.83s p=0.052 n=6
Bind Time 1.70s (± 0.53%) 1.71s (± 0.60%) ~ 1.70s 1.73s p=0.054 n=6
Check Time 2.74s (± 0.85%) 2.76s (± 0.54%) ~ 2.75s 2.78s p=0.101 n=6
Emit Time 0.08s (± 4.99%) 0.08s (± 4.99%) ~ 0.08s 0.09s p=1.000 n=6
Total Time 8.31s (± 0.39%) 8.38s (± 0.27%) +0.07s (+ 0.82%) 8.36s 8.42s p=0.005 n=6
Angular - node (v16.17.1, x64)
Memory used 361,038k (± 0.01%) 361,021k (± 0.01%) ~ 360,984k 361,051k p=0.471 n=6
Parse Time 3.52s (± 0.21%) 3.55s (± 0.81%) +0.04s (+ 1.04%) 3.52s 3.59s p=0.018 n=6
Bind Time 1.18s (± 0.44%) 1.18s (± 0.44%) ~ 1.18s 1.19s p=1.000 n=6
Check Time 9.50s (± 0.57%) 9.49s (± 0.43%) ~ 9.44s 9.55s p=0.872 n=6
Emit Time 7.94s (± 0.62%) 7.97s (± 1.17%) ~ 7.86s 8.13s p=0.630 n=6
Total Time 22.14s (± 0.30%) 22.20s (± 0.50%) ~ 22.07s 22.40s p=0.470 n=6
Compiler-Unions - node (v16.17.1, x64)
Memory used 193,705k (± 0.89%) 193,604k (± 0.85%) ~ 192,533k 195,800k p=0.378 n=6
Parse Time 1.58s (± 1.01%) 1.60s (± 1.36%) ~ 1.56s 1.62s p=0.191 n=6
Bind Time 0.82s (± 1.27%) 0.83s (± 0.49%) ~ 0.82s 0.83s p=0.528 n=6
Check Time 10.11s (± 0.57%) 10.24s (± 0.63%) +0.13s (+ 1.32%) 10.18s 10.32s p=0.016 n=6
Emit Time 2.98s (± 0.55%) 2.98s (± 0.54%) ~ 2.96s 3.00s p=0.737 n=6
Total Time 15.49s (± 0.35%) 15.65s (± 0.44%) +0.15s (+ 0.99%) 15.57s 15.73s p=0.008 n=6
Monaco - node (v16.17.1, x64)
Memory used 345,561k (± 0.00%) 345,541k (± 0.00%) -20k (- 0.01%) 345,532k 345,555k p=0.013 n=6
Parse Time 2.73s (± 0.55%) 2.75s (± 0.78%) ~ 2.73s 2.78s p=0.157 n=6
Bind Time 1.09s (± 0.96%) 1.09s (± 0.69%) ~ 1.08s 1.10s p=0.273 n=6
Check Time 7.73s (± 0.54%) 7.73s (± 0.61%) ~ 7.66s 7.79s p=1.000 n=6
Emit Time 4.47s (± 0.28%) 4.48s (± 0.92%) ~ 4.43s 4.55s p=0.870 n=6
Total Time 16.02s (± 0.36%) 16.05s (± 0.61%) ~ 15.92s 16.21s p=0.809 n=6
TFS - node (v16.17.1, x64)
Memory used 299,817k (± 0.01%) 299,794k (± 0.01%) ~ 299,765k 299,824k p=0.378 n=6
Parse Time 2.18s (± 0.95%) 2.17s (± 0.75%) ~ 2.15s 2.19s p=0.745 n=6
Bind Time 1.24s (± 1.10%) 1.24s (± 0.97%) ~ 1.23s 1.26s p=1.000 n=6
Check Time 7.18s (± 0.38%) 7.22s (± 0.53%) ~ 7.16s 7.25s p=0.147 n=6
Emit Time 4.34s (± 0.86%) 4.36s (± 0.82%) ~ 4.31s 4.41s p=0.519 n=6
Total Time 14.95s (± 0.51%) 14.99s (± 0.52%) ~ 14.88s 15.08s p=0.336 n=6
material-ui - node (v16.17.1, x64)
Memory used 476,401k (± 0.00%) 476,465k (± 0.01%) +65k (+ 0.01%) 476,396k 476,557k p=0.020 n=6
Parse Time 3.21s (± 0.42%) 3.21s (± 1.10%) ~ 3.15s 3.24s p=0.933 n=6
Bind Time 0.96s (± 0.54%) 0.97s (± 1.80%) +0.02s (+ 1.74%) 0.96s 1.00s p=0.040 n=6
Check Time 18.01s (± 0.70%) 18.02s (± 0.40%) ~ 17.96s 18.15s p=0.686 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 22.18s (± 0.65%) 22.21s (± 0.32%) ~ 22.15s 22.34s p=0.419 n=6
xstate - node (v16.17.1, x64)
Memory used 550,557k (± 0.02%) 550,631k (± 0.03%) ~ 550,519k 550,887k p=0.336 n=6
Parse Time 3.95s (± 0.46%) 3.97s (± 0.49%) ~ 3.95s 4.00s p=0.062 n=6
Bind Time 1.80s (± 0.45%) 1.79s (± 0.67%) ~ 1.78s 1.81s p=0.677 n=6
Check Time 2.99s (± 0.82%) 2.98s (± 0.81%) ~ 2.96s 3.03s p=0.869 n=6
Emit Time 0.09s (± 0.00%) 0.09s (± 0.00%) ~ 0.09s 0.09s p=1.000 n=6
Total Time 8.83s (± 0.35%) 8.84s (± 0.43%) ~ 8.80s 8.90s p=0.629 n=6
Angular - node (v14.15.1, x64)
Memory used 354,900k (± 0.01%) 354,926k (± 0.01%) ~ 354,889k 354,978k p=0.173 n=6
Parse Time 3.59s (± 0.63%) 3.64s (± 0.79%) +0.05s (+ 1.39%) 3.61s 3.69s p=0.012 n=6
Bind Time 1.23s (± 0.84%) 1.23s (± 0.42%) ~ 1.23s 1.24s p=0.928 n=6
Check Time 9.81s (± 0.40%) 9.84s (± 0.36%) ~ 9.78s 9.88s p=0.126 n=6
Emit Time 8.38s (± 0.63%) 8.43s (± 0.97%) ~ 8.31s 8.51s p=0.335 n=6
Total Time 23.01s (± 0.26%) 23.14s (± 0.50%) ~ 22.96s 23.29s p=0.065 n=6
Compiler-Unions - node (v14.15.1, x64)
Memory used 187,774k (± 0.02%) 187,649k (± 0.08%) ~ 187,471k 187,799k p=0.336 n=6
Parse Time 1.59s (± 0.77%) 1.61s (± 0.61%) +0.02s (+ 1.04%) 1.60s 1.63s p=0.027 n=6
Bind Time 0.85s (± 0.61%) 0.85s (± 0.60%) ~ 0.85s 0.86s p=0.069 n=6
Check Time 10.29s (± 0.40%) 10.29s (± 0.47%) ~ 10.24s 10.38s p=0.936 n=6
Emit Time 3.13s (± 0.82%) 3.32s (± 6.23%) ~ 3.12s 3.58s p=0.076 n=6
Total Time 15.86s (± 0.32%) 16.07s (± 1.51%) ~ 15.83s 16.37s p=0.226 n=6
Monaco - node (v14.15.1, x64)
Memory used 340,548k (± 0.01%) 340,539k (± 0.01%) ~ 340,517k 340,573k p=0.521 n=6
Parse Time 2.83s (± 0.57%) 2.85s (± 0.57%) ~ 2.82s 2.87s p=0.182 n=6
Bind Time 1.10s (± 0.68%) 1.10s (± 0.47%) ~ 1.10s 1.11s p=0.241 n=6
Check Time 8.08s (± 0.33%) 8.10s (± 0.34%) ~ 8.08s 8.15s p=0.225 n=6
Emit Time 4.70s (± 1.16%) 4.70s (± 0.77%) ~ 4.64s 4.74s p=1.000 n=6
Total Time 16.71s (± 0.52%) 16.75s (± 0.26%) ~ 16.70s 16.80s p=0.260 n=6
TFS - node (v14.15.1, x64)
Memory used 294,888k (± 0.00%) 294,895k (± 0.00%) ~ 294,880k 294,909k p=0.422 n=6
Parse Time 2.39s (± 0.51%) 2.42s (± 0.73%) +0.03s (+ 1.19%) 2.39s 2.43s p=0.022 n=6
Bind Time 1.06s (± 0.49%) 1.08s (± 1.14%) ~ 1.06s 1.09s p=0.069 n=6
Check Time 7.49s (± 0.26%) 7.54s (± 0.60%) ~ 7.47s 7.59s p=0.091 n=6
Emit Time 4.28s (± 0.48%) 4.30s (± 1.16%) ~ 4.24s 4.39s p=0.373 n=6
Total Time 15.23s (± 0.23%) 15.33s (± 0.61%) +0.11s (+ 0.69%) 15.21s 15.50s p=0.020 n=6
material-ui - node (v14.15.1, x64)
Memory used 471,968k (± 0.01%) 471,981k (± 0.01%) ~ 471,943k 472,022k p=0.575 n=6
Parse Time 3.37s (± 0.58%) 3.37s (± 0.62%) ~ 3.33s 3.39s p=0.464 n=6
Bind Time 1.01s (± 0.00%) 1.00s (± 0.83%) ~ 0.99s 1.01s p=0.176 n=6
Check Time 18.90s (± 0.32%) 18.91s (± 0.61%) ~ 18.77s 19.05s 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 23.28s (± 0.29%) 23.28s (± 0.54%) ~ 23.13s 23.44s p=1.000 n=6
xstate - node (v14.15.1, x64)
Memory used 539,108k (± 0.00%) 539,153k (± 0.00%) +45k (+ 0.01%) 539,115k 539,179k p=0.013 n=6
Parse Time 4.21s (± 0.46%) 4.24s (± 0.35%) +0.03s (+ 0.67%) 4.22s 4.25s p=0.028 n=6
Bind Time 1.66s (± 0.90%) 1.68s (± 0.24%) ~ 1.67s 1.68s p=0.066 n=6
Check Time 3.14s (± 1.04%) 3.16s (± 0.47%) ~ 3.14s 3.18s p=0.126 n=6
Emit Time 0.09s (± 0.00%) 0.09s (± 0.00%) ~ 0.09s 0.09s p=1.000 n=6
Total Time 9.10s (± 0.74%) 9.18s (± 0.13%) ~ 9.16s 9.19s p=0.065 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 47356 6
Baseline main 6

TSServer

Comparison Report - main..47356
Metric main 47356 Delta Best Worst p-value
Compiler-UnionsTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,396ms (± 0.75%) 2,416ms (± 0.51%) ~ 2,400ms 2,434ms p=0.078 n=6
Req 2 - geterr 5,412ms (± 0.80%) 5,451ms (± 0.56%) ~ 5,415ms 5,490ms p=0.173 n=6
Req 3 - references 337ms (± 0.56%) 339ms (± 0.36%) ~ 337ms 340ms p=0.251 n=6
Req 4 - navto 280ms (± 0.52%) 282ms (± 0.37%) ~ 280ms 283ms p=0.084 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 80ms (± 3.58%) 77ms (± 7.24%) ~ 71ms 84ms p=0.514 n=6
CompilerTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,519ms (± 0.71%) 2,541ms (± 1.84%) ~ 2,464ms 2,591ms p=0.298 n=6
Req 2 - geterr 4,040ms (± 0.46%) 4,051ms (± 0.61%) ~ 4,017ms 4,080ms p=0.471 n=6
Req 3 - references 351ms (± 1.23%) 349ms (± 1.68%) ~ 341ms 358ms p=0.573 n=6
Req 4 - navto 291ms (± 0.79%) 295ms (± 1.44%) ~ 291ms 301ms p=0.126 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 (± 6.15%) 77ms (± 8.45%) ~ 69ms 85ms p=1.000 n=6
xstateTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 3,032ms (± 0.47%) 3,046ms (± 0.51%) ~ 3,018ms 3,064ms p=0.173 n=6
Req 2 - geterr 1,572ms (± 0.94%) 1,585ms (± 1.24%) ~ 1,570ms 1,616ms p=0.376 n=6
Req 3 - references 107ms (± 0.38%) 107ms (± 0.98%) ~ 105ms 108ms p=0.528 n=6
Req 4 - navto 355ms (± 0.63%) 357ms (± 0.75%) ~ 353ms 361ms p=0.677 n=6
Req 5 - completionInfo count 2,861 (± 0.00%) 2,861 (± 0.00%) ~ 2,861 2,861 p=1.000 n=6
Req 5 - completionInfo 383ms (± 1.20%) 382ms (± 1.63%) ~ 372ms 389ms p=0.872 n=6
Compiler-UnionsTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,515ms (± 0.71%) 2,516ms (± 0.86%) ~ 2,491ms 2,542ms p=0.936 n=6
Req 2 - geterr 5,791ms (± 0.72%) 5,779ms (± 0.69%) ~ 5,727ms 5,827ms p=0.809 n=6
Req 3 - references 348ms (± 1.04%) 348ms (± 1.13%) ~ 342ms 352ms p=0.936 n=6
Req 4 - navto 280ms (± 1.57%) 278ms (± 0.50%) ~ 275ms 279ms p=0.256 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.85%) 74ms (± 1.40%) ~ 72ms 75ms p=0.654 n=6
CompilerTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,686ms (± 0.63%) 2,666ms (± 0.79%) -21ms (- 0.77%) 2,634ms 2,700ms p=0.045 n=6
Req 2 - geterr 4,388ms (± 0.47%) 4,391ms (± 0.51%) ~ 4,355ms 4,424ms p=0.810 n=6
Req 3 - references 357ms (± 0.72%) 357ms (± 0.54%) ~ 354ms 359ms p=1.000 n=6
Req 4 - navto 291ms (± 0.14%) 292ms (± 0.52%) ~ 290ms 294ms p=0.863 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 78ms (± 6.46%) 76ms (± 2.55%) ~ 75ms 80ms p=1.000 n=6
xstateTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 3,180ms (± 0.38%) 3,180ms (± 0.41%) ~ 3,167ms 3,201ms p=1.000 n=6
Req 2 - geterr 1,753ms (± 1.86%) 1,752ms (± 1.65%) ~ 1,708ms 1,784ms p=1.000 n=6
Req 3 - references 114ms (± 1.21%) 114ms (± 1.74%) ~ 111ms 117ms p=1.000 n=6
Req 4 - navto 340ms (± 0.64%) 341ms (± 0.91%) ~ 339ms 345ms p=0.560 n=6
Req 5 - completionInfo count 2,861 (± 0.00%) 2,861 (± 0.00%) ~ 2,861 2,861 p=1.000 n=6
Req 5 - completionInfo 395ms (± 0.94%) 394ms (± 0.44%) ~ 393ms 397ms p=0.870 n=6
Compiler-UnionsTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 2,604ms (± 0.44%) 2,618ms (± 0.28%) +14ms (+ 0.54%) 2,609ms 2,629ms p=0.045 n=6
Req 2 - geterr 6,192ms (± 0.64%) 6,193ms (± 0.32%) ~ 6,162ms 6,215ms p=0.810 n=6
Req 3 - references 366ms (± 0.71%) 366ms (± 0.88%) ~ 362ms 371ms p=1.000 n=6
Req 4 - navto 277ms (± 0.46%) 279ms (± 0.48%) ~ 278ms 281ms p=0.054 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 102ms (± 0.50%) 102ms (± 0.88%) ~ 101ms 103ms p=0.541 n=6
CompilerTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 2,820ms (± 0.46%) 2,825ms (± 0.67%) ~ 2,791ms 2,848ms p=0.378 n=6
Req 2 - geterr 4,598ms (± 2.72%) 4,543ms (± 2.14%) ~ 4,478ms 4,738ms p=1.000 n=6
Req 3 - references 395ms (± 8.40%) 418ms (± 5.68%) ~ 370ms 430ms p=0.688 n=6
Req 4 - navto 293ms (± 1.31%) 287ms (± 0.64%) -6ms (- 1.88%) 285ms 290ms p=0.010 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 (± 8.99%) 88ms (± 6.94%) +9ms (+11.68%) 76ms 92ms p=0.036 n=6
xstateTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 3,444ms (± 0.69%) 3,476ms (± 0.49%) +31ms (+ 0.91%) 3,448ms 3,493ms p=0.045 n=6
Req 2 - geterr 1,870ms (± 0.40%) 1,881ms (± 0.90%) ~ 1,851ms 1,894ms p=0.173 n=6
Req 3 - references 127ms (± 1.16%) 129ms (± 1.96%) ~ 126ms 132ms p=0.256 n=6
Req 4 - navto 370ms (± 0.37%) 373ms (± 0.77%) +3ms (+ 0.86%) 370ms 378ms p=0.028 n=6
Req 5 - completionInfo count 2,861 (± 0.00%) 2,861 (± 0.00%) ~ 2,861 2,861 p=1.000 n=6
Req 5 - completionInfo 409ms (± 0.47%) 412ms (± 1.15%) ~ 407ms 420ms p=0.332 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 47356 6
Baseline main 6

Startup

Comparison Report - main..47356
Metric main 47356 Delta Best Worst p-value
tsc-startup - node (v16.17.1, x64)
Execution time 141.35ms (± 0.16%) 142.27ms (± 0.20%) +0.92ms (+ 0.65%) 141.21ms 145.55ms p=0.000 n=600
tsserver-startup - node (v16.17.1, x64)
Execution time 226.36ms (± 0.17%) 228.94ms (± 0.41%) +2.58ms (+ 1.14%) 226.72ms 236.56ms p=0.000 n=600
tsserverlibrary-startup - node (v16.17.1, x64)
Execution time 228.49ms (± 0.21%) 230.02ms (± 0.32%) +1.54ms (+ 0.67%) 228.20ms 236.66ms p=0.000 n=600
typescript-startup - node (v16.17.1, x64)
Execution time 209.45ms (± 0.23%) 212.08ms (± 0.39%) +2.63ms (+ 1.26%) 209.37ms 217.26ms 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 47356 6
Baseline main 6

Developer Information:

Download Benchmark

@DanielRosenwasser DanielRosenwasser merged commit 0c5be02 into microsoft:main Apr 14, 2023
@eps1lon
Copy link
Contributor

eps1lon commented Apr 15, 2023

It's not really clear to me whether this was targetted just at attributes or also element names. The spec does allow namespaced names as far as I can tell so TypeScript should allow it. And considering @types/fbt has been out for a while using namespaced element names, it seems to have worked in the past. But maybe how it worked in the past was not intended?

Either way, can somebody take a look at the test added in https://github.com/microsoft/TypeScript/pull/53784/files since that should resolve the element type to fbt:enum and not treat fbt and enum as different types. Bisected with the test added in #53784 and this PR is the first one to break that test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Backlog Bug PRs that fix a backlog bug
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

JSX: <svg : path /> parsed incorrectly JSX namespaced attribute syntax not supported
6 participants