Skip to content

Commit

Permalink
Rollup merge of rust-lang#126856 - onur-ozkan:remove-rls, r=clubby789
Browse files Browse the repository at this point in the history
remove deprecated tool `rls`

This tool has been deprecated for two years and now it only gives warning without doing anything useful.

Zulip discussion: https://rust-lang.zulipchat.com/#narrow/stream/241545-t-release/topic/excluding.20rls.20from.20the.20release
  • Loading branch information
jieyouxu authored Mar 10, 2025
2 parents 9fb94b3 + a657aeb commit fb3d9ce
Show file tree
Hide file tree
Showing 17 changed files with 7 additions and 189 deletions.
7 changes: 0 additions & 7 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3044,13 +3044,6 @@ dependencies = [
"serde",
]

[[package]]
name = "rls"
version = "2.0.0"
dependencies = [
"serde_json",
]

[[package]]
name = "run_make_support"
version = "0.2.0"
Expand Down
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ members = [
"src/tools/remote-test-server",
"src/tools/rust-installer",
"src/tools/rustdoc",
"src/tools/rls",
"src/tools/rustfmt",
"src/tools/miri",
"src/tools/miri/cargo-miri",
Expand Down
1 change: 0 additions & 1 deletion src/bootstrap/src/core/build_steps/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,6 @@ tool_check_step!(Rustdoc { path: "src/tools/rustdoc", alt_path: "src/librustdoc"
tool_check_step!(Clippy { path: "src/tools/clippy" });
tool_check_step!(Miri { path: "src/tools/miri" });
tool_check_step!(CargoMiri { path: "src/tools/miri/cargo-miri" });
tool_check_step!(Rls { path: "src/tools/rls" });
tool_check_step!(Rustfmt { path: "src/tools/rustfmt" });
tool_check_step!(MiroptTestTools { path: "src/tools/miropt-test-tools" });
tool_check_step!(TestFloatParse { path: "src/etc/test-float-parse" });
Expand Down
1 change: 0 additions & 1 deletion src/bootstrap/src/core/build_steps/clippy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,6 @@ lint_any!(
OptDist, "src/tools/opt-dist", "opt-dist";
RemoteTestClient, "src/tools/remote-test-client", "remote-test-client";
RemoteTestServer, "src/tools/remote-test-server", "remote-test-server";
Rls, "src/tools/rls", "rls";
RustAnalyzer, "src/tools/rust-analyzer", "rust-analyzer";
Rustdoc, "src/librustdoc", "clippy";
Rustfmt, "src/tools/rustfmt", "rustfmt";
Expand Down
43 changes: 0 additions & 43 deletions src/bootstrap/src/core/build_steps/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1157,48 +1157,6 @@ impl Step for Cargo {
}
}

#[derive(Debug, PartialOrd, Ord, Clone, Hash, PartialEq, Eq)]
pub struct Rls {
pub compiler: Compiler,
pub target: TargetSelection,
}

impl Step for Rls {
type Output = Option<GeneratedTarball>;
const ONLY_HOSTS: bool = true;
const DEFAULT: bool = true;

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
let default = should_build_extended_tool(run.builder, "rls");
run.alias("rls").default_condition(default)
}

fn make_run(run: RunConfig<'_>) {
run.builder.ensure(Rls {
compiler: run.builder.compiler_for(
run.builder.top_stage,
run.builder.config.build,
run.target,
),
target: run.target,
});
}

fn run(self, builder: &Builder<'_>) -> Option<GeneratedTarball> {
let compiler = self.compiler;
let target = self.target;

let rls = builder.ensure(tool::Rls { compiler, target });

let mut tarball = Tarball::new(builder, "rls", &target.triple);
tarball.set_overlay(OverlayKind::Rls);
tarball.is_preview(true);
tarball.add_file(rls.tool_path, "bin", 0o755);
tarball.add_legal_and_readme_to("share/doc/rls");
Some(tarball.generate())
}
}

#[derive(Debug, PartialOrd, Ord, Clone, Hash, PartialEq, Eq)]
pub struct RustAnalyzer {
pub compiler: Compiler,
Expand Down Expand Up @@ -1528,7 +1486,6 @@ impl Step for Extended {
add_component!("rust-json-docs" => JsonDocs { host: target });
add_component!("cargo" => Cargo { compiler, target });
add_component!("rustfmt" => Rustfmt { compiler, target });
add_component!("rls" => Rls { compiler, target });
add_component!("rust-analyzer" => RustAnalyzer { compiler, target });
add_component!("llvm-components" => LlvmTools { target });
add_component!("clippy" => Clippy { compiler, target });
Expand Down
4 changes: 1 addition & 3 deletions src/bootstrap/src/core/build_steps/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ impl FromStr for Profile {
"lib" | "library" => Ok(Profile::Library),
"compiler" => Ok(Profile::Compiler),
"maintainer" | "dist" | "user" => Ok(Profile::Dist),
"tools" | "tool" | "rustdoc" | "clippy" | "miri" | "rustfmt" | "rls" => {
Ok(Profile::Tools)
}
"tools" | "tool" | "rustdoc" | "clippy" | "miri" | "rustfmt" => Ok(Profile::Tools),
"none" => Ok(Profile::None),
"llvm" | "codegen" => Err("the \"llvm\" and \"codegen\" profiles have been removed,\
use \"compiler\" instead which has the same functionality"
Expand Down
2 changes: 0 additions & 2 deletions src/bootstrap/src/core/build_steps/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ pub fn prepare_tool_cargo(
let mut features = extra_features.to_vec();
if builder.build.config.cargo_native_static {
if path.ends_with("cargo")
|| path.ends_with("rls")
|| path.ends_with("clippy")
|| path.ends_with("miri")
|| path.ends_with("rustfmt")
Expand Down Expand Up @@ -1231,7 +1230,6 @@ tool_extended!(CargoMiri {
stable: false,
add_bins_to_sysroot: ["cargo-miri"]
});
tool_extended!(Rls { path: "src/tools/rls", tool_name: "rls", stable: true });
tool_extended!(Rustfmt {
path: "src/tools/rustfmt",
tool_name: "rustfmt",
Expand Down
4 changes: 0 additions & 4 deletions src/bootstrap/src/core/builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,6 @@ impl<'a> Builder<'a> {
tool::RemoteTestClient,
tool::RustInstaller,
tool::Cargo,
tool::Rls,
tool::RustAnalyzer,
tool::RustAnalyzerProcMacroSrv,
tool::Rustdoc,
Expand Down Expand Up @@ -938,7 +937,6 @@ impl<'a> Builder<'a> {
clippy::OptDist,
clippy::RemoteTestClient,
clippy::RemoteTestServer,
clippy::Rls,
clippy::RustAnalyzer,
clippy::Rustdoc,
clippy::Rustfmt,
Expand All @@ -956,7 +954,6 @@ impl<'a> Builder<'a> {
check::Miri,
check::CargoMiri,
check::MiroptTestTools,
check::Rls,
check::Rustfmt,
check::RustAnalyzer,
check::TestFloatParse,
Expand Down Expand Up @@ -1071,7 +1068,6 @@ impl<'a> Builder<'a> {
dist::Analysis,
dist::Src,
dist::Cargo,
dist::Rls,
dist::RustAnalyzer,
dist::Rustfmt,
dist::Clippy,
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ pub enum Mode {
/// Build a tool which uses the locally built rustc and the target std,
/// placing the output in the "stageN-tools" directory. This is used for
/// anything that needs a fully functional rustc, such as rustdoc, clippy,
/// cargo, rls, rustfmt, miri, etc.
/// cargo, rustfmt, miri, etc.
ToolRustc,
}

Expand Down
5 changes: 5 additions & 0 deletions src/bootstrap/src/utils/change_tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,4 +370,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
severity: ChangeSeverity::Info,
summary: "The rust.description option has moved to build.description and rust.description is now deprecated.",
},
ChangeInfo {
change_id: 126856,
severity: ChangeSeverity::Warning,
summary: "Removed `src/tools/rls` tool as it was deprecated long time ago.",
},
];
3 changes: 0 additions & 3 deletions src/bootstrap/src/utils/tarball.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ pub(crate) enum OverlayKind {
Clippy,
Miri,
Rustfmt,
Rls,
RustAnalyzer,
RustcCodegenCranelift,
LlvmBitcodeLinker,
Expand Down Expand Up @@ -56,7 +55,6 @@ impl OverlayKind {
"src/tools/rustfmt/LICENSE-APACHE",
"src/tools/rustfmt/LICENSE-MIT",
],
OverlayKind::Rls => &["src/tools/rls/README.md", "LICENSE-APACHE", "LICENSE-MIT"],
OverlayKind::RustAnalyzer => &[
"src/tools/rust-analyzer/README.md",
"src/tools/rust-analyzer/LICENSE-APACHE",
Expand Down Expand Up @@ -90,7 +88,6 @@ impl OverlayKind {
OverlayKind::Rustfmt => {
builder.rustfmt_info.version(builder, &builder.release_num("rustfmt"))
}
OverlayKind::Rls => builder.release(&builder.release_num("rls")),
OverlayKind::RustAnalyzer => builder
.rust_analyzer_info
.version(builder, &builder.release_num("rust-analyzer/crates/rust-analyzer")),
Expand Down
2 changes: 0 additions & 2 deletions src/tools/build-manifest/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,6 @@ impl Builder {
// NOTE: this profile is effectively deprecated; do not add new components to it.
let mut complete = default;
complete.extend([
Rls,
RustAnalyzer,
RustSrc,
LlvmTools,
Expand Down Expand Up @@ -475,7 +474,6 @@ impl Builder {
// but might be marked as unavailable if they weren't built.
PkgType::Clippy
| PkgType::Miri
| PkgType::Rls
| PkgType::RustAnalyzer
| PkgType::Rustfmt
| PkgType::LlvmTools
Expand Down
3 changes: 0 additions & 3 deletions src/tools/build-manifest/src/versions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ pkg_type! {
Cargo = "cargo",
HtmlDocs = "rust-docs",
RustAnalysis = "rust-analysis",
Rls = "rls"; preview = true,
RustAnalyzer = "rust-analyzer"; preview = true,
Clippy = "clippy"; preview = true,
Rustfmt = "rustfmt"; preview = true,
Expand All @@ -77,7 +76,6 @@ impl PkgType {
fn should_use_rust_version(&self) -> bool {
match self {
PkgType::Cargo => false,
PkgType::Rls => false,
PkgType::RustAnalyzer => false,
PkgType::Clippy => false,
PkgType::Rustfmt => false,
Expand Down Expand Up @@ -118,7 +116,6 @@ impl PkgType {
HtmlDocs => HOSTS,
JsonDocs => HOSTS,
RustSrc => &["*"],
Rls => HOSTS,
RustAnalyzer => HOSTS,
Clippy => HOSTS,
Miri => HOSTS,
Expand Down
8 changes: 0 additions & 8 deletions src/tools/rls/Cargo.toml

This file was deleted.

6 changes: 0 additions & 6 deletions src/tools/rls/README.md

This file was deleted.

102 changes: 0 additions & 102 deletions src/tools/rls/src/main.rs

This file was deleted.

2 changes: 0 additions & 2 deletions src/tools/tidy/src/walk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ pub fn filter_dirs(path: &Path) -> bool {
"src/doc/rustc-dev-guide",
"src/doc/reference",
"src/gcc",
// Filter RLS output directories
"target/rls",
"src/bootstrap/target",
"vendor",
];
Expand Down

0 comments on commit fb3d9ce

Please sign in to comment.