fix: Disable postcard use temporarily · rust-lang/rust@51da96d (original) (raw)
File tree
1 file changed
lines changed
- src/tools/rust-analyzer/crates/proc-macro-api/src
1 file changed
lines changed
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -58,7 +58,9 @@ impl ProcMacroServerProcess { | ||
| 58 | 58 | if v.pre.as_str() == "nightly" { *v > VERSION } else { *v >= VERSION } |
| 59 | 59 | }); |
| 60 | 60 | |
| 61 | -let formats: &[_] = if has_working_format_flag { | |
| 61 | +let formats: &[_] = if std::env::var_os("RUST_ANALYZER_USE_POSTCARD").is_some() | |
| 62 | + && has_working_format_flag | |
| 63 | +{ | |
| 62 | 64 | &[ |
| 63 | 65 | (Some("postcard-legacy"), Protocol::LegacyPostcard { mode: SpanMode::Id }), |
| 64 | 66 | (Some("json-legacy"), Protocol::LegacyJson { mode: SpanMode::Id }), |