Document/rename flag used in compiler.

This commit is contained in:
Daniel Rosenwasser 2015-04-30 18:14:53 -07:00
parent e90849d643
commit d5d7f9f504
2 changed files with 13 additions and 6 deletions

View File

@ -143,18 +143,25 @@ module ts {
let files: SourceFile[] = [];
let filesByName: Map<SourceFile> = {};
let diagnostics = createDiagnosticCollection();
let seenNoDefaultLib = options.noLib;
let commonSourceDirectory: string;
let diagnosticsProducingTypeChecker: TypeChecker;
let noDiagnosticsTypeChecker: TypeChecker;
// shouldExcludeDefaultLib is true if:
// - The '--noLib' flag is used.
// - A 'no-default-lib' reference comment is encountered in
// processing the root files.
let shouldExcludeDefaultLib = options.noLib;
let start = new Date().getTime();
host = host || createCompilerHost(options);
forEach(rootNames, name => processRootFile(name, false));
if (!seenNoDefaultLib) {
processRootFile(host.getDefaultLibFileName(options), true);
forEach(rootNames, name => processRootFile(name, /*isDefaultLib */ false));
if (!shouldExcludeDefaultLib) {
processRootFile(host.getDefaultLibFileName(options), /*isDefaultLib*/ true);
}
verifyCompilerOptions();
programTime += new Date().getTime() - start;
@ -360,7 +367,7 @@ module ts {
}
});
if (file) {
seenNoDefaultLib = seenNoDefaultLib || file.hasNoDefaultLib;
shouldExcludeDefaultLib = shouldExcludeDefaultLib || file.hasNoDefaultLib;
// Set the source file for normalized absolute path
filesByName[canonicalAbsolutePath] = file;

View File

@ -75,7 +75,7 @@ module RWC {
});
// Add files to compilation
for(let fileRead of ioLog.filesRead) {
for (let fileRead of ioLog.filesRead) {
// Check if the file is already added into the set of input files.
var resolvedPath = ts.normalizeSlashes(ts.sys.resolvePath(fileRead.path));
var inInputList = ts.forEach(inputFiles, inputFile => inputFile.unitName === resolvedPath);