Compare commits

...

3 Commits

Author SHA1 Message Date
Antonio Scandurra
b7aa944352 Temporarily clean repository before building on CI
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-10-25 16:39:22 +02:00
Antonio Scandurra
0b32bb5ff7 v0.61.1 2022-10-25 16:36:39 +02:00
Antonio Scandurra
70cf542408 Merge pull request #1808 from zed-industries/fix-diagnostics-on-rust
Match progress token's prefix to detect disk-based diagnostic progress
2022-10-25 16:35:32 +02:00
6 changed files with 14 additions and 9 deletions

View File

@@ -38,7 +38,7 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v2
with:
clean: false
clean: true
- name: Run tests
run: cargo test --workspace --no-fail-fast
@@ -74,7 +74,7 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v2
with:
clean: false
clean: true
- name: Validate version
if: ${{ startsWith(github.ref, 'refs/tags/v') }}

2
Cargo.lock generated
View File

@@ -7531,7 +7531,7 @@ dependencies = [
[[package]]
name = "zed"
version = "0.61.0"
version = "0.61.1"
dependencies = [
"activity_indicator",
"anyhow",

View File

@@ -2262,8 +2262,11 @@ impl Project {
return;
}
let is_disk_based_diagnostics_progress =
Some(token.as_ref()) == disk_based_diagnostics_progress_token.as_deref();
let is_disk_based_diagnostics_progress = disk_based_diagnostics_progress_token
.as_ref()
.map_or(false, |disk_based_token| {
token.starts_with(disk_based_token)
});
match progress {
lsp::WorkDoneProgress::Begin(report) => {

View File

@@ -644,7 +644,9 @@ async fn test_disk_based_diagnostics_progress(cx: &mut gpui::TestAppContext) {
let mut events = subscribe(&project, cx);
let fake_server = fake_servers.next().await.unwrap();
fake_server.start_progress(progress_token).await;
fake_server
.start_progress(format!("{}/0", progress_token))
.await;
assert_eq!(
events.next().await.unwrap(),
Event::DiskBasedDiagnosticsStarted {
@@ -670,7 +672,7 @@ async fn test_disk_based_diagnostics_progress(cx: &mut gpui::TestAppContext) {
}
);
fake_server.end_progress(progress_token);
fake_server.end_progress(format!("{}/0", progress_token));
assert_eq!(
events.next().await.unwrap(),
Event::DiskBasedDiagnosticsFinished {

View File

@@ -3,7 +3,7 @@ authors = ["Nathan Sobo <nathansobo@gmail.com>"]
description = "The fast, collaborative code editor."
edition = "2021"
name = "zed"
version = "0.61.0"
version = "0.61.1"
[lib]
name = "zed"

View File

@@ -93,7 +93,7 @@ impl LspAdapter for RustLspAdapter {
}
async fn disk_based_diagnostics_progress_token(&self) -> Option<String> {
Some("rustAnalyzer/cargo check".into())
Some("rust-analyzer/checkOnSave".into())
}
async fn process_diagnostics(&self, params: &mut lsp::PublishDiagnosticsParams) {