From e411747e24b998c8178d0689aa7d63b0ad0e7046 Mon Sep 17 00:00:00 2001 From: Arthur Lafrance <38890624+a-lafrance@users.noreply.github.com> Date: Fri, 8 Apr 2022 04:51:01 -0700 Subject: [PATCH] feat(repl): Don't type check when importing modules (#14112) --- cli/flags.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cli/flags.rs b/cli/flags.rs index 5c97bcae40..c5c6eea6d2 100644 --- a/cli/flags.rs +++ b/cli/flags.rs @@ -2341,6 +2341,8 @@ fn lint_parse(flags: &mut Flags, matches: &clap::ArgMatches) { } fn repl_parse(flags: &mut Flags, matches: &clap::ArgMatches) { + // Use no-check by default for the REPL + flags.typecheck_mode = TypecheckMode::None; runtime_args_parse(flags, matches, false, true); unsafely_ignore_certificate_errors_parse(flags, matches); handle_repl_flags( @@ -3789,6 +3791,7 @@ mod tests { allow_write: Some(vec![]), allow_ffi: Some(vec![]), allow_hrtime: true, + typecheck_mode: TypecheckMode::None, ..Flags::default() } ); @@ -4437,6 +4440,7 @@ mod tests { allow_write: Some(vec![]), allow_ffi: Some(vec![]), allow_hrtime: true, + typecheck_mode: TypecheckMode::None, ..Flags::default() } ); @@ -4515,6 +4519,7 @@ mod tests { allow_write: Some(vec![]), allow_ffi: Some(vec![]), allow_hrtime: true, + typecheck_mode: TypecheckMode::None, ..Flags::default() } );