From e83826dd9c362f32aae65192dc4e02483def6e4a Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Mon, 1 Jun 2020 18:57:25 -0400 Subject: [PATCH] Remove unused check-only feature --- cli/source_maps.rs | 11 ----------- cli/startup_data.rs | 16 ---------------- 2 files changed, 27 deletions(-) diff --git a/cli/source_maps.rs b/cli/source_maps.rs index 90780e042ed702..d87147dbe61a9d 100644 --- a/cli/source_maps.rs +++ b/cli/source_maps.rs @@ -18,17 +18,6 @@ pub trait SourceMapGetter { /// find a SourceMap. pub type CachedMaps = HashMap>; -// The bundle does not get built for 'cargo check', so we don't embed the -// bundle source map. The built in source map is the source map for the main -// JavaScript bundle which is then used to create the snapshot. Runtime stack -// traces can contain positions within the bundle which we will map to the -// original Deno TypeScript code. -#[cfg(feature = "check-only")] -fn builtin_source_map(_: &str) -> Option> { - None -} - -#[cfg(not(feature = "check-only"))] fn builtin_source_map(file_name: &str) -> Option> { if file_name.ends_with("CLI_SNAPSHOT.js") { Some(crate::js::CLI_SNAPSHOT_MAP.to_vec()) diff --git a/cli/startup_data.rs b/cli/startup_data.rs index 517165d110c5f9..b1b2d03c1d28c2 100644 --- a/cli/startup_data.rs +++ b/cli/startup_data.rs @@ -10,12 +10,8 @@ use deno_core::StartupData; #[cfg(feature = "no-snapshot-init")] pub fn deno_isolate_init() -> StartupData<'static> { debug!("Deno isolate init without snapshots."); - #[cfg(not(feature = "check-only"))] let source = include_str!(concat!(env!("GN_OUT_DIR"), "/gen/cli/bundle/main.js")); - #[cfg(feature = "check-only")] - let source = ""; - StartupData::Script(Script { filename: "gen/cli/bundle/main.js", source, @@ -25,23 +21,15 @@ pub fn deno_isolate_init() -> StartupData<'static> { #[cfg(not(feature = "no-snapshot-init"))] pub fn deno_isolate_init() -> StartupData<'static> { debug!("Deno isolate init with snapshots."); - #[cfg(not(feature = "check-only"))] let data = CLI_SNAPSHOT; - #[cfg(feature = "check-only")] - let data = b""; - StartupData::Snapshot(Snapshot::Static(data)) } #[cfg(feature = "no-snapshot-init")] pub fn compiler_isolate_init() -> StartupData<'static> { debug!("Compiler isolate init without snapshots."); - #[cfg(not(feature = "check-only"))] let source = include_str!(concat!(env!("GN_OUT_DIR"), "/gen/cli/bundle/compiler.js")); - #[cfg(feature = "check-only")] - let source = ""; - StartupData::Script(Script { filename: "gen/cli/bundle/compiler.js", source, @@ -51,10 +39,6 @@ pub fn compiler_isolate_init() -> StartupData<'static> { #[cfg(not(feature = "no-snapshot-init"))] pub fn compiler_isolate_init() -> StartupData<'static> { debug!("Deno isolate init with snapshots."); - #[cfg(not(feature = "check-only"))] let data = COMPILER_SNAPSHOT; - #[cfg(feature = "check-only")] - let data = b""; - StartupData::Snapshot(Snapshot::Static(data)) }