Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove deprecated tool rls #126856

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3462,13 +3462,6 @@ dependencies = [
"walkdir",
]

[[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 @@ -463,7 +463,6 @@ tool_check_step!(Rustdoc, "src/tools/rustdoc", "src/librustdoc", SourceType::InT
tool_check_step!(Clippy, "src/tools/clippy", SourceType::InTree);
tool_check_step!(Miri, "src/tools/miri", SourceType::InTree);
tool_check_step!(CargoMiri, "src/tools/miri/cargo-miri", SourceType::InTree);
tool_check_step!(Rls, "src/tools/rls", SourceType::InTree);
tool_check_step!(Rustfmt, "src/tools/rustfmt", SourceType::InTree);
tool_check_step!(MiroptTestTools, "src/tools/miropt-test-tools", SourceType::InTree);

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 @@ -320,7 +320,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/tools/rustdoc", "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 @@ -1134,48 +1134,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, extra_features: Vec::new() });

let mut tarball = Tarball::new(builder, "rls", &target.triple);
tarball.set_overlay(OverlayKind::Rls);
tarball.is_preview(true);
tarball.add_file(rls, "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 @@ -1518,7 +1476,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 @@ -98,9 +98,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
5 changes: 0 additions & 5 deletions src/bootstrap/src/core/build_steps/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,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 @@ -960,10 +959,6 @@ tool_extended!((self, builder),
Clippy, "src/tools/clippy", "clippy-driver", stable=true, add_bins_to_sysroot = ["clippy-driver", "cargo-clippy"];
Miri, "src/tools/miri", "miri", stable=false, add_bins_to_sysroot = ["miri"];
CargoMiri, "src/tools/miri/cargo-miri", "cargo-miri", stable=true, add_bins_to_sysroot = ["cargo-miri"];
// FIXME: tool_std is not quite right, we shouldn't allow nightly features.
// But `builder.cargo` doesn't know how to handle ToolBootstrap in stages other than 0,
// and this is close enough for now.
Rls, "src/tools/rls", "rls", stable=true, tool_std=true;
Rustfmt, "src/tools/rustfmt", "rustfmt", stable=true, add_bins_to_sysroot = ["rustfmt", "cargo-fmt"];
);

Expand Down
4 changes: 0 additions & 4 deletions src/bootstrap/src/core/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,6 @@ impl<'a> Builder<'a> {
tool::RemoteTestClient,
tool::RustInstaller,
tool::Cargo,
tool::Rls,
tool::RustAnalyzer,
tool::RustAnalyzerProcMacroSrv,
tool::Rustdoc,
Expand Down Expand Up @@ -771,7 +770,6 @@ impl<'a> Builder<'a> {
clippy::OptDist,
clippy::RemoteTestClient,
clippy::RemoteTestServer,
clippy::Rls,
clippy::RustAnalyzer,
clippy::Rustdoc,
clippy::Rustfmt,
Expand All @@ -787,7 +785,6 @@ impl<'a> Builder<'a> {
check::Miri,
check::CargoMiri,
check::MiroptTestTools,
check::Rls,
check::Rustfmt,
check::RustAnalyzer,
check::Bootstrap,
Expand Down Expand Up @@ -897,7 +894,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 @@ -265,7 +265,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 @@ -195,4 +195,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
severity: ChangeSeverity::Warning,
summary: "Removed `dist.missing-tools` configuration as it was deprecated long time ago.",
},
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 @@ -23,7 +23,6 @@ pub(crate) enum OverlayKind {
Clippy,
Miri,
Rustfmt,
Rls,
RustAnalyzer,
RustcCodegenCranelift,
LlvmBitcodeLinker,
Expand Down Expand Up @@ -57,7 +56,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 @@ -91,7 +89,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 @@ -374,7 +374,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 @@ -463,7 +462,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 @@ -50,7 +50,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 @@ -76,7 +75,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 @@ -116,7 +114,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 @@ -28,8 +28,6 @@ pub fn filter_dirs(path: &Path) -> bool {
"src/doc/rust-by-example",
"src/doc/rustc-dev-guide",
"src/doc/reference",
// Filter RLS output directories
"target/rls",
"src/bootstrap/target",
"vendor",
];
Expand Down
Loading