Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit efa6948

Browse files
committed
Fix rust-analyzer not enabling rust-analyzer spans on the proc-macro server
1 parent cdfb73a commit efa6948

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

crates/proc-macro-api/src/process.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ impl ProcMacroProcessSrv {
4545
})
4646
};
4747
let mut srv = create_srv(true)?;
48-
tracing::info!("sending version check");
48+
tracing::info!("sending proc-macro server version check");
4949
match srv.version_check() {
5050
Ok(v) if v > CURRENT_API_VERSION => Err(io::Error::new(
5151
io::ErrorKind::Other,
@@ -55,14 +55,15 @@ impl ProcMacroProcessSrv {
5555
),
5656
)),
5757
Ok(v) => {
58-
tracing::info!("got version {v}");
58+
tracing::info!("Proc-macro server version: {v}");
5959
srv = create_srv(false)?;
6060
srv.version = v;
61-
if srv.version > RUST_ANALYZER_SPAN_SUPPORT {
61+
if srv.version >= RUST_ANALYZER_SPAN_SUPPORT {
6262
if let Ok(mode) = srv.enable_rust_analyzer_spans() {
6363
srv.mode = mode;
6464
}
6565
}
66+
tracing::info!("Proc-macro server span mode: {:?}", srv.mode);
6667
Ok(srv)
6768
}
6869
Err(e) => {

0 commit comments

Comments
 (0)