0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-03 09:31:22 -05:00

fix: incremental build for deno declaration files (#9138)

This commit is contained in:
Bartek Iwańczuk 2021-01-17 15:12:00 +01:00 committed by GitHub
parent b26dcbc69d
commit f4dbb267c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -117,6 +117,15 @@ fn create_compiler_snapshot(
"esnext.weakref",
];
let path_dts = cwd.join("dts");
// ensure we invalidate the build properly.
for name in libs.iter() {
println!(
"cargo:rerun-if-changed={}",
path_dts.join(format!("lib.{}.d.ts", name)).display()
);
}
// create a copy of the vector that includes any op crate libs to be passed
// to the JavaScript compiler to build into the snapshot
let mut build_libs = libs.clone();
@ -125,7 +134,6 @@ fn create_compiler_snapshot(
}
let re_asset = Regex::new(r"asset:/{3}lib\.(\S+)\.d\.ts").expect("bad regex");
let path_dts = cwd.join("dts");
let build_specifier = "asset:///bootstrap.ts";
let mut js_runtime = JsRuntime::new(RuntimeOptions {