Skip to content

Turn on noEmit for inferred / external projects without ts files #11968

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

Closed
wants to merge 1 commit into from

Conversation

zhengbli
Copy link
Contributor

Fixes #11649

@@ -471,6 +471,15 @@ namespace ts.server {
// - newProgram is different from the old program and structure of the old program was not reused.
if (!oldProgram || (this.program !== oldProgram && !oldProgram.structureIsReused)) {
hasChanges = true;

const options = this.getCompilerOptions();
if ((this.projectKind === ProjectKind.Inferred || this.projectKind === ProjectKind.External) && !options.noEmit && allFilesAreJsOrDts(this)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updateGraphWorker doesn't seem to be the right place to be setting default options. Isn't there some other place we typically do this? Chat with Vlad/Mohamed about where setting this would best live (if you haven't already - in which case ignore me!).

@zhengbli
Copy link
Contributor Author

zhengbli commented Nov 1, 2016

As discussed offline, setting "noEmit" flag is not the optimal approach to solve this issue. A new proposal is posted at #11980

@zhengbli zhengbli closed this Nov 1, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants