summaryrefslogtreecommitdiff
path: root/cli/main.rs
diff options
context:
space:
mode:
authorBartek Iwańczuk <biwanczuk@gmail.com>2024-09-09 22:44:29 +0100
committerGitHub <noreply@github.com>2024-09-09 23:44:29 +0200
commit064a73f7a08eb12d99fcdf8844e9ce5db62be78b (patch)
treea1672b2151d3e7c5db490dad9fc3917064ee64aa /cli/main.rs
parent560ad0331bf99a2564f53201cd086ff902901bfe (diff)
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
Diffstat (limited to 'cli/main.rs')
-rw-r--r--cli/main.rs25
1 files changed, 7 insertions, 18 deletions
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 {