@@ -7,9 +7,6 @@ namespace ts {
77 /* @internal */ export let emitTime = 0 ;
88 /* @internal */ export let ioReadTime = 0 ;
99 /* @internal */ export let ioWriteTime = 0 ;
10- /* @internal */ export const maxProgramSizeForNonTsFiles = 20 * 1024 * 1024 ;
11-
12- /** The version of the TypeScript compiler release */
1310
1411 const emptyArray : any [ ] = [ ] ;
1512
@@ -19,6 +16,7 @@ namespace ts {
1916 "node_modules/@types/" ,
2017 ] ;
2118
19+ /** The version of the TypeScript compiler release */
2220 export const version = "1.9.0" ;
2321
2422 export function findConfigFile ( searchPath : string , fileExists : ( fileName : string ) => boolean ) : string {
@@ -1059,8 +1057,6 @@ namespace ts {
10591057 let diagnosticsProducingTypeChecker : TypeChecker ;
10601058 let noDiagnosticsTypeChecker : TypeChecker ;
10611059 let classifiableNames : Map < string > ;
1062- let programSizeLimitExceeded = false ;
1063- let programSizeForNonTsFiles = 0 ;
10641060
10651061 let resolvedTypeReferenceDirectives : Map < ResolvedTypeReferenceDirective > = { } ;
10661062 let fileProcessingDiagnostics = createDiagnosticCollection ( ) ;
@@ -1166,11 +1162,6 @@ namespace ts {
11661162
11671163 return program ;
11681164
1169- function exceedProgramSizeLimit ( ) {
1170- return ! options . disableSizeLimit && programSizeLimitExceeded ;
1171- }
1172-
1173-
11741165 function getCommonSourceDirectory ( ) {
11751166 if ( typeof commonSourceDirectory === "undefined" ) {
11761167 if ( options . rootDir && checkSourceFilesBelongToPath ( files , options . rootDir ) ) {
@@ -1219,7 +1210,6 @@ namespace ts {
12191210 ( oldOptions . noLib !== options . noLib ) ||
12201211 ( oldOptions . jsx !== options . jsx ) ||
12211212 ( oldOptions . allowJs !== options . allowJs ) ||
1222- ( oldOptions . disableSizeLimit !== options . disableSizeLimit ) ||
12231213 ( oldOptions . rootDir !== options . rootDir ) ||
12241214 ( oldOptions . typesSearchPaths !== options . typesSearchPaths ) ||
12251215 ( oldOptions . configFilePath !== options . configFilePath ) ||
@@ -1838,7 +1828,7 @@ namespace ts {
18381828 }
18391829 }
18401830
1841- if ( diagnostic && ! exceedProgramSizeLimit ( ) ) {
1831+ if ( diagnostic ) {
18421832 if ( refFile !== undefined && refEnd !== undefined && refPos !== undefined ) {
18431833 fileProcessingDiagnostics . add ( createFileDiagnostic ( refFile , refPos , refEnd - refPos , diagnostic , ...diagnosticArgument ) ) ;
18441834 }
@@ -1871,11 +1861,6 @@ namespace ts {
18711861 return file ;
18721862 }
18731863
1874- const isNonTsFile = ! hasTypeScriptFileExtension ( fileName ) ;
1875- if ( isNonTsFile && exceedProgramSizeLimit ( ) ) {
1876- return undefined ;
1877- }
1878-
18791864 // We haven't looked for this file, do so now and cache result
18801865 const file = host . getSourceFile ( fileName , options . target , hostErrorMessage => {
18811866 if ( refFile !== undefined && refPos !== undefined && refEnd !== undefined ) {
@@ -1887,25 +1872,6 @@ namespace ts {
18871872 }
18881873 } ) ;
18891874
1890- if ( ! options . disableSizeLimit && file && file . text && ! hasTypeScriptFileExtension ( file . fileName ) ) {
1891- programSizeForNonTsFiles += file . text . length ;
1892- if ( programSizeForNonTsFiles > maxProgramSizeForNonTsFiles ) {
1893- // If the program size limit was reached when processing a file, this file is
1894- // likely in the problematic folder than contains too many files.
1895- // Normally the folder is one level down from the commonSourceDirectory, for example,
1896- // if the commonSourceDirectory is "/src/", and the last processed path was "/src/node_modules/a/b.js",
1897- // we should show in the error message "/src/node_modules/".
1898- const commonSourceDirectory = getCommonSourceDirectory ( ) ;
1899- let rootLevelDirectory = path . substring ( 0 , Math . max ( commonSourceDirectory . length , path . indexOf ( directorySeparator , commonSourceDirectory . length ) ) ) ;
1900- if ( rootLevelDirectory [ rootLevelDirectory . length - 1 ] !== directorySeparator ) {
1901- rootLevelDirectory += directorySeparator ;
1902- }
1903- programDiagnostics . add ( createCompilerDiagnostic ( Diagnostics . Too_many_JavaScript_files_in_the_project_Consider_specifying_the_exclude_setting_in_project_configuration_to_limit_included_source_folders_The_likely_folder_to_exclude_is_0_To_disable_the_project_size_limit_set_the_disableSizeLimit_compiler_option_to_true , rootLevelDirectory ) ) ;
1904- programSizeLimitExceeded = true ;
1905- return undefined ;
1906- }
1907- }
1908-
19091875 filesByName . set ( path , file ) ;
19101876 if ( file ) {
19111877 file . path = path ;
0 commit comments