Skip to content

Add -noEmit compiler flag that skips the emit stage in ts.compile()#1501

Merged
DanielRosenwasser merged 4 commits into
microsoft:masterfrom
Arnavion:no-emit
Dec 18, 2014
Merged

Add -noEmit compiler flag that skips the emit stage in ts.compile()#1501
DanielRosenwasser merged 4 commits into
microsoft:masterfrom
Arnavion:no-emit

Conversation

@Arnavion
Copy link
Copy Markdown
Contributor

Fixes #1172

I'm not sure about the third commit. -out and -outDir are optional to begin with, and a lot of the other options also don't make sense when not emitting - -emitBOM, -mapRoot, -module, -preserveConstEnums, -removeComments, -sourceMap, -sourceRoot. Should it check for all these parameters? Or just give -noEmit precedence and silently ignore them (i.e. just the first two commits)?

Comment thread src/compiler/tsc.ts Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please move this to verifyCompilerOptions in parser.ts

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

@mhegazy
Copy link
Copy Markdown
Contributor

mhegazy commented Dec 17, 2014

👍

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

"Option 'noEmit' cannot be specified with options 'out' or 'outDir'."

Actually, I see that this is not consistent with other messages. I'll take care of this myself.

DanielRosenwasser added a commit that referenced this pull request Dec 18, 2014
Add -noEmit compiler flag that skips the emit stage in ts.compile()
@DanielRosenwasser DanielRosenwasser merged commit 6fed3e2 into microsoft:master Dec 18, 2014
@DanielRosenwasser
Copy link
Copy Markdown
Member

Thanks!

@Arnavion Arnavion deleted the no-emit branch December 18, 2014 03:41
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 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.

Suggestion: enable a dry-run when the compiler doesn't emit code but does static checking.

3 participants