diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-12-07 22:35:53 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-07 22:35:53 -0500 |
commit | d192cc264020a8eeeafbdde4f06bb9b1cae9a5d2 (patch) | |
tree | 5fde52081f70beb2a9b565d456a8d2ba3c24c5e5 /cli/tools/run/mod.rs | |
parent | 3724d44d59950040f6ebbdd87d7eb93bc59c3caa (diff) |
fix: add more warnings when using sloppy imports (#21503)
One warning for when using it with `deno compile` and another when using
it with `deno run`.
Diffstat (limited to 'cli/tools/run/mod.rs')
-rw-r--r-- | cli/tools/run/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cli/tools/run/mod.rs b/cli/tools/run/mod.rs index 321f94fc6..f4604e248 100644 --- a/cli/tools/run/mod.rs +++ b/cli/tools/run/mod.rs @@ -45,6 +45,13 @@ To grant permissions, set them before the script argument. For example: let http_client = factory.http_client(); let cli_options = factory.cli_options(); + if cli_options.unstable_sloppy_imports() { + log::warn!( + "{} Sloppy imports are not recommended and have a negative impact on performance.", + crate::colors::yellow("Warning"), + ); + } + // Run a background task that checks for available upgrades or output // if an earlier run of this background task found a new version of Deno. #[cfg(feature = "upgrade")] |