From bc92f872988fd8b9cdf2ae1479278789911237a5 Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Mon, 22 Jan 2024 12:37:25 +0000 Subject: fix(runtime): only discard extension sources if a snapshot is provided (#22023) Fixes #21928. We have a code path which empties the extension sources because they're expected to be pre-executed in the snapshot. Instead of using conditional compilation for that, we now just check if a snapshot was provided. Removes the `dont_use_runtime_snapshot` feature. We didn't allow not providing a snapshot unless this feature was provided, now we always do. Adds the `only_snapshotted_js_sources` feature for us to use in CLI. This asserts that a snapshot is provided and gates the runtime transpilation code so it isn't included in the executable. --- cli/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli') diff --git a/cli/Cargo.toml b/cli/Cargo.toml index e42b22947..16b561c05 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -39,7 +39,7 @@ __runtime_js_sources = ["deno_runtime/__runtime_js_sources"] __vendored_zlib_ng = ["flate2/zlib-ng-compat", "libz-sys/zlib-ng"] [build-dependencies] -deno_runtime = { workspace = true, features = ["include_js_files_for_snapshotting"] } +deno_runtime = { workspace = true, features = ["include_js_files_for_snapshotting", "only_snapshotted_js_sources"] } deno_core = { workspace = true, features = ["include_js_files_for_snapshotting"] } lazy-regex.workspace = true serde.workspace = true -- cgit v1.2.3