Skip to content

Project references transitional: Remove reference comments #23354

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 15 commits into from
Apr 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 5 additions & 86 deletions Jakefile.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,93 +87,10 @@ var typingsInstallerSources = filesFromConfig(path.join(serverDirectory, "typing
var watchGuardSources = filesFromConfig(path.join(serverDirectory, "watchGuard/tsconfig.json"));
var serverSources = filesFromConfig(path.join(serverDirectory, "tsconfig.json"));
var languageServiceLibrarySources = filesFromConfig(path.join(serverDirectory, "tsconfig.library.json"));
var harnessSources = filesFromConfig("./src/harness/tsconfig.json");

var typesMapOutputPath = path.join(builtLocalDirectory, 'typesMap.json');

var harnessCoreSources = [
"harness.ts",
"virtualFileSystem.ts",
"virtualFileSystemWithWatch.ts",
"sourceMapRecorder.ts",
"harnessLanguageService.ts",
"fourslash.ts",
"runnerbase.ts",
"compilerRunner.ts",
"typeWriter.ts",
"fourslashRunner.ts",
"projectsRunner.ts",
"loggedIO.ts",
"rwcRunner.ts",
"externalCompileRunner.ts",
"test262Runner.ts",
"./parallel/shared.ts",
"./parallel/host.ts",
"./parallel/worker.ts",
"runner.ts"
].map(function (f) {
return path.join(harnessDirectory, f);
});

var harnessSources = harnessCoreSources.concat([
"base64.ts",
"incrementalParser.ts",
"jsDocParsing.ts",
"services/colorization.ts",
"services/documentRegistry.ts",
"services/preProcessFile.ts",
"services/patternMatcher.ts",
"session.ts",
"versionCache.ts",
"convertToBase64.ts",
"transpile.ts",
"reuseProgramStructure.ts",
"textStorage.ts",
"moduleResolution.ts",
"tsconfigParsing.ts",
"asserts.ts",
"builder.ts",
"commandLineParsing.ts",
"configurationExtension.ts",
"convertCompilerOptionsFromJson.ts",
"convertTypeAcquisitionFromJson.ts",
"tsserverProjectSystem.ts",
"tscWatchMode.ts",
"compileOnSave.ts",
"typingsInstaller.ts",
"projectErrors.ts",
"matchFiles.ts",
"organizeImports.ts",
"initializeTSConfig.ts",
"extractConstants.ts",
"extractFunctions.ts",
"extractRanges.ts",
"extractTestHelpers.ts",
"printer.ts",
"textChanges.ts",
"telemetry.ts",
"transform.ts",
"customTransforms.ts",
"programMissingFiles.ts",
"programNoParseFalsyFileNames.ts",
"symbolWalker.ts",
"languageService.ts",
"publicApi.ts",
"hostNewLineSupport.ts",
].map(function (f) {
return path.join(unittestsDirectory, f);
})).concat([
"protocol.ts",
"utilities.ts",
"scriptVersionCache.ts",
"scriptInfo.ts",
"project.ts",
"typingsCache.ts",
"editorServices.ts",
"session.ts",
].map(function (f) {
return path.join(serverDirectory, f);
}));

var es2015LibrarySources = [
"es2015.core.d.ts",
"es2015.collection.d.ts",
Expand Down Expand Up @@ -451,6 +368,8 @@ task("lib", libraryTargets);
// Generate diagnostics
var processDiagnosticMessagesJs = path.join(scriptsDirectory, "processDiagnosticMessages.js");
var processDiagnosticMessagesTs = path.join(scriptsDirectory, "processDiagnosticMessages.ts");
var processDiagnosticMessagesSources = filesFromConfig("./scripts/processDiagnosticMessages.tsconfig.json");

var diagnosticMessagesJson = path.join(compilerDirectory, "diagnosticMessages.json");
var diagnosticInfoMapTs = path.join(compilerDirectory, "diagnosticInformationMap.generated.ts");
var generatedDiagnosticMessagesJSON = path.join(compilerDirectory, "diagnosticMessages.generated.json");
Expand All @@ -460,8 +379,8 @@ file(processDiagnosticMessagesTs);

// processDiagnosticMessages script
compileFile(processDiagnosticMessagesJs,
[processDiagnosticMessagesTs],
[processDiagnosticMessagesTs],
processDiagnosticMessagesSources,
processDiagnosticMessagesSources,
[],
/*useBuiltCompiler*/ false);

Expand Down
4 changes: 0 additions & 4 deletions scripts/processDiagnosticMessages.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/// <reference path="../src/compiler/sys.ts" />
/// <reference path="../src/compiler/core.ts" />

interface DiagnosticDetails {
category: string;
code: number;
Expand Down Expand Up @@ -57,7 +54,6 @@ function buildInfoFileOutput(messageTable: InputDiagnosticMessageTable, inputFil
let result =
"// <auto-generated />\r\n" +
"// generated from '" + inputFilePathRel + "' by '" + thisFilePathRel + "'\r\n" +
"/// <reference path=\"types.ts\" />\r\n" +
"/* @internal */\r\n" +
"namespace ts {\r\n" +
" function diag(code: number, category: DiagnosticCategory, key: string, message: string, reportsUnnecessary?: {}): DiagnosticMessage {\r\n" +
Expand Down
56 changes: 56 additions & 0 deletions scripts/processDiagnosticMessages.tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"compilerOptions": {
"removeComments": false,
"outFile": "processDiagnosticMessages.js",
"target": "es5",
"declaration": false,
"lib": [
"es6",
"scripthost"
]
},
"files": [
"../src/compiler/types.ts",
"../src/compiler/performance.ts",
"../src/compiler/core.ts",
"../src/compiler/sys.ts",
"../src/compiler/diagnosticInformationMap.generated.ts",
"../src/compiler/scanner.ts",
"../src/compiler/utilities.ts",
"../src/compiler/parser.ts",
"../src/compiler/binder.ts",
"../src/compiler/symbolWalker.ts",
"../src/compiler/moduleNameResolver.ts",
"../src/compiler/checker.ts",
"../src/compiler/factory.ts",
"../src/compiler/visitor.ts",
"../src/compiler/transformers/utilities.ts",
"../src/compiler/transformers/destructuring.ts",
"../src/compiler/transformers/ts.ts",
"../src/compiler/transformers/es2017.ts",
"../src/compiler/transformers/esnext.ts",
"../src/compiler/transformers/jsx.ts",
"../src/compiler/transformers/es2016.ts",
"../src/compiler/transformers/es2015.ts",
"../src/compiler/transformers/es5.ts",
"../src/compiler/transformers/generators.ts",
"../src/compiler/transformers/module/module.ts",
"../src/compiler/transformers/module/system.ts",
"../src/compiler/transformers/module/es2015.ts",
"../src/compiler/transformers/declarations/diagnostics.ts",
"../src/compiler/transformers/declarations.ts",
"../src/compiler/transformer.ts",
"../src/compiler/sourcemap.ts",
"../src/compiler/comments.ts",
"../src/compiler/emitter.ts",
"../src/compiler/watchUtilities.ts",
"../src/compiler/program.ts",
"../src/compiler/builderState.ts",
"../src/compiler/builder.ts",
"../src/compiler/resolutionCache.ts",
"../src/compiler/watch.ts",
"../src/compiler/commandLineParser.ts",

"processDiagnosticMessages.ts"
Copy link
Member

Choose a reason for hiding this comment

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

Also need to change processDiagnosticMessages.ts to not include reference path in generated diagnostics file https://github.com/Microsoft/TypeScript/blob/master/scripts/processDiagnosticMessages.ts#L60

]
}
3 changes: 0 additions & 3 deletions src/compiler/binder.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/// <reference path="utilities.ts"/>
/// <reference path="parser.ts"/>

/* @internal */
namespace ts {
export const enum ModuleInstanceState {
Expand Down
2 changes: 0 additions & 2 deletions src/compiler/builder.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/// <reference path="builderState.ts" />

/*@internal*/
namespace ts {
/**
Expand Down
1 change: 0 additions & 1 deletion src/compiler/builderState.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/// <reference path="program.ts" />
namespace ts {
export interface EmitOutput {
outputFiles: OutputFile[];
Expand Down
4 changes: 0 additions & 4 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/// <reference path="moduleNameResolver.ts"/>
/// <reference path="binder.ts"/>
/// <reference path="symbolWalker.ts" />

/* @internal */
namespace ts {
const ambientModuleSymbolRegex = /^".+"$/;
Expand Down
6 changes: 0 additions & 6 deletions src/compiler/commandLineParser.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
/// <reference path="sys.ts"/>
/// <reference path="types.ts"/>
/// <reference path="core.ts"/>
/// <reference path="diagnosticInformationMap.generated.ts"/>
/// <reference path="parser.ts"/>

namespace ts {
/* @internal */
export const compileOnSaveCommandLineOption: CommandLineOption = { name: "compileOnSave", type: "boolean" };
Expand Down
2 changes: 0 additions & 2 deletions src/compiler/comments.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/// <reference path="sourcemap.ts" />

/* @internal */
namespace ts {
export interface CommentWriter {
Expand Down
3 changes: 0 additions & 3 deletions src/compiler/core.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/// <reference path="types.ts"/>
/// <reference path="performance.ts" />

namespace ts {
// WARNING: The script `configureNightly.ts` uses a regexp to parse out these values.
// If changing the text in this section, be sure to test `configureNightly` too.
Expand Down
5 changes: 0 additions & 5 deletions src/compiler/emitter.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/// <reference path="checker.ts" />
/// <reference path="transformer.ts" />
/// <reference path="sourcemap.ts" />
/// <reference path="comments.ts" />

namespace ts {
const brackets = createBracketsMap();

Expand Down
3 changes: 0 additions & 3 deletions src/compiler/factory.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/// <reference path="core.ts"/>
/// <reference path="utilities.ts"/>

namespace ts {
function createSynthesizedNode(kind: SyntaxKind): Node {
const node = createNode(kind, -1, -1);
Expand Down
3 changes: 0 additions & 3 deletions src/compiler/moduleNameResolver.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/// <reference path="core.ts" />
/// <reference path="diagnosticInformationMap.generated.ts" />

namespace ts {
/* @internal */
export function trace(host: ModuleResolutionHost, message: DiagnosticMessage, ...args: any[]): void;
Expand Down
3 changes: 0 additions & 3 deletions src/compiler/parser.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/// <reference path="utilities.ts"/>
/// <reference path="scanner.ts"/>

namespace ts {
const enum SignatureFlags {
None = 0,
Expand Down
4 changes: 0 additions & 4 deletions src/compiler/program.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/// <reference path="sys.ts" />
/// <reference path="emitter.ts" />
/// <reference path="core.ts" />

namespace ts {
const ignoreDiagnosticCommentRegEx = /(^\s*$)|(^\s*\/\/\/?\s*(@ts-ignore)?)/;

Expand Down
4 changes: 0 additions & 4 deletions src/compiler/resolutionCache.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/// <reference path="types.ts"/>
/// <reference path="core.ts"/>
/// <reference path="watchUtilities.ts"/>

/*@internal*/
namespace ts {
/** This is the cache of module/typedirectives resolution that can be retained across program */
Expand Down
3 changes: 0 additions & 3 deletions src/compiler/scanner.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/// <reference path="core.ts"/>
/// <reference path="diagnosticInformationMap.generated.ts"/>

namespace ts {
export type ErrorCallback = (message: DiagnosticMessage, length: number) => void;

Expand Down
2 changes: 0 additions & 2 deletions src/compiler/sourcemap.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/// <reference path="checker.ts"/>

/* @internal */
namespace ts {
export interface SourceMapWriter {
Expand Down
2 changes: 0 additions & 2 deletions src/compiler/sys.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/// <reference path="core.ts"/>

declare function setTimeout(handler: (...args: any[]) => void, timeout: number): any;
declare function clearTimeout(handle: any): void;

Expand Down
15 changes: 0 additions & 15 deletions src/compiler/transformer.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
/// <reference path="visitor.ts" />
/// <reference path="transformers/utilities.ts" />
/// <reference path="transformers/ts.ts" />
/// <reference path="transformers/jsx.ts" />
/// <reference path="transformers/esnext.ts" />
/// <reference path="transformers/es2017.ts" />
/// <reference path="transformers/es2016.ts" />
/// <reference path="transformers/es2015.ts" />
/// <reference path="transformers/generators.ts" />
/// <reference path="transformers/es5.ts" />
/// <reference path="transformers/module/module.ts" />
/// <reference path="transformers/module/system.ts" />
/// <reference path="transformers/module/es2015.ts" />
/// <reference path="transformers/declarations.ts" />

/* @internal */
namespace ts {
function getModuleTransformer(moduleKind: ModuleKind): TransformerFactory<SourceFile> {
Expand Down
4 changes: 0 additions & 4 deletions src/compiler/transformers/declarations.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/// <reference path="../factory.ts" />
/// <reference path="../visitor.ts" />
/// <reference path="./declarations/diagnostics.ts" />

/*@internal*/
namespace ts {
export function getDeclarationDiagnostics(host: EmitHost, resolver: EmitResolver, file: SourceFile | undefined): Diagnostic[] {
Expand Down
3 changes: 0 additions & 3 deletions src/compiler/transformers/destructuring.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/// <reference path="../factory.ts" />
/// <reference path="../visitor.ts" />

/*@internal*/
namespace ts {
interface FlattenContext {
Expand Down
4 changes: 0 additions & 4 deletions src/compiler/transformers/es2015.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/// <reference path="../factory.ts" />
/// <reference path="../visitor.ts" />
/// <reference path="./destructuring.ts" />

/*@internal*/
namespace ts {
const enum ES2015SubstitutionFlags {
Expand Down
3 changes: 0 additions & 3 deletions src/compiler/transformers/es2016.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/// <reference path="../factory.ts" />
/// <reference path="../visitor.ts" />

/*@internal*/
namespace ts {
export function transformES2016(context: TransformationContext) {
Expand Down
3 changes: 0 additions & 3 deletions src/compiler/transformers/es2017.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/// <reference path="../factory.ts" />
/// <reference path="../visitor.ts" />

/*@internal*/
namespace ts {
type SuperContainer = ClassDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | ConstructorDeclaration;
Expand Down
3 changes: 0 additions & 3 deletions src/compiler/transformers/es5.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/// <reference path="../factory.ts" />
/// <reference path="../visitor.ts" />

/*@internal*/
namespace ts {
/**
Expand Down
4 changes: 0 additions & 4 deletions src/compiler/transformers/esnext.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/// <reference path="../factory.ts" />
/// <reference path="../visitor.ts" />
/// <reference path="es2017.ts" />

/*@internal*/
namespace ts {
const enum ESNextSubstitutionFlags {
Expand Down
3 changes: 0 additions & 3 deletions src/compiler/transformers/generators.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/// <reference path="../factory.ts" />
/// <reference path="../visitor.ts" />

// Transforms generator functions into a compatible ES5 representation with similar runtime
// semantics. This is accomplished by first transforming the body of each generator
// function into an intermediate representation that is the compiled into a JavaScript
Expand Down
4 changes: 0 additions & 4 deletions src/compiler/transformers/jsx.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/// <reference path="../factory.ts" />
/// <reference path="../visitor.ts" />
/// <reference path="./esnext.ts" />

/*@internal*/
namespace ts {
export function transformJsx(context: TransformationContext) {
Expand Down
3 changes: 0 additions & 3 deletions src/compiler/transformers/module/es2015.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/// <reference path="../../factory.ts" />
/// <reference path="../../visitor.ts" />

/*@internal*/
namespace ts {
export function transformES2015Module(context: TransformationContext) {
Expand Down
Loading