Skip to content

Commit

Permalink
Auto merge of #15503 - Wilfred:scip_version, r=Veykril
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
bors committed Aug 23, 2023
2 parents 9e3bf69 + bc42b99 commit 6444211
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/rust-analyzer/src/cli/scip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl flags::Scip {
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(),
})
Expand Down

0 comments on commit 6444211

Please sign in to comment.