-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
.tsbuildinfo file should be created when the noEmit flag is enabled #30661
Comments
This would be useful so we can still benefit from fast rebuilds when using |
Though emitting a file (in this case .tsbuildinfo) when |
The way I use these terms, “emit” refers to the valuable output of the application, something we’d put to stdout in unix terms. The tsbuildinfo file is a cache that is supposed to be invisible to the consumer. The fact that it happens to be a file that we happen to write to disk is rather an irrelevant implementation detail. |
"tsc emits anything when The problem here is that If the build info file path is specified manually, then writing it out does seem OK |
It tsbuildinfo a build artifact in an unexpected place, though? What if we write this cache to /tmp, the Windows registry, or whatever other storage, as long as the user does not see it? (edit: to be clear, the previous sentence is a hypothetical to help identify the meaning of tsbuildinfo, not a real suggestion) It seems like the explicitly thorough solution would be to split the |
Good idea 👍 |
i second this! |
This would be incredibly useful in react native since the typescript code is parsed with the packager using Babel 7 so for type checking we have to use |
I was looking into just ditching the I'm not super familiar with the implementation, but it seems like type checking via |
+1. I'm temporarily setting Context: It's a frontend project with webpack+babel so emitting js is not useful. |
+1 for outputting |
If the current implementation do not require the normal build output to work, could you add a forceEmitBuildInfo boolean to the compile options please? That will not change anything for people relying on the current behavior that way. |
+1 for support for this in some way. I am using Typescript with |
Like others, my team wants For now, sending the JS output to a dummy folder is the best option I could find to use
It's a bit slower for the first run, but not dramatically slower like #30661 (comment) was mentioning. The previous typecheck time with I also tried |
Until microsoft/TypeScript#30661 is fixed we can't do incremental builds with --noEmit so this sets an outDir for all typescript projects that don't already have one.
we enable the incremental-flag here. because of the reasoning here microsoft/TypeScript#30661, we need to also need to emit stuff. we'll have an __out-dir until there's a better option.
we enable the incremental-flag here. because of the reasoning here microsoft/TypeScript#30661, we need to also need to emit stuff. we'll have an __out-dir until there's a better option. we want to call tsc before running jest to not have to deal with tsc's output regarding newly emitted files.
we enable the incremental-flag here. because of the reasoning here microsoft/TypeScript#30661, we need to also need to emit stuff. we'll have an __out-dir until there's a better option. we want to call tsc before running jest to not have to deal with tsc's output regarding newly emitted files.
we enable the incremental-flag here. because of the reasoning here microsoft/TypeScript#30661, we need to also need to emit stuff. we'll have an __out-dir until there's a better option. we want to call tsc before running jest to not have to deal with tsc's output regarding newly emitted files.
we enable the incremental-flag here. because of the reasoning here microsoft/TypeScript#30661, we need to also need to emit stuff. we'll have an __out-dir until there's a better option. we want to call tsc before running jest to not have to deal with tsc's output regarding newly emitted files.
Just want to add to this, has any solution been reached for this issue? More and more people are switching to using babel to remove typescript and checking types with |
So it seems that people who are using I'd just like to point out that you can run into this problem from the other direction too: ie. you already have Even if you wanted to forgo the speed benefits of |
@wincent. There is no
|
Thanks @InExtremaRes, that's easier than |
@sheetalkamat is this also fixed in #39122 ? |
Yes |
I just upgraded to TS v4 to try this out. Previously we were just using It seems that Stats from the
I'm assuming this is intended but does anyone understand why this is the case? |
@OliverJAsh Seems like declaration emit in your example takes longer. |
@sheetalkamat I also tried this out and it doesn't seem to create a tsbuildinfo file at all using Webstorm 2020.2 with |
I wanted to propose a follow-up change to this: #40198 |
TypeScript Version: 3.4.0-dev.20190330
Search Terms: incremental, noEmit, no emit, tsbuildinfo
Code:
https://github.com/vkrol/typescript-incremental-no-emit
Expected behavior:
.tsbuildinfo
file should be created when thenoEmit
flag is enabled.Actual behavior:
.tsbuildinfo
file is not created when thenoEmit
flag is enabled.The text was updated successfully, but these errors were encountered: