|
| 1 | +Input:: |
| 2 | +//// [/lib/lib.d.ts] |
| 3 | +/// <reference no-default-lib="true"/> |
| 4 | +interface Boolean {} |
| 5 | +interface Function {} |
| 6 | +interface CallableFunction {} |
| 7 | +interface NewableFunction {} |
| 8 | +interface IArguments {} |
| 9 | +interface Number { toExponential: any; } |
| 10 | +interface Object {} |
| 11 | +interface RegExp {} |
| 12 | +interface String { charAt: any; } |
| 13 | +interface Array<T> { length: number; [n: number]: T; } |
| 14 | +interface ReadonlyArray<T> {} |
| 15 | +declare const console: { log(msg: any): void; }; |
| 16 | + |
| 17 | +//// [/src/core/index.ts] |
| 18 | +export const someString: string = "HELLO WORLD"; |
| 19 | +export function leftPad(s: string, n: number) { return s + n; } |
| 20 | +export function multiply(a: number, b: number) { return a * b; } |
| 21 | + |
| 22 | + |
| 23 | +//// [/src/core/some_decl.d.ts] |
| 24 | +declare const dts: any; |
| 25 | + |
| 26 | + |
| 27 | +//// [/src/core/tsconfig.json] |
| 28 | +{"compilerOptions":{"composite":true},"files":["anotherModule.ts","index.ts","some_decl.d.ts"]} |
| 29 | + |
| 30 | +//// [/src/logic/index.ts] |
| 31 | +import * as c from '../core/index'; |
| 32 | +export function getSecondsInDay() { |
| 33 | + return c.multiply(10, 15); |
| 34 | +} |
| 35 | +import * as mod from '../core/anotherModule'; |
| 36 | +export const m = mod; |
| 37 | + |
| 38 | + |
| 39 | +//// [/src/logic/tsconfig.json] |
| 40 | +{ |
| 41 | + "compilerOptions": { |
| 42 | + "composite": true, |
| 43 | + "declaration": true, |
| 44 | + "sourceMap": true, |
| 45 | + "forceConsistentCasingInFileNames": true, |
| 46 | + "skipDefaultLibCheck": true |
| 47 | + }, |
| 48 | + "references": [ |
| 49 | + { "path": "../core" } |
| 50 | + ] |
| 51 | +} |
| 52 | + |
| 53 | + |
| 54 | +//// [/src/tests/index.ts] |
| 55 | +import * as c from '../core/index'; |
| 56 | +import * as logic from '../logic/index'; |
| 57 | + |
| 58 | +c.leftPad("", 10); |
| 59 | +logic.getSecondsInDay(); |
| 60 | + |
| 61 | +import * as mod from '../core/anotherModule'; |
| 62 | +export const m = mod; |
| 63 | + |
| 64 | + |
| 65 | +//// [/src/tests/tsconfig.json] |
| 66 | +{ |
| 67 | + "references": [ |
| 68 | + { "path": "../core" }, |
| 69 | + { "path": "../logic" } |
| 70 | + ], |
| 71 | + "files": ["index.ts"], |
| 72 | + "compilerOptions": { |
| 73 | + "composite": true, |
| 74 | + "declaration": true, |
| 75 | + "forceConsistentCasingInFileNames": true, |
| 76 | + "skipDefaultLibCheck": true |
| 77 | + } |
| 78 | +} |
| 79 | + |
| 80 | +//// [/src/ui/index.ts] |
| 81 | +import * as logic from '../logic'; |
| 82 | + |
| 83 | +export function run() { |
| 84 | + console.log(logic.getSecondsInDay()); |
| 85 | +} |
| 86 | + |
| 87 | + |
| 88 | +//// [/src/ui/tsconfig.json] |
| 89 | +{ |
| 90 | + "compilerOptions": { |
| 91 | + "skipDefaultLibCheck": true |
| 92 | + }, |
| 93 | + "references": [ |
| 94 | + { "path": "../logic/index" } |
| 95 | + ] |
| 96 | +} |
| 97 | + |
| 98 | + |
| 99 | + |
| 100 | + |
| 101 | +Output:: |
| 102 | +/lib/tsc --b /src/tests --v --f |
| 103 | +[[90m12:00:08 AM[0m] Projects in this build: |
| 104 | + * src/core/tsconfig.json |
| 105 | + * src/logic/tsconfig.json |
| 106 | + * src/tests/tsconfig.json |
| 107 | + |
| 108 | +[[90m12:00:09 AM[0m] Failed to parse file 'src/core/tsconfig.json': /src/core/anotherModule.ts does not exist. |
| 109 | + |
| 110 | +[[90m12:00:10 AM[0m] Building project '/src/core/tsconfig.json'... |
| 111 | + |
| 112 | +[91merror[0m[90m TS6053: [0mFile '/src/core/anotherModule.ts' not found. |
| 113 | + The file is in the program because: |
| 114 | + Part of 'files' list in tsconfig.json |
| 115 | + |
| 116 | + [96msrc/core/tsconfig.json[0m:[93m1[0m:[93m48[0m |
| 117 | + [7m1[0m {"compilerOptions":{"composite":true},"files":["anotherModule.ts","index.ts","some_decl.d.ts"]} |
| 118 | + [7m [0m [96m ~~~~~~~~~~~~~~~~~~[0m |
| 119 | + File is matched by 'files' list specified here. |
| 120 | + |
| 121 | +[[90m12:00:13 AM[0m] Project 'src/logic/tsconfig.json' can't be built because its dependency 'src/core' has errors |
| 122 | + |
| 123 | +[[90m12:00:14 AM[0m] Skipping build of project '/src/logic/tsconfig.json' because its dependency '/src/core' has errors |
| 124 | + |
| 125 | +[[90m12:00:15 AM[0m] Project 'src/tests/tsconfig.json' can't be built because its dependency 'src/core' has errors |
| 126 | + |
| 127 | +[[90m12:00:16 AM[0m] Skipping build of project '/src/tests/tsconfig.json' because its dependency '/src/core' has errors |
| 128 | + |
| 129 | + |
| 130 | +Found 1 error. |
| 131 | + |
| 132 | +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped |
| 133 | + |
| 134 | +getModifiedTime:: { |
| 135 | + "/src/core/anotherModule.ts": 1 |
| 136 | +} |
| 137 | + |
| 138 | +setModifiedTime:: {} |
| 139 | + |
| 140 | +fileExists:: {} |
| 141 | + |
| 142 | +directoryExists:: { |
| 143 | + "/src/core/node_modules/@types": 1, |
| 144 | + "/src/node_modules/@types": 1, |
| 145 | + "/node_modules/@types": 1 |
| 146 | +} |
| 147 | + |
| 148 | + |
| 149 | +//// [/src/core/tsconfig.tsbuildinfo] |
| 150 | +{"program":{"fileNames":["../../lib/lib.d.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };","signature":false,"affectsGlobalScope":true},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":false},{"version":"-9253692965-declare const dts: any;\r\n","signature":false,"affectsGlobalScope":true}],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"changeFileSet":[1,2,3]},"version":"FakeTSVersion"} |
| 151 | + |
| 152 | +//// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] |
| 153 | +{ |
| 154 | + "program": { |
| 155 | + "fileNames": [ |
| 156 | + "../../lib/lib.d.ts", |
| 157 | + "./index.ts", |
| 158 | + "./some_decl.d.ts" |
| 159 | + ], |
| 160 | + "fileInfos": { |
| 161 | + "../../lib/lib.d.ts": { |
| 162 | + "version": "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };", |
| 163 | + "affectsGlobalScope": true |
| 164 | + }, |
| 165 | + "./index.ts": { |
| 166 | + "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" |
| 167 | + }, |
| 168 | + "./some_decl.d.ts": { |
| 169 | + "version": "-9253692965-declare const dts: any;\r\n", |
| 170 | + "affectsGlobalScope": true |
| 171 | + } |
| 172 | + }, |
| 173 | + "options": { |
| 174 | + "composite": true |
| 175 | + }, |
| 176 | + "referencedMap": {}, |
| 177 | + "exportedModulesMap": {}, |
| 178 | + "changeFileSet": [ |
| 179 | + "../../lib/lib.d.ts", |
| 180 | + "./index.ts", |
| 181 | + "./some_decl.d.ts" |
| 182 | + ] |
| 183 | + }, |
| 184 | + "version": "FakeTSVersion", |
| 185 | + "size": 1046 |
| 186 | +} |
| 187 | + |
0 commit comments