Skip to content

Commit 5804905

Browse files
committed
Jakefile rewrite WIP
1 parent 8033f2e commit 5804905

8 files changed

Lines changed: 420 additions & 947 deletions

File tree

Jakefile.js

Lines changed: 408 additions & 927 deletions
Large diffs are not rendered by default.

src/compiler/program.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ namespace ts {
349349

350350
output += host.getNewLine();
351351
}
352-
return output + host.getNewLine();
352+
return output;
353353
}
354354

355355
export function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain | undefined, newLine: string): string {

src/compiler/resolutionCache.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ namespace ts {
3333
resolvedFileName: string | undefined;
3434
}
3535

36-
interface CachedResolvedModuleWithFailedLookupLocations extends ts.ResolvedModuleWithFailedLookupLocations, ResolutionWithFailedLookupLocations {
36+
interface CachedResolvedModuleWithFailedLookupLocations extends ResolvedModuleWithFailedLookupLocations, ResolutionWithFailedLookupLocations {
3737
}
3838

39-
interface ResolvedTypeReferenceDirectiveWithFailedLookupLocations extends ts.ResolvedTypeReferenceDirectiveWithFailedLookupLocations, ResolutionWithFailedLookupLocations {
39+
interface CachedResolvedTypeReferenceDirectiveWithFailedLookupLocations extends ResolvedTypeReferenceDirectiveWithFailedLookupLocations, ResolutionWithFailedLookupLocations {
4040
}
4141

4242
export interface ResolutionCacheHost extends ModuleResolutionHost {
@@ -95,8 +95,8 @@ namespace ts {
9595
resolutionHost.getCanonicalFileName
9696
);
9797

98-
const resolvedTypeReferenceDirectives = createMap<Map<ResolvedTypeReferenceDirectiveWithFailedLookupLocations>>();
99-
const perDirectoryResolvedTypeReferenceDirectives = createMap<Map<ResolvedTypeReferenceDirectiveWithFailedLookupLocations>>();
98+
const resolvedTypeReferenceDirectives = createMap<Map<CachedResolvedTypeReferenceDirectiveWithFailedLookupLocations>>();
99+
const perDirectoryResolvedTypeReferenceDirectives = createMap<Map<CachedResolvedTypeReferenceDirectiveWithFailedLookupLocations>>();
100100

101101
/**
102102
* These are the extensions that failed lookup files will have by default,
@@ -137,7 +137,7 @@ namespace ts {
137137
return resolution.resolvedModule;
138138
}
139139

140-
function getResolvedTypeReferenceDirective(resolution: ResolvedTypeReferenceDirectiveWithFailedLookupLocations) {
140+
function getResolvedTypeReferenceDirective(resolution: CachedResolvedTypeReferenceDirectiveWithFailedLookupLocations) {
141141
return resolution.resolvedTypeReferenceDirective;
142142
}
143143

@@ -319,7 +319,7 @@ namespace ts {
319319
}
320320

321321
function resolveTypeReferenceDirectives(typeDirectiveNames: string[], containingFile: string): ResolvedTypeReferenceDirective[] {
322-
return resolveNamesWithLocalCache<ResolvedTypeReferenceDirectiveWithFailedLookupLocations, ResolvedTypeReferenceDirective>(
322+
return resolveNamesWithLocalCache<CachedResolvedTypeReferenceDirectiveWithFailedLookupLocations, ResolvedTypeReferenceDirective>(
323323
typeDirectiveNames, containingFile,
324324
resolvedTypeReferenceDirectives, perDirectoryResolvedTypeReferenceDirectives,
325325
resolveTypeReferenceDirective, getResolvedTypeReferenceDirective,

src/core/core.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ namespace ts {
6262
export interface Push<T> {
6363
push(...values: T[]): void;
6464
}
65-
65+
6666
/** Create a MapLike with good performance. */
6767
function createDictionaryObject<T>(): MapLike<T> {
6868
const map = Object.create(/*prototype*/ null); // tslint:disable-line:no-null-keyword

src/harness/fourslash.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ namespace FourSlash {
99
ShimsWithPreprocess,
1010
Server
1111
}
12-
13-
12+
1413
// Represents a parsed source file with metadata
1514
interface FourSlashFile {
1615
// The contents of the file (with markers, etc stripped out)

src/harness/harness.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ var assert: typeof _chai.assert = _chai.assert;
77
{
88
// chai's builtin `assert.isFalse` is featureful but slow - we don't use those features,
99
// so we'll just overwrite it as an alterative to migrating a bunch of code off of chai
10-
assert.isFalse = (expr, msg) => { if (expr as any as boolean !== false) throw new Error(msg); };
10+
assert.isFalse = (expr: any, msg: string) => { if (expr !== false) throw new Error(msg); };
1111

1212
const assertDeepImpl = assert.deepEqual;
1313
assert.deepEqual = (a, b, msg) => {

src/parser/utilities.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6818,7 +6818,7 @@ namespace ts {
68186818

68196819
lastChain.next = tailChain;
68206820
return headChain;
6821-
}
6821+
}
68226822

68236823
function getDiagnosticFilePath(diagnostic: Diagnostic): string | undefined {
68246824
return diagnostic.file ? diagnostic.file.path : undefined;
@@ -6924,12 +6924,6 @@ namespace ts {
69246924
return true;
69256925
}
69266926

6927-
6928-
6929-
//
6930-
// Paths
6931-
//
6932-
69336927
/**
69346928
* Internally, we represent paths as strings with '/' as the directory separator.
69356929
* When we make system calls (eg: LanguageServiceHost.getDirectory()),
@@ -6938,7 +6932,6 @@ namespace ts {
69386932
export const directorySeparator = "/";
69396933
const altDirectorySeparator = "\\";
69406934
const urlSchemeSeparator = "://";
6941-
69426935
const backslashRegExp = /\\/g;
69436936

69446937
/**

src/server/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"extends": "../tsconfig-base",
33
"compilerOptions": {
44
"removeComments": true,
5-
"outFile": "../../built/local/tsserverlibrary.js",
5+
"outFile": "../../built/local/server.js",
66
"preserveConstEnums": true,
77
"types": [
88
"node"

0 commit comments

Comments
 (0)