Skip to content

Commit 64737cd

Browse files
committed
temporarily add old diagnostics to old workspace crate to fix ci
1 parent 89b3031 commit 64737cd

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

crates/pg_lsp/src/session.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::{collections::HashSet, sync::Arc};
33
use pg_base_db::{Change, DocumentChange};
44
use pg_commands::{Command, ExecuteStatementCommand};
55
use pg_completions::CompletionParams;
6-
use pg_diagnostics::Diagnostic;
6+
use pg_workspace::diagnostics::Diagnostic;
77
use pg_fs::PgLspPath;
88
use pg_hover::HoverParams;
99
use pg_workspace::Workspace;

crates/pg_lsp/src/utils/to_proto.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use pg_diagnostics::Diagnostic;
1+
use pg_workspace::diagnostics::{Diagnostic, Severity};
22
use tower_lsp::lsp_types;
33

44
pub fn diagnostic(diagnostic: Diagnostic, range: lsp_types::Range) -> lsp_types::Diagnostic {

crates/pg_workspace/src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ mod typecheck;
66

77
use std::sync::{RwLock, RwLockWriteGuard};
88

9+
use diagnostics::{Diagnostic, Severity};
910
use dashmap::{DashMap, DashSet};
1011
use lint::Linter;
1112
use pg_base_db::{Document, DocumentChange, StatementRef};
@@ -98,10 +99,10 @@ impl Workspace {
9899
}
99100

100101
/// Collects all diagnostics for a given document. It does not compute them, it just collects.
101-
pub fn diagnostics(&self, url: &PgLspPath) -> Vec<pg_diagnostics::Diagnostic> {
102-
let mut diagnostics: Vec<pg_diagnostics::Diagnostic> = vec![];
102+
pub fn diagnostics(&self, url: &PgLspPath) -> Vec<crate::Diagnostic> {
103+
let mut diagnostics: Vec<crate::Diagnostic> = vec![];
103104

104-
let doc = self.documents.get(&url);
105+
let doc = self.documents.get(url);
105106

106107
if doc.is_none() {
107108
return diagnostics;

0 commit comments

Comments
 (0)