From b28dc9ac14dd83175e65ed40c54ca65665c2dea5 Mon Sep 17 00:00:00 2001 From: Jane Lewis Date: Thu, 27 Jun 2024 12:27:15 -0700 Subject: [PATCH] Remove `--preview` as a required argument for `ruff server` (#12053) ## Summary `ruff server` has reached a point of stabilization, and `--preview` is no longer required as a flag. `--preview` is still supported as a flag, since future features may be need to gated behind it initially. ## Test Plan A simple way to test this is to run `ruff server` from the command line. No error about a missing `--preview` argument should be reported. --- crates/ruff/src/commands/server.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/crates/ruff/src/commands/server.rs b/crates/ruff/src/commands/server.rs index d35b2c1ce4..ef7b8a42e9 100644 --- a/crates/ruff/src/commands/server.rs +++ b/crates/ruff/src/commands/server.rs @@ -4,12 +4,7 @@ use crate::ExitStatus; use anyhow::Result; use ruff_server::Server; -pub(crate) fn run_server(preview: bool, worker_threads: NonZeroUsize) -> Result { - if !preview { - tracing::error!("--preview needs to be provided as a command line argument while the server is still unstable.\nFor example: `ruff server --preview`"); - return Ok(ExitStatus::Error); - } - +pub(crate) fn run_server(_preview: bool, worker_threads: NonZeroUsize) -> Result { let server = Server::new(worker_threads)?; server.run().map(|()| ExitStatus::Success)