mirror of
https://github.com/denoland/deno.git
synced 2024-11-22 15:06:54 -05:00
3cbd1075c7
This commit adds incremental compilation capabilities to internal TS compiler. Instead of using "ts.createProgram()" API for compilation step (during deno startup), "ts.createIncrementalProgram()" API is used instead. Thanks to TS' ".tsbuildinfo" file that already stores all necessary metadata for compilation I was able to remove our own invention that is ".graph" file. ".tsbuildinfo" file is stored alongside compiled source and is used to cache-bust outdated dependencies, facilitated by the "version" field. The value for "version" field is computed in Rust during loading of module graph and is basically a hash of the file contents. Please keep in mind that incremental compilation is only used for initial compilation (or dynamic imports compilation) - bundling and runtime compiler APIs haven't been changed at all. Due to problems with source map I changed compilation settings to inline source map (inlineSourceMap instead of sourceMap).
8 lines
297 B
Text
8 lines
297 B
Text
local: [WILDCARD]005_more_imports.ts
|
|
type: TypeScript
|
|
compiled: [WILDCARD]005_more_imports.ts.js
|
|
deps:
|
|
file://[WILDCARD]/005_more_imports.ts
|
|
└─┬ file://[WILDCARD]/subdir/mod1.ts
|
|
└─┬ file://[WILDCARD]/subdir/subdir2/mod2.ts
|
|
└── file://[WILDCARD]/subdir/print_hello.ts
|