Skip to content

Commit

Permalink
fix: remove deprecated filter args warning
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-olszewski committed Apr 15, 2024
1 parent 3e856e0 commit d6bce60
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions crates/turborepo-lib/src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,6 @@ pub async fn run(
root_telemetry.track_cpus(num_cpus::get());
// track args
cli_args.track(&root_telemetry);
warn_all_deprecated_flags(&cli_args);

let cli_result = match cli_args.command.as_ref().unwrap() {
Command::Bin { .. } => {
Expand Down Expand Up @@ -1231,39 +1230,6 @@ pub async fn run(
cli_result
}

fn warn_all_deprecated_flags(args: &Args) {
if args.trace.is_some() {
warn_flag_removal("--trace");
}

if args.heap.is_some() {
warn_flag_removal("--heap");
}

if args.cpu_profile.is_some() {
warn_flag_removal("--cpuprofile");
}

if let Some(Command::Run(run_args)) = args.command.as_ref() {
if run_args.since.is_some() {
warn_flag_removal("--since");
}
if !run_args.scope.is_empty() {
warn_flag_removal("--scope");
}
if run_args.include_dependencies {
warn_flag_removal("--include-dependencies");
}
if run_args.no_deps {
warn_flag_removal("--no-deps");
}
}
}

fn warn_flag_removal(flag: &str) {
warn!("{flag} is deprecated and will be removed in 2.0");
}

#[cfg(test)]
mod test {
use std::assert_matches::assert_matches;
Expand Down

0 comments on commit d6bce60

Please sign in to comment.