-
-
Notifications
You must be signed in to change notification settings - Fork 532
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
Use ts-node with TypeScript incremental build #817
Comments
Discussed in #811. It'd be nice but isn't possible at this time because the API doesn't exist. |
Thanks |
microsoft/TypeScript#29978 tracks the exposure of the API by TS, which is currently targeted at 3.5.x If ts-node has any plans to support the feature then that's the issue to watch. Depending on how you guys run your repo, you might want to re-open this issue for tracking, since it's definitely on the TS teams rader as something they want to ship ASAP. Either way, wanted to put this here for visibility, since #811 is about removing the properties :) |
The referenced TS issue has been merged! Not sure when it'll be released but it's still tagged as a 3.5.x candidate. |
@Chris911 The email for your comment somehow arrived before the email about the PR being merged & closed 😂 iirc on the roadmap it's been kicked back to 3.6.x, but either way we can expect it "soon" - pretty sure now that it's merged implementation could already begin, by just installing |
Should be soon... Typescript 3.6 final is planned for... yesterday :-) |
Does |
@sajadghawami I believe it doesn't, |
I'm working on an incremental cache for It doesn't need to use the incremental API though. There's also an option to include Why cache included |
@ohjames that looks unrelated to this issue, please keep it separate. This issue is specifically around using the incremental compilation API available in TypeScript. The solution you’ve written is actually available on an older version of this package and it would be preferable to just re-use that functionality - the reason it was removed is because you end up having transitive type issues on changed code. Edit: Actually, it’s possible I misread the code on my phone too. Are you saying it’s a cache for source files? In any case, I’d prefer to have this discussion in a new issue. |
Hi, I wonder if there is any updates with this issue? Supporting incremental build from TypeScript 3.6 API would be hugely beneficial in performance. Thanks! |
@tangentlin It's supported on |
Anyone reading this or other issues is welcome to pitch in and open a PR, right now I just don't have the personal bandwidth to figure it all out. |
|
You’re correct, it is available for people! Please test it. But unfortunately it doesn’t cover the references use-case yet, which means it’s not on by default. It’s possible to workaround with new options like registering multiple scoped compiler instances, but it’d be nice for it to work like the typescript compiler before we release it as default. |
ts-node doesn’t yet support TypeScript project references so it’s not so useful for us now that the project is split into multiple modules See TypeStrong/ts-node#817 (comment)
How do I turn this on? setting 'incremental' in tsconfig.json does not seem to work for me. |
@pbn4 It appears both |
In my case it seems the build time actually doubles when I try to use these options. |
Is fixing this dead now? Just switched to incremental and now all my ts-node is broken :( |
It seems that incremental build doesn't work correctly with ts-node or ts-jest. Sometimes, probably after unit test failure, lib directory contains src and test directories, but only content of src should be there, because baseUrl is set to "src" in tsconfig.json. Disabling the incremental build fix this issue. Since this project is quite small I don't think disabling this feature will have major impact on build time. Following issue in ts-node project might be related: TypeStrong/ts-node#817
Any updates on this? |
The TypeScript 4.4 beta announcement has this to say:
Not sure if this is related, but for folks who weren't seeing a speedup with |
Using ts-node 10.4.0 with TypeScript 4.5.5, I see no noticeable speed difference with |
Any updates on this? |
Is it possible to use
ts-node
with TypeScript 3.4+ incremental build options?The text was updated successfully, but these errors were encountered: