Uh oh!
There was an error while loading. Please reload this page.
[Experiment] Direct imports - #51504
Conversation
typescript-bot
commented
Nov 13, 2022
Thanks for the PR! It looks like you've changed the TSServer protocol in some way. Please ensure that any changes here don't break consumers of the current TSServer API. For some extra review, we'll ping @sheetalkamat, @amcasey, @mjbvz, @minestarks for you. Feel free to loop in other consumers/maintainers if necessary |
3f784b4 to
c30f78cComparejakebailey
commented
Nov 13, 2022
Impressive; this one is definitely tricky as there are still cycles. There is tooling to help with that. FWIW you can just start using Object.entries unconditionally; the new target is ES2018 so a lot more is fair game, though I haven't made an issue for that and we will need to performance test as we suspect that our hand written ones are faster. |
Yep :(. I decided to start by converting to direct imports, the second step should be to resolve the circular dependencies.
I know about |
jakebailey
commented
Nov 13, 2022
Madge is the one I had tried, but I forgot the name and while searching I found https://github.com/Soontao/cycle-import-check Funnily, the most reliable one I found was running rollup on the codebase, since it complains about it too. Maybe using type imports would help the tooling as well. |
But seriously, you got further than I did. I'm really shocked you got the tests to pass and tsc to run. I gave up and started working on other stuff instead... |
a-tarasyuk
commented
Nov 14, 2022
Can we move TypeScript/src/compiler/debug.ts Lines 135 to 142 in b553aff TypeScript/src/compiler/debug.ts Lines 150 to 208 in b553aff |
00f7493 to
9f7d90dComparejakebailey
commented
Nov 14, 2022
My Debug PR (#51455) does mend some of this, though it's not final at all. I'm not really sure how far we want to stretch debug; I think that for now the best we should try to do is to make |
DanielRosenwasser
commented
Nov 14, 2022
@typescript-bot perf test this faster |
Heya @DanielRosenwasser, I've started to run the abridged perf test suite on this PR at 9f7d90d. You can monitor the build here. Update: The results are in! |
typescript-bot
commented
Nov 14, 2022
@DanielRosenwasser Here they are:Comparison Report - main..51504
System
Hosts
Scenarios
Developer Information: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
jakebailey
commented
Nov 14, 2022
If this is to be trusted, then it's a tiny win. I was expecting roughly no change since esbuild devirtualizes everything already in the current bundle. But maybe there's more being done and we can diff the two tsc.js files. |
a-tarasyuk
commented
Nov 14, 2022
Yep, |
jakebailey
commented
Nov 14, 2022
My general feeling (and I think this is shared) is that the namespace stuff is really just a temporary hack and we'd like to have direct imports anyhow. |
jakebailey
commented
Nov 16, 2022
Are you planning on reopening this again somewhere else? I am wanting this change, though I don't know when we will "click the button" so I understand that it'd be a maintenance pain until then. |
a-tarasyuk
commented
Nov 16, 2022
Honestly, I just wanted to check the performance impact. These changes are difficult to maintain and after merging this PR #51565, these changes will be completely useless as they will affect all imports in all files. I think it would take less time to make all the changes from scratch than to fix merge conflicts :). |
jakebailey
commented
Nov 16, 2022
No problem! I appreciate that you showed it was possible, at least. |
d3e2db1 to
e99c935Comparea-tarasyuk
commented
Nov 16, 2022
@jakebailey Write me when you decide to do this migration and I'll try to restore these changes. |
@jakebailey#51443 (comment) Curious about how direct imports impact performance