From bc42b9911dcce9a426afc59179d9e2f413e1f411 Mon Sep 17 00:00:00 2001 From: Wilfred Hughes Date: Tue, 22 Aug 2023 18:51:15 -0700 Subject: [PATCH] SCIP: Report the correct version of rust-analyzer in the metadata Previously this was hard coded to "0.1". The SCIP protocol allows this to be an arbitrary string: ``` message ToolInfo { // Name of the indexer that produced this index. string name = 1; // Version of the indexer that produced this index. string version = 2; // Command-line arguments that were used to invoke this indexer. repeated string arguments = 3; } ``` so use the same string reported by `rust-analyzer --version`. --- crates/rust-analyzer/src/cli/scip.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/rust-analyzer/src/cli/scip.rs b/crates/rust-analyzer/src/cli/scip.rs index 44337f955e5..8c056fff000 100644 --- a/crates/rust-analyzer/src/cli/scip.rs +++ b/crates/rust-analyzer/src/cli/scip.rs @@ -51,7 +51,7 @@ pub fn run(self) -> anyhow::Result<()> { version: scip_types::ProtocolVersion::UnspecifiedProtocolVersion.into(), tool_info: Some(scip_types::ToolInfo { name: "rust-analyzer".to_owned(), - version: "0.1".to_owned(), + version: format!("{}", crate::version::version()), arguments: vec![], special_fields: Default::default(), })