Skip to content

Allow --incremental from command line #30513

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

Merged
merged 7 commits into from
Mar 29, 2019
Merged

Conversation

sheetalkamat
Copy link
Member

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

@@ -2722,6 +2722,10 @@ namespace ts {
createDiagnosticForOptionName(Diagnostics.Option_paths_cannot_be_used_without_specifying_baseUrl_option, "paths");
}

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

@sheetalkamat sheetalkamat merged commit 025d826 into master Mar 29, 2019
@sheetalkamat sheetalkamat deleted the incrementalFromCommandLine branch March 29, 2019 22:06
@weswigham
Copy link
Member

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

@sheetalkamat
Copy link
Member Author

@RyanCavanaugh @DanielRosenwasser Do we want this for 3.4.2 ?

@RyanCavanaugh
Copy link
Member

I think it can wait for 3.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants