diff options
| author | Lukas Wirth <lukas.wirth@ferrous-systems.com> | 2024-02-22 22:32:39 +0100 |
|---|---|---|
| committer | Lukas Wirth <lukas.wirth@ferrous-systems.com> | 2024-02-22 22:34:03 +0100 |
| commit | efa6948b577f702eda9c85a1adf26ddc327f0261 (patch) | |
| tree | 5d143d77020b1fe21bf136173e432802cf406610 | |
| parent | cdfb73ab9c702be655a0164d79eb0ca0a8942384 (diff) | |
| download | rust-efa6948b577f702eda9c85a1adf26ddc327f0261.tar.gz rust-efa6948b577f702eda9c85a1adf26ddc327f0261.zip | |
Fix rust-analyzer not enabling rust-analyzer spans on the proc-macro server
| -rw-r--r-- | crates/proc-macro-api/src/process.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/proc-macro-api/src/process.rs b/crates/proc-macro-api/src/process.rs index 12eafcea442..72f95643c8b 100644 --- a/crates/proc-macro-api/src/process.rs +++ b/crates/proc-macro-api/src/process.rs @@ -45,7 +45,7 @@ impl ProcMacroProcessSrv { }) }; let mut srv = create_srv(true)?; - tracing::info!("sending version check"); + tracing::info!("sending proc-macro server version check"); match srv.version_check() { Ok(v) if v > CURRENT_API_VERSION => Err(io::Error::new( io::ErrorKind::Other, @@ -55,14 +55,15 @@ impl ProcMacroProcessSrv { ), )), Ok(v) => { - tracing::info!("got version {v}"); + tracing::info!("Proc-macro server version: {v}"); srv = create_srv(false)?; srv.version = v; - if srv.version > RUST_ANALYZER_SPAN_SUPPORT { + if srv.version >= RUST_ANALYZER_SPAN_SUPPORT { if let Ok(mode) = srv.enable_rust_analyzer_spans() { srv.mode = mode; } } + tracing::info!("Proc-macro server span mode: {:?}", srv.mode); Ok(srv) } Err(e) => { |
