From f6b889b43219e3c9be770c8b2758bff3048ddcbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sun, 3 Dec 2023 00:40:27 +0100 Subject: refactor: snapshotting of runtime/ and cli/ (#21430) This commit removes some of the technical debt related to snapshotting JS code: - "cli/ops/mod.rs" and "cli/build.rs" no longer define "cli" extension which was not required anymore - Cargo features for "deno_runtime" crate have been unified in "cli/Cargo.toml" - "cli/build.rs" uses "deno_runtime::snapshot::create_runtime_snapshot" API instead of copy-pasting the code - "cli/js/99_main.js" was completely removed as it's not necessary anymore Towards https://github.com/denoland/deno/issues/21137 --- cli/Cargo.toml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'cli/Cargo.toml') diff --git a/cli/Cargo.toml b/cli/Cargo.toml index d32181ebc..4873a21cc 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -39,7 +39,10 @@ __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 = ["exclude_runtime_main_js", "include_js_files_for_snapshotting"] } +# TODO(bartlomieju): should we not include `dont_create_runtime_snapshot` +# feature here and actually create the snapshot in `deno_runtime` build script? +# How do we pass options? +deno_runtime = { workspace = true, features = ["dont_create_runtime_snapshot", "include_js_files_for_snapshotting"] } deno_core = { workspace = true, features = ["include_js_files_for_snapshotting"] } lazy-regex.workspace = true serde.workspace = true @@ -63,7 +66,7 @@ deno_graph = "=0.61.5" deno_lint = { version = "=0.52.2", features = ["docs"] } deno_lockfile.workspace = true deno_npm = "0.15.2" -deno_runtime = { workspace = true, features = ["dont_create_runtime_snapshot", "exclude_runtime_main_js", "include_js_files_for_snapshotting"] } +deno_runtime = { workspace = true, features = ["dont_create_runtime_snapshot", "include_js_files_for_snapshotting"] } deno_semver = "0.5.1" deno_task_shell = "=0.14.0" eszip = "=0.55.5" -- cgit v1.2.3