Uh oh!
There was an error while loading. Please reload this page.
Merge 'decorators' into 'modifiers' on various nodes - #49089
Conversation
Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at 39bb5e7. You can monitor the build here. |
Heya Ron Buckton (@rbuckton), I've started to run the parallelized community code test suite on this PR at 39bb5e7. You can monitor the build here. |
Heya Ron Buckton (@rbuckton), I've started to run the parallelized Definitely Typed test suite on this PR at 39bb5e7. You can monitor the build here. |
Heya Ron Buckton (@rbuckton), I've started to run the extended test suite on this PR at 39bb5e7. You can monitor the build here. |
Heya Ron Buckton (@rbuckton), I've started to run the parallelized Definitely Typed test suite on this PR at ea48336. You can monitor the build here. |
Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at ea48336. You can monitor the build here. |
Heya Ron Buckton (@rbuckton), I've started to run the extended test suite on this PR at ea48336. You can monitor the build here. |
Heya Ron Buckton (@rbuckton), I've started to run the parallelized community code test suite on this PR at ea48336. You can monitor the build here. |
ea48336 to
1cf55efCompareRon Buckton (rbuckton)
commented
May 14, 2022
TypeScript Bot (@typescript-bot) perf test |
Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at 1cf55ef. You can monitor the build here. Update: The results are in! |
TypeScript Bot (typescript-bot)
commented
May 14, 2022
Ron Buckton (@rbuckton) Here they are:Comparison Report - main..49089
System
Hosts
Scenarios
Developer Information: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Ron Buckton (rbuckton)
commented
May 21, 2022
TypeScript Bot (@typescript-bot) perf test |
Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at c7fce15. You can monitor the build here. Update: The results are in! |
c7fce15 to
01f9749CompareTypeScript Bot (typescript-bot)
commented
May 21, 2022
Ron Buckton (@rbuckton) Here they are:Comparison Report - main..49089
System
Hosts
Scenarios
Developer Information: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
01f9749 to
4d3805fCompare
Nathan Shively-Sanders (sandersn)
left a comment
There was a problem hiding this comment.
I have a few questions and one suggestion. Overall I think this is the right change, although I'd like to see what others think.
Also, is performance the same? I remember you saying something about it in earlier drafts.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Ron Buckton (rbuckton)
commented
Jun 3, 2022
Performance is fairly close. There's unfortunately a little bit more megamorphism due to Decorator and Modifier being in the same array, but the impact has been fairly minimal (less than a tenth of a second in total compile time). The upside is that memory usage dropped across the board, and is especially noticeable in xstate. |
# Conflicts: # src/compiler/checker.ts # src/compiler/transformers/ts.ts # src/compiler/utilities.ts
0f71949 to
a906d6fComparea906d6f to
d6e4576Compare# Conflicts: # src/testRunner/unittests/tsbuild/helpers.ts
Ron Buckton (rbuckton)
commented
Jun 10, 2022
Got slightly ahead of myself with the merge, but I've fixed the test failure in |
Lisa Velden (lvelden)
commented
Jul 8, 2022
I discovered that this breaks e.g. tsutils as NodeArray isn't compatible with ModifiersArray which is expected here. I see that the plan is to make it a soft failure in 4.8, do you also have a suggestion on how to make the code compatible with both 4.7 and 4.8? |
Brad Zacher (bradzacher)
commented
Aug 17, 2022
Whilst investigating typescript-eslint/typescript-eslint#5496 I locally upgraded our codebase to v4.8.1-rc and then did not see any relevant TS errors - it wasn't until I manually inspected the code that I noticed the VSCode strike-out decoration on the deprecated members that I found out about the change. From the perspective of an AST consumer - deprecating the now dead properties instead of removing them entirely is a bit of a problem. We'll have to manually audit our entire codebase to find the code that's now broken. |
Update tsconfig-paths hook to be compatible with how `updateExportDeclaration` now works in typescript 5. This is from microsoft/TypeScript#49089
Update tsconfig-paths hook to be compatible with how `updateExportDeclaration` now works in typescript 5. This is from microsoft/TypeScript#49089
Update tsconfig-paths hook to be compatible with how `updateExportDeclaration` now works in typescript 5. This is from: microsoft/TypeScript#49089
Decorators are now placed on `modifiers` on TypeScript's syntax trees. Passing decorators separately has been deprecated since v4.8 and removed completely in v5. https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-8.html#decorators-are-placed-on-modifiers-on-typescripts-syntax-treesmicrosoft/TypeScript#49089
Decorators are now placed on `modifiers` on TypeScript's syntax trees. Passing decorators separately has been deprecated since v4.8 and removed completely in v5. https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-8.html#decorators-are-placed-on-modifiers-on-typescripts-syntax-treesmicrosoft/TypeScript#49089
This merges the
decoratorsfield onNodeinto themodifiersfield in preparation for eventual support for Decorators Stage 3. This is necessary since the version of the Decorators proposal that advanced parses class decorators after theexportanddefaultkeywords, which is incompatible with our current AST andNodeFactorymethods.To avoid a large amount of complex overloads, we've currently opted to change thedecoratorsparameter on variousNodeFactoryAPI methods to only acceptnull(which we generally don't use in the compiler). Calling the existingNodeFactoryAPI methods with a value fordecoratorsthat is notnullwill result in a deprecation warning, but should otherwise work for the time being. To avoid a major runtime breaking API change in 4.x releases, we likely won't remove thedecoratorsparameter entirely until 5.0.NOTE: After some consideration, I've amended the approach above to remove the
decoratorsparameter entirely from the main API and only support it through overloads via deprecatedCompat.This also reorganizes the deprecatedCompat project for easier maintenance, and moves a few deprecated APIs out of compiler to reduce overhead in tsc.js.
NOTE TO REVIEWERS: I've added a large number of reviewers since this pertains to the public API so I can get more eyes on this.