-
Notifications
You must be signed in to change notification settings - Fork 203
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
TS emit failed with latest release #765
Comments
Sorry @tomitrescak. I tried a quick test and it works fine. Can you share your tsconfig.json ... and are you using |
Got it. Happens if the file is a |
Released: https://github.com/TypeStrong/atom-typescript/releases/tag/v7.14.0 have a nice weekend 🌹 |
I admire your speeeeeeeeeeed 🎱 ;) |
I suspect it's possible that the failures with d.ts files might be similar to the issue I'm chasing in #755. @tomitrescak (and @basarat ) when you were experiencing (and reproducing) this bug, were you compiling into your source directory? Or targeting a build directory distinct from your source directory? #755 popped up for me when I was looking at other babel-related code, as well. I will respond to @basarat's request for followup over in that thread now. By the way, I totally get why reverting the babel thing makes sense for now. Those of us using babel can still use that commit until it's better sorted out. I think there are a few other issues with the babel integration that might as well all get packaged up together properly, rather than trying to piecemeal them as hotfixes to the babel support. |
[EDIT] - Nevermind what is written below .. I had downgraded atom-typescript to previous version, therefore I had no errors. I will keep on investigating. Hi, 7.14.1 is still failing Emit ;( Last one that works is 7.12.0 ;(
|
@tomitrescak I believe the stack trace would now be different. Can you share that please 🌹 |
Bad news ;( Stacktrace is empty .. no error in console. Only the TS failed to emit error. |
@tomitrescak I don't have a repro :-/ Also you seem to be the only one suffering from this at the moment. I am open to suggestions 🌹 |
@basarat GOT IT! The culprit is the "noEmit": true With compilation set to some I can reproduce this issue in ALL my projects, please test it if you have time. |
Wouldn't |
Yes, you are right. I'm not sure if on-the-fly compilation does the same as compilation on save, but the Emit Failed message should not be shown as it is a bit misleading since compilation is performed just fine. |
This commit needs to be fixed up and documented -- not ready for merge -- but seems to improve some things regarding emits as well as having fixes for externalTranspiler/babel support. Because many tranpiles are synchronous, the main feature of these changes is to make externalTranipilation synchronous so as not to fall out of the event loop, but it also makes some changes to emit handling and tranpile error handling/reporting. It might help with issues such as TypeStrong#737 and perhaps even TypeStrong#765 (it doesn't exhibit the Emit Failed symptoms even with noEmit: true). For now, it doesn't close any issues. It's also behin master, so certainly beware.
This commit needs to be fixed up and documented -- not ready for merge -- but seems to improve some things regarding emits as well as having fixes for externalTranspiler/babel support. Because many tranpiles are synchronous, the main feature of these changes is to make externalTranipilation synchronous so as not to fall out of the event loop, but it also makes some changes to emit handling and tranpile error handling/reporting. It might help with issues such as TypeStrong#737 and perhaps even TypeStrong#765 (it doesn't exhibit the Emit Failed symptoms even with noEmit: true). For now, it doesn't close any issues. It's also behin master, so certainly beware.
@tomitrescak I've created a clearer issue report : #780 🌹 |
@basarat I still get TS Emit failed when emit is set to false ;( |
@tomitrescak the issue still exits : #780 I have difficulty wrapping my head around why one would even need |
My entire build process uses gulp-typescript and gulp-babel... including building the build itself -- so that no particular editor is needed, and so that we can control the streams, etc. etc. It also transpiles itself. I always run with (gulp-typescript happily, and correctly-for-its-use-case ignores the noEmit flag) |
Cool so |
Right -- difference being that the compile/buildOnSave settings prevent editor from assisting you in typechecking in-window. I don't actually have an issue with noEmit anymore on my branch, so somewhere in there I think there's a fix (though maybe not an ideal one). I still need to deal with making that into a PR or PRs. So, I don't need a workaround right now -- I was just chiming in with a reasoning behind wanting to run atom-typescript with noEmit turned on. |
@basarat I am running Webpack with ts-loader which is responsible for loading typescript and creating sourcemaps. Thereofre I do not need emission. I need compile on save to have the possibility of typechecks and more. |
Typechecks are performed irrespective of atom-typescript/lib/main/atom/onSaveHandler.ts Lines 31 to 56 in cdc8d98
|
This commit needs to be fixed up and documented -- not ready for merge -- but seems to improve some things regarding emits as well as having fixes for externalTranspiler/babel support. Because many tranpiles are synchronous, the main feature of these changes is to make externalTranipilation synchronous so as not to fall out of the event loop, but it also makes some changes to emit handling and tranpile error handling/reporting. It might help with issues such as TypeStrong#737 and perhaps even TypeStrong#765 (it doesn't exhibit the Emit Failed symptoms even with noEmit: true). For now, it doesn't close any issues. It's also behin master, so certainly beware.
This commit needs to be fixed up and documented -- not ready for merge -- but seems to improve some things regarding emits as well as having fixes for externalTranspiler/babel support. Because many tranpiles are synchronous, the main feature of these changes is to make externalTranipilation synchronous so as not to fall out of the event loop, but it also makes some changes to emit handling and tranpile error handling/reporting. It might help with issues such as TypeStrong#737 and perhaps even TypeStrong#765 (it doesn't exhibit the Emit Failed symptoms even with noEmit: true). For now, it doesn't close any issues. It's also behin master, so certainly beware.
I don't know if it is relevant, but I got the same error, Hope it helps |
In my case, I have resolved {
"compileOnSave": true,
"compilerOptions": {
"noImplicitAny": false,
"noEmitOnError": true,
"removeComments": false,
"sourceMap": true,
"target": "es5",
"module": "system",
"jsx": "react",
"experimentalDecorators": true
},
"exclude": [
"typings",
"node_modules",
"jspm_packages",
"wwwroot"
]
} The But, I am not sure whether this is related to this issue. |
Any progress on this bug? It's hella annoying. |
bug still there so please fix |
still there, any ideas whatsup? |
I got the same issue, too. Using Atom 1.10.2. |
same here, when setting "noEmitOnError": true, I get the 'TS Emit Failed' message when saving even if there are no actual errors. I can compile the file on the command line with tsc and everything works fine, but not from Atom. |
I solved this issue by switching from Atom to VS Code. Atom was sweet, but VS Code is sweeter. |
TypeStrong/atom-typescript#765 which takes priority over babel compile experience 🌹 This reverts commit 5103cec.
The build works as expected, but when compilation on save is emited following error is triggered:
The text was updated successfully, but these errors were encountered: