From 064a73f7a08eb12d99fcdf8844e9ce5db62be78b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 9 Sep 2024 22:44:29 +0100 Subject: BREAKING: Remove `--unstable` flag (#25522) This commit effectively removes the --unstable flag. It's still being parsed, but it only prints a warning that a granular flag should be used instead and doesn't actually enable any unstable feature. Closes https://github.com/denoland/deno/issues/25485 Closes https://github.com/denoland/deno/issues/23237 --- cli/main.rs | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) (limited to 'cli/main.rs') diff --git a/cli/main.rs b/cli/main.rs index c1f0c7910..6caeaa5dd 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -478,25 +478,14 @@ fn resolve_flags_and_init( Err(err) => exit_for_error(AnyError::from(err)), }; - // TODO(bartlomieju): remove when `--unstable` flag is removed. + // TODO(bartlomieju): remove in Deno v2.5 and hard error then. if flags.unstable_config.legacy_flag_enabled { - #[allow(clippy::print_stderr)] - if matches!(flags.subcommand, DenoSubcommand::Check(_)) { - // can't use log crate because that's not setup yet - eprintln!( - "⚠️ {}", - colors::yellow( - "The `--unstable` flag is not needed for `deno check` anymore." - ) - ); - } else { - eprintln!( - "⚠️ {}", - colors::yellow( - "The `--unstable` flag is deprecated and will be removed in Deno 2.0. Use granular `--unstable-*` flags instead.\nLearn more at: https://docs.deno.com/runtime/manual/tools/unstable_flags" - ) - ); - } + log::warn!( + "⚠️ {}", + colors::yellow( + "The `--unstable` flag has been removed in Deno 2.0. Use granular `--unstable-*` flags instead.\nLearn more at: https://docs.deno.com/runtime/manual/tools/unstable_flags" + ) + ); } let default_v8_flags = match flags.subcommand { -- cgit v1.2.3