From 847411fffdf1f3093baf8bb9db79d20cb486b92f Mon Sep 17 00:00:00 2001 From: Eduardo Sandalo Porto Date: Wed, 7 Aug 2024 14:06:42 -0300 Subject: [PATCH] Unused definition ranged diagnostics --- Cargo.lock | 11 ++++++----- Cargo.toml | 6 ++---- src/core/diagnostics.rs | 8 ++++---- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ab1ea38..adc69fb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,8 +4,9 @@ version = 3 [[package]] name = "TSPL" -version = "0.0.12" -source = "git+https://github.com/HigherOrderCO/TSPL.git?branch=range-info#ae25a5f5e3a805e4ae8854b34b6f29954ec2b68f" +version = "0.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe639519d49b56c98fd4fde7a5a7be01b5563862341a783b9bc2eb58f5120d8b" dependencies = [ "highlight_error", ] @@ -135,7 +136,7 @@ dependencies = [ [[package]] name = "bend-lang" version = "0.2.36" -source = "git+https://github.com/HigherOrderCO/Bend.git?branch=lsp-experiments#cf376afdc165e42963f7c92d64f7959a1ae89687" +source = "git+https://github.com/HigherOrderCO/Bend.git?branch=lsp-experiments#811e5110140afd5a4077c778eb00a2183cd89902" dependencies = [ "TSPL", "clap", @@ -444,8 +445,8 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hvm" -version = "2.0.21" -source = "git+https://github.com/higherorderco/hvm.git?branch=parser-update#01b795d8718cae14c7809316ac7b2acf459b0dba" +version = "2.0.22" +source = "git+https://github.com/HigherOrderCO/hvm.git?branch=parser-update#2a207a6b13aa75704e25d95813082b40b6353ecd" dependencies = [ "TSPL", "cc", diff --git a/Cargo.toml b/Cargo.toml index 3a6d229..5f10bce 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] -bend-lang = "0.2.36" +bend-lang = { git = "https://github.com/HigherOrderCO/Bend.git", branch = "lsp-experiments" } tree-sitter-bend = { git = "https://github.com/HigherOrderCO/tree-sitter-bend.git" } tower-lsp = { version = "0.20", features = ["proposed"] } tokio = { version = "1.17", features = ["full"] } @@ -24,6 +24,4 @@ ropey = "1.6" cc = "1.1" [patch.crates-io] -bend-lang = { git = "https://github.com/HigherOrderCO/Bend.git", branch = "lsp-experiments" } -TSPL = { git = "https://github.com/HigherOrderCO/TSPL.git", branch = "range-info" } -hvm = { git = "https://github.com/higherorderco/hvm.git", branch = "parser-update" } +hvm = { git = "https://github.com/HigherOrderCO/hvm.git", branch = "parser-update" } diff --git a/src/core/diagnostics.rs b/src/core/diagnostics.rs index 26759a7..e173ef5 100644 --- a/src/core/diagnostics.rs +++ b/src/core/diagnostics.rs @@ -56,12 +56,12 @@ fn treat_diagnostic(diag: &Diagnostic) -> Option { fn span_to_range(span: &TextSpan) -> lsp::Range { lsp::Range { start: Position { - line: span.0.line as u32, - character: span.0.char as u32, + line: span.start.line as u32, + character: span.start.char as u32, }, end: Position { - line: span.1.line as u32, - character: span.1.char as u32, + line: span.end.line as u32, + character: span.end.char as u32, }, } }