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

Forbid simultaneous noEmit and incremental #32882

Closed
weswigham opened this issue Aug 14, 2019 · 7 comments · Fixed by #32887, #36483 or #36488
Closed

Forbid simultaneous noEmit and incremental #32882

weswigham opened this issue Aug 14, 2019 · 7 comments · Fixed by #32887, #36483 or #36488
Assignees
Labels
Bug A bug in TypeScript Fix Available A PR has been opened for this issue

Comments

@weswigham
Copy link
Member

noEmit stops us from emitting any files (both bundle info and declarations). incremental needs both of those. When both are set together today, all it does is force on declaration emit and then discard all the extra work done. As such, using the two together should trigger an error.

Related: #30661

@RyanCavanaugh
Copy link
Member

Should we just roll this up into the other bug?

@weswigham
Copy link
Member Author

Maybe? That one had opinions like "we should emit the bundle info path if a path is expressly given" - I'd just like to see an error if these two options are simultaneously specified right now, as it definitely doesn't do what you want.

@sheetalkamat sheetalkamat self-assigned this Aug 14, 2019
sheetalkamat added a commit that referenced this issue Aug 14, 2019
@sheetalkamat sheetalkamat added the Fix Available A PR has been opened for this issue label Aug 14, 2019
sheetalkamat added a commit that referenced this issue Aug 14, 2019
timsuchanek pushed a commit to timsuchanek/TypeScript that referenced this issue Sep 11, 2019
@sheetalkamat sheetalkamat reopened this Oct 10, 2019
@sheetalkamat
Copy link
Member

#33883 reverted the fix so this needs to be re opened

@sheetalkamat sheetalkamat removed the Fix Available A PR has been opened for this issue label Oct 10, 2019
@RyanCavanaugh RyanCavanaugh added this to the TypeScript 3.8.0 milestone Oct 14, 2019
@RyanCavanaugh RyanCavanaugh added the Bug A bug in TypeScript label Oct 14, 2019
@sheetalkamat
Copy link
Member

I am not sure if we want to do this or not.. Given that older vs versions will still use --noEmit --listFiles as part of build. I am not sure if distinguishing listFiles as special option is good or bad.

@sheetalkamat
Copy link
Member

cc: @RyanCavanaugh @DanielRosenwasser @uniqueiniquity @amcasey @minestarks to chime in what we should do here..

@sheetalkamat sheetalkamat added the Needs More Info The issue still hasn't been fully clarified label Jan 28, 2020
@amcasey
Copy link
Member

amcasey commented Jan 28, 2020

I frequently get confused about how this works (so @uniqueiniquity can correct me), but I think the msbuild code that passes those flags is rev'd with the compiler so there's no danger of running a new compiler (i.e. one that will warn/error) with an old build task/target (i.e. one that will trigger the warning/error).

@sheetalkamat
Copy link
Member

Thanks.. Will add this fix then

sheetalkamat added a commit that referenced this issue Jan 28, 2020
@sheetalkamat sheetalkamat added Fix Available A PR has been opened for this issue and removed Needs More Info The issue still hasn't been fully clarified labels Jan 28, 2020
sheetalkamat added a commit that referenced this issue Jan 28, 2020
i-like-robots added a commit to Financial-Times/dotcom-page-kit that referenced this issue Feb 25, 2020
…flict with --noEmit flag

Since TS v3.8.2 the `--noEmit` flag cannot be used in conjuction with the `incremental` compiler option.

microsoft/TypeScript#32882

We currently use the `--noEmit` flag to quickly run a type check on pre-commit and the `incremental` option for all our TS to JS compilation.

I'd like to maintain this setup so that we do not have to compile code on commit, nor slow down builds by forcing them to run from scratch each time.

To do this I have removed the incremental flag from the root TS config and appended the flag to each `tsc` script specified by each package.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Fix Available A PR has been opened for this issue
Projects
None yet
4 participants