diff --git a/Cargo.lock b/Cargo.lock
index cd2f631f31..d87306562e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3060,6 +3060,7 @@ dependencies = [
"roc_derive_key",
"roc_error_macros",
"roc_exhaustive",
+ "roc_load",
"roc_module",
"roc_packaging",
"roc_parse",
@@ -3072,6 +3073,7 @@ dependencies = [
"roc_types",
"roc_unify",
"tempfile",
+ "test_solve_helpers",
]
[[package]]
@@ -3094,42 +3096,6 @@ dependencies = [
"bitflags 1.3.2",
]
-[[package]]
-name = "roc_solve_tests"
-version = "0.0.1"
-dependencies = [
- "arrayvec 0.7.4",
- "bumpalo",
- "indoc",
- "insta",
- "lazy_static",
- "libtest-mimic",
- "pretty_assertions",
- "regex",
- "roc_builtins",
- "roc_can",
- "roc_checkmate",
- "roc_collections",
- "roc_debug_flags",
- "roc_derive",
- "roc_derive_key",
- "roc_error_macros",
- "roc_exhaustive",
- "roc_load_internal",
- "roc_module",
- "roc_packaging",
- "roc_parse",
- "roc_problem",
- "roc_region",
- "roc_reporting",
- "roc_solve_problem",
- "roc_solve_schema",
- "roc_target",
- "roc_types",
- "roc_unify",
- "tempfile",
-]
-
[[package]]
name = "roc_std"
version = "0.0.1"
diff --git a/crates/lang_srv/src/analysis.rs b/crates/lang_srv/src/analysis.rs
index 072bf1673a..69f26ea26b 100644
--- a/crates/lang_srv/src/analysis.rs
+++ b/crates/lang_srv/src/analysis.rs
@@ -309,6 +309,8 @@ pub struct DocInfo {
pub version: i32,
}
impl DocInfo {
+ #[cfg(debug_assertions)]
+ #[allow(unused)]
fn debug_log_prefix(&self, offset: u32) {
eprintln!("prefix source{:?}", self.source);
diff --git a/crates/lang_srv/src/registry.rs b/crates/lang_srv/src/registry.rs
index 20b0d6795d..07f16b1c3f 100644
--- a/crates/lang_srv/src/registry.rs
+++ b/crates/lang_srv/src/registry.rs
@@ -1,6 +1,6 @@
use std::{collections::HashMap, sync::Arc};
-use tokio::sync::{Mutex, MutexGuard};
+use tokio::sync::{Mutex, MutexGuard, RwLock, RwLockWriteGuard};
use tower_lsp::lsp_types::{
CompletionResponse, Diagnostic, GotoDefinitionResponse, Hover, Position, SemanticTokensResult,
TextEdit, Url,
@@ -10,51 +10,34 @@ use crate::analysis::{AnalyzedDocument, DocInfo};
#[derive(Debug)]
pub(crate) struct LatestDocument {
- info: DocInfo,
- //We can hold this mutex locked during updating while the latest and doc_info are out of sync
- //the lock should be aquired and immediately freed by and task looking to get a copy of info
- //At the top level we will need to store our lock
- latest: tokio::sync::watch::Receiver