Skip to content
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

TypeScript 3.7 — LanguageService.getEmitOutput returns an empty result #33936

Closed
mjbvz opened this issue Oct 10, 2019 · 3 comments · Fixed by #34495
Closed

TypeScript 3.7 — LanguageService.getEmitOutput returns an empty result #33936

mjbvz opened this issue Oct 10, 2019 · 3 comments · Fixed by #34495
Assignees
Labels
Fix Available A PR has been opened for this issue

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Oct 10, 2019

TypeScript version: 3.7.0-dev.20191010

We're trying to build VS Code using TS 3.7. As part of this, we use TypeScript LanguageService.getEmitOutput method to request the emitted d.ts of various files: https://github.com/microsoft/vscode/blob/363b9769412fea0d9aef07fa1801371c14d72741/build/monaco/api.ts#L619

WIth TS 3.6, getEmitOutputends up returning a result. However with TS 3.7, it returns an empty array starting on one file: vs/editor/common/standalone/standaloneBase

/cc @DanielRosenwasser

@mjbvz
Copy link
Contributor Author

mjbvz commented Oct 10, 2019

A few other observations:

  • getEmitOutput does work correctly for a few files before failing on standaloneBase
  • If I set emitOnlyDtsFiles to false, I do see the js file being output for standaloneBase but not a d.ts file

mjbvz added a commit to mjbvz/vscode that referenced this issue Oct 10, 2019
Reverts 5b0cdad but keeps the build version of TS locked at 3.6.3 due to
microsoft/TypeScript#33936
mjbvz added a commit to mjbvz/vscode that referenced this issue Oct 10, 2019
@sheetalkamat
Copy link
Member

Your tsconfig doesn't have "declaration" enabled and hence its not generating it. 11fd654 changed the way emitOnlyDts works because I had mixed forcing d.ts emit to be always generated with API emitOnlyDts and that could be why you see it. Currently forceDts is internal but do you mind making that method as any and passing that as true to see if that resolves the issue?

@mjbvz
Copy link
Contributor Author

mjbvz commented Oct 10, 2019

Thanks. If I monkey patch the TS source to set forceDts to true, It does seem to work. I can't figure out how to enable forceDts from our code however

@RyanCavanaugh RyanCavanaugh added the Needs Investigation This issue needs a team member to investigate its status. label Oct 14, 2019
@RyanCavanaugh RyanCavanaugh added this to the TypeScript 3.7.1 milestone Oct 14, 2019
sheetalkamat added a commit that referenced this issue Oct 15, 2019
@sheetalkamat sheetalkamat added Fix Available A PR has been opened for this issue and removed Needs Investigation This issue needs a team member to investigate its status. labels Oct 15, 2019
mjbvz added a commit to mjbvz/vscode that referenced this issue Oct 17, 2019
mjbvz added a commit to mjbvz/vscode that referenced this issue Oct 17, 2019
mjbvz added a commit to microsoft/vscode that referenced this issue Oct 17, 2019
* Re-enable building VS Code with TS 3.7

Reverts 5b0cdad

Blocked from check in due to microsoft/TypeScript#33936

* update d.ts for ts 3.7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fix Available A PR has been opened for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants