Skip to content

Allow --incremental from command line#30513

Merged
sheetalkamat merged 7 commits into
masterfrom
incrementalFromCommandLine
Mar 29, 2019
Merged

Allow --incremental from command line#30513
sheetalkamat merged 7 commits into
masterfrom
incrementalFromCommandLine

Conversation

@sheetalkamat
Copy link
Copy Markdown
Member

@RyanCavanaugh @DanielRosenwasser Please see if this is something we want to do.

Comment thread src/compiler/diagnosticMessages.json Outdated
Comment thread src/compiler/program.ts Outdated
}

if (options.incremental && !options.configFilePath) {
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_incremental_can_only_be_specified_when_using_tsconfig));
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.

Why does this restriction exist? Is it to determine the name of the .tsbuildinfo file based on the path of the tsconfig.json?
That would make it impossible for API users to use the incremental option if they don't use parseJsonConfigFileContent (or one of the countless similar functions) to create their compilerOptions because configFilePath is typically not set.

Would it make sense to allow incremental if either configFilePath or tsBuildInfoFile is defined?

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.

Agree - would be very nice to just specify a metadata location and then not need a tsconfig. Actually, we probably need that capability to support --incremental in Visual Studio.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@RyanCavanaugh @DanielRosenwasser What do you think. In that case we would want to make tsBuildInfoFile as command line argument.

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.

The release announcement made it look like there was already a --tsBuildInfoFile CLI option

Copy link
Copy Markdown
Member

@weswigham weswigham left a comment

Choose a reason for hiding this comment

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

Needs a test with incremental and tsBuildInfoFile set, but not out and no config file.

Comment thread src/compiler/program.ts
@sheetalkamat sheetalkamat merged commit 025d826 into master Mar 29, 2019
@sheetalkamat sheetalkamat deleted the incrementalFromCommandLine branch March 29, 2019 22:06
@weswigham
Copy link
Copy Markdown
Member

@sheetalkamat are we planning on porting this to a 3.4.2, or just leaving it for 3.5 only?

@sheetalkamat
Copy link
Copy Markdown
Member Author

@RyanCavanaugh @DanielRosenwasser Do we want this for 3.4.2 ?

@RyanCavanaugh
Copy link
Copy Markdown
Member

I think it can wait for 3.5

@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
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.

5 participants