mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2026-04-11 21:14:30 +00:00
Add unknown runnable kind for forwards compatibility
This commit is contained in:
@@ -368,6 +368,9 @@ pub enum RunnableKind {
|
||||
/// Template for checking a target, emitting rustc JSON diagnostics.
|
||||
/// May include {label} which will get the label from the `build` section of a crate.
|
||||
Flycheck,
|
||||
|
||||
/// For forwards-compatibility, i.e. old rust-analyzer binary with newer workspace discovery tools
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq)]
|
||||
@@ -478,6 +481,11 @@ pub enum RunnableKindData {
|
||||
Check,
|
||||
Run,
|
||||
TestOne,
|
||||
|
||||
/// For forwards-compatibility, i.e. old rust-analyzer binary with newer workspace discovery tools
|
||||
#[allow(unused)]
|
||||
#[serde(other)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Deserialize, Serialize)]
|
||||
@@ -546,6 +554,7 @@ impl From<RunnableKindData> for RunnableKind {
|
||||
RunnableKindData::Run => RunnableKind::Run,
|
||||
RunnableKindData::TestOne => RunnableKind::TestOne,
|
||||
RunnableKindData::Flycheck => RunnableKind::Flycheck,
|
||||
RunnableKindData::Unknown => RunnableKind::Unknown,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,12 @@
|
||||
"program": "$ROOT$custom-flychecker.sh",
|
||||
"args": ["{label}"],
|
||||
"cwd": "$ROOT$"
|
||||
},
|
||||
{
|
||||
"kind": "we-ignore-unknown-runnable-kinds-for-forwards-compatibility",
|
||||
"program": "abc",
|
||||
"args": ["{label}"],
|
||||
"cwd": "$ROOT$"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user