From 0d736223803bbfd8b86315f5568f85c5f463c70e Mon Sep 17 00:00:00 2001 From: Ary Borenszweig Date: Wed, 31 Jul 2024 16:11:38 -0300 Subject: [PATCH 1/9] LSP: don't lookup top-level workspace because it's too slow --- tooling/lsp/src/lib.rs | 56 +++++++++++-------- tooling/lsp/src/notifications/mod.rs | 21 +++++-- tooling/lsp/src/requests/code_lens_request.rs | 2 +- tooling/lsp/src/requests/mod.rs | 2 +- 4 files changed, 51 insertions(+), 30 deletions(-) diff --git a/tooling/lsp/src/lib.rs b/tooling/lsp/src/lib.rs index c7b70339e1d..7f44b7c2297 100644 --- a/tooling/lsp/src/lib.rs +++ b/tooling/lsp/src/lib.rs @@ -239,37 +239,49 @@ fn byte_span_to_range<'a, F: files::Files<'a> + ?Sized>( pub(crate) fn resolve_workspace_for_source_path( file_path: &Path, root_path: &Option, + lookup_top_level_workspace: bool, ) -> Result { - // If there's a LSP root path, starting from file_path go up the directory tree - // searching for Nargo.toml files. The last one we find is the one we'll use - // (we'll assume Noir workspaces aren't nested) - if let Some(root_path) = root_path { - let mut current_path = file_path; - let mut current_toml_path = None; - while current_path.starts_with(root_path) { - if let Some(toml_path) = find_file_manifest(current_path) { - current_toml_path = Some(toml_path); - - if let Some(next_path) = current_path.parent() { - current_path = next_path; + if lookup_top_level_workspace { + // If there's a LSP root path, starting from file_path go up the directory tree + // searching for Nargo.toml files. The last one we find is the one we'll use + // (we'll assume Noir workspaces aren't nested) + if let Some(root_path) = root_path { + let mut current_path = file_path; + let mut current_toml_path = None; + while current_path.starts_with(root_path) { + if let Some(toml_path) = find_file_manifest(current_path) { + current_toml_path = Some(toml_path); + + if let Some(next_path) = current_path.parent() { + current_path = next_path; + } else { + break; + } } else { break; } - } else { - break; } - } - if let Some(toml_path) = current_toml_path { - return resolve_workspace_from_toml( - &toml_path, - PackageSelection::All, - Some(NOIR_ARTIFACT_VERSION_STRING.to_string()), - ) - .map_err(|err| LspError::WorkspaceResolutionError(err.to_string())); + if let Some(toml_path) = current_toml_path { + return resolve_workspace_from_toml( + &toml_path, + PackageSelection::All, + Some(NOIR_ARTIFACT_VERSION_STRING.to_string()), + ) + .map_err(|err| LspError::WorkspaceResolutionError(err.to_string())); + } } } + if let Some(toml_path) = find_file_manifest(file_path) { + return resolve_workspace_from_toml( + &toml_path, + PackageSelection::All, + Some(NOIR_ARTIFACT_VERSION_STRING.to_string()), + ) + .map_err(|err| LspError::WorkspaceResolutionError(err.to_string())); + } + let Some(parent_folder) = file_path .parent() .and_then(|f| f.file_name()) diff --git a/tooling/lsp/src/notifications/mod.rs b/tooling/lsp/src/notifications/mod.rs index 24409e85db8..1d330a08061 100644 --- a/tooling/lsp/src/notifications/mod.rs +++ b/tooling/lsp/src/notifications/mod.rs @@ -37,7 +37,11 @@ pub(super) fn on_did_open_text_document( state.input_files.insert(params.text_document.uri.to_string(), params.text_document.text); let document_uri = params.text_document.uri; - let only_process_document_uri_package = false; + + // Ideally we'd process the entire workspace (only if we don't have another open file in the workspace), + // but that's too slow and it makes saving and every other LSP operation take too long. + let only_process_document_uri_package = true; + let output_diagnostics = true; match process_workspace_for_noir_document( @@ -109,7 +113,10 @@ pub(super) fn on_did_save_text_document( params: DidSaveTextDocumentParams, ) -> ControlFlow> { let document_uri = params.text_document.uri; - let only_process_document_uri_package = false; + + // Ideally we'd process the entire workspace, but that's too slow and it makes + // saving and every other LSP operation take too long. + let only_process_document_uri_package = true; let output_diagnotics = true; match process_workspace_for_noir_document( @@ -136,10 +143,12 @@ pub(crate) fn process_workspace_for_noir_document( ResponseError::new(ErrorCode::REQUEST_FAILED, "URI is not a valid file path") })?; - let workspace = - resolve_workspace_for_source_path(&file_path, &state.root_path).map_err(|lsp_error| { - ResponseError::new(ErrorCode::REQUEST_FAILED, lsp_error.to_string()) - })?; + let workspace = resolve_workspace_for_source_path( + &file_path, + &state.root_path, + !only_process_document_uri_package, + ) + .map_err(|lsp_error| ResponseError::new(ErrorCode::REQUEST_FAILED, lsp_error.to_string()))?; let mut workspace_file_manager = file_manager_with_stdlib(&workspace.root_dir); insert_all_files_for_workspace_into_file_manager( diff --git a/tooling/lsp/src/requests/code_lens_request.rs b/tooling/lsp/src/requests/code_lens_request.rs index 51336a324da..5afbd6193a4 100644 --- a/tooling/lsp/src/requests/code_lens_request.rs +++ b/tooling/lsp/src/requests/code_lens_request.rs @@ -64,7 +64,7 @@ fn on_code_lens_request_inner( })?; let workspace = - resolve_workspace_for_source_path(file_path.as_path(), &state.root_path).unwrap(); + resolve_workspace_for_source_path(file_path.as_path(), &state.root_path, false).unwrap(); let package = crate::workspace_package_for_file(&workspace, &file_path).ok_or_else(|| { ResponseError::new(ErrorCode::REQUEST_FAILED, "Could not find package for file") diff --git a/tooling/lsp/src/requests/mod.rs b/tooling/lsp/src/requests/mod.rs index 54f571af5a5..233e1fecb9c 100644 --- a/tooling/lsp/src/requests/mod.rs +++ b/tooling/lsp/src/requests/mod.rs @@ -365,7 +365,7 @@ where })?; let workspace = - resolve_workspace_for_source_path(file_path.as_path(), &state.root_path).unwrap(); + resolve_workspace_for_source_path(file_path.as_path(), &state.root_path, false).unwrap(); let package = crate::workspace_package_for_file(&workspace, &file_path).ok_or_else(|| { ResponseError::new(ErrorCode::REQUEST_FAILED, "Could not find package for file") })?; From aebebade016f6776e6429dd33b646fb254088b51 Mon Sep 17 00:00:00 2001 From: Ary Borenszweig Date: Wed, 31 Jul 2024 16:18:05 -0300 Subject: [PATCH 2/9] Be a bit more resilient when hovering over module that we can't find --- tooling/lsp/src/requests/hover.rs | 32 ++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/tooling/lsp/src/requests/hover.rs b/tooling/lsp/src/requests/hover.rs index 161fd20f555..197ad72abae 100644 --- a/tooling/lsp/src/requests/hover.rs +++ b/tooling/lsp/src/requests/hover.rs @@ -23,39 +23,41 @@ pub(crate) fn on_hover_request( params: HoverParams, ) -> impl Future, ResponseError>> { let result = process_request(state, params.text_document_position_params, |args| { - args.interner.reference_at_location(args.location).map(|reference| { + args.interner.reference_at_location(args.location).and_then(|reference| { let location = args.interner.reference_location(reference); let lsp_location = to_lsp_location(args.files, location.file, location.span); - Hover { + format_reference(reference, &args).map(|formatted| Hover { range: lsp_location.map(|location| location.range), contents: HoverContents::Markup(MarkupContent { kind: MarkupKind::Markdown, - value: format_reference(reference, &args), + value: formatted, }), - } + }) }) }); future::ready(result) } -fn format_reference(reference: ReferenceId, args: &ProcessRequestCallbackArgs) -> String { +fn format_reference(reference: ReferenceId, args: &ProcessRequestCallbackArgs) -> Option { match reference { ReferenceId::Module(id) => format_module(id, args), - ReferenceId::Struct(id) => format_struct(id, args), - ReferenceId::StructMember(id, field_index) => format_struct_member(id, field_index, args), - ReferenceId::Trait(id) => format_trait(id, args), - ReferenceId::Global(id) => format_global(id, args), - ReferenceId::Function(id) => format_function(id, args), - ReferenceId::Alias(id) => format_alias(id, args), - ReferenceId::Local(id) => format_local(id, args), + ReferenceId::Struct(id) => Some(format_struct(id, args)), + ReferenceId::StructMember(id, field_index) => { + Some(format_struct_member(id, field_index, args)) + } + ReferenceId::Trait(id) => Some(format_trait(id, args)), + ReferenceId::Global(id) => Some(format_global(id, args)), + ReferenceId::Function(id) => Some(format_function(id, args)), + ReferenceId::Alias(id) => Some(format_alias(id, args)), + ReferenceId::Local(id) => Some(format_local(id, args)), ReferenceId::Reference(location, _) => { format_reference(args.interner.find_referenced(location).unwrap(), args) } } } -fn format_module(id: ModuleId, args: &ProcessRequestCallbackArgs) -> String { - let module_attributes = args.interner.module_attributes(&id); +fn format_module(id: ModuleId, args: &ProcessRequestCallbackArgs) -> Option { + let module_attributes = args.interner.try_module_attributes(&id)?; let mut string = String::new(); if format_parent_module_from_module_id( @@ -68,7 +70,7 @@ fn format_module(id: ModuleId, args: &ProcessRequestCallbackArgs) -> String { string.push_str(" "); string.push_str("mod "); string.push_str(&module_attributes.name); - string + Some(string) } fn format_struct(id: StructId, args: &ProcessRequestCallbackArgs) -> String { From 0dc95d99e463408c19bee7b3b511ca4d88037cbf Mon Sep 17 00:00:00 2001 From: Ary Borenszweig Date: Wed, 31 Jul 2024 16:25:16 -0300 Subject: [PATCH 3/9] Add a note for why we are using `try` --- tooling/lsp/src/requests/hover.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tooling/lsp/src/requests/hover.rs b/tooling/lsp/src/requests/hover.rs index 197ad72abae..40d4bb92448 100644 --- a/tooling/lsp/src/requests/hover.rs +++ b/tooling/lsp/src/requests/hover.rs @@ -57,6 +57,10 @@ fn format_reference(reference: ReferenceId, args: &ProcessRequestCallbackArgs) - } } fn format_module(id: ModuleId, args: &ProcessRequestCallbackArgs) -> Option { + // Note: it's not clear why `try_module_attributes` might return None here, but it happens. + // This is a workaround to avoid panicking in that case (which brings the LSP server down). + // Cases where this happens are related to generated code, so once that stops happening + // this won't be an issue anymore. let module_attributes = args.interner.try_module_attributes(&id)?; let mut string = String::new(); From d8b2421acaddec4079c6d1beabb03970b682c5c6 Mon Sep 17 00:00:00 2001 From: Ary Borenszweig Date: Wed, 31 Jul 2024 17:02:37 -0300 Subject: [PATCH 4/9] Don't show inlay hints inside contracts --- tooling/lsp/src/requests/inlay_hint.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tooling/lsp/src/requests/inlay_hint.rs b/tooling/lsp/src/requests/inlay_hint.rs index 35ee36e11fa..a2ce8b46c8b 100644 --- a/tooling/lsp/src/requests/inlay_hint.rs +++ b/tooling/lsp/src/requests/inlay_hint.rs @@ -104,7 +104,11 @@ impl<'a> InlayHintCollector<'a> { } ItemKind::Global(let_statement) => self.collect_in_let_statement(let_statement), ItemKind::Submodules(parsed_submodule) => { - self.collect_in_parsed_module(&parsed_submodule.contents); + // Inlay hints inside a contract might show up incorrectly because contracts can + // have generated code whose location overlaps with real code. + if !parsed_submodule.is_contract { + self.collect_in_parsed_module(&parsed_submodule.contents); + } } ItemKind::ModuleDecl(_) => (), ItemKind::Import(_) => (), From a425db93a1b01d5a79e4eab6b1cde05a0dab4d79 Mon Sep 17 00:00:00 2001 From: Ary Borenszweig Date: Wed, 31 Jul 2024 17:05:16 -0300 Subject: [PATCH 5/9] Ignore test --- tooling/lsp/src/requests/references.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tooling/lsp/src/requests/references.rs b/tooling/lsp/src/requests/references.rs index 375e0b69aed..6326d2d7254 100644 --- a/tooling/lsp/src/requests/references.rs +++ b/tooling/lsp/src/requests/references.rs @@ -94,6 +94,9 @@ mod references_tests { check_references_succeeds("rename_function", "another_function", 0, false).await; } + // Ignored because making this works slows down everything, so for now things will not work + // as ideally, but they'll be fast. + #[ignore] #[test] async fn test_on_references_request_works_accross_workspace_packages() { let (mut state, noir_text_document) = test_utils::init_lsp_server("workspace").await; From bf587ef18b8a163c96e3d466e34045fdb4290032 Mon Sep 17 00:00:00 2001 From: Ary Borenszweig Date: Wed, 31 Jul 2024 17:16:55 -0300 Subject: [PATCH 6/9] Typo --- tooling/lsp/src/requests/references.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling/lsp/src/requests/references.rs b/tooling/lsp/src/requests/references.rs index 6326d2d7254..3de7bfe4f91 100644 --- a/tooling/lsp/src/requests/references.rs +++ b/tooling/lsp/src/requests/references.rs @@ -94,7 +94,7 @@ mod references_tests { check_references_succeeds("rename_function", "another_function", 0, false).await; } - // Ignored because making this works slows down everything, so for now things will not work + // Ignored because making this work slows down everything, so for now things will not work // as ideally, but they'll be fast. #[ignore] #[test] From c4967062312a350d221905f87fca2c4e4a46ca69 Mon Sep 17 00:00:00 2001 From: Ary Borenszweig Date: Thu, 1 Aug 2024 07:05:29 -0300 Subject: [PATCH 7/9] Remove dead code --- tooling/lsp/src/lib.rs | 38 +------------ tooling/lsp/src/notifications/mod.rs | 53 +++---------------- tooling/lsp/src/requests/code_lens_request.rs | 3 +- tooling/lsp/src/requests/mod.rs | 3 +- tooling/lsp/src/requests/references.rs | 2 - 5 files changed, 10 insertions(+), 89 deletions(-) diff --git a/tooling/lsp/src/lib.rs b/tooling/lsp/src/lib.rs index 7f44b7c2297..2268fbccb46 100644 --- a/tooling/lsp/src/lib.rs +++ b/tooling/lsp/src/lib.rs @@ -236,43 +236,7 @@ fn byte_span_to_range<'a, F: files::Files<'a> + ?Sized>( } } -pub(crate) fn resolve_workspace_for_source_path( - file_path: &Path, - root_path: &Option, - lookup_top_level_workspace: bool, -) -> Result { - if lookup_top_level_workspace { - // If there's a LSP root path, starting from file_path go up the directory tree - // searching for Nargo.toml files. The last one we find is the one we'll use - // (we'll assume Noir workspaces aren't nested) - if let Some(root_path) = root_path { - let mut current_path = file_path; - let mut current_toml_path = None; - while current_path.starts_with(root_path) { - if let Some(toml_path) = find_file_manifest(current_path) { - current_toml_path = Some(toml_path); - - if let Some(next_path) = current_path.parent() { - current_path = next_path; - } else { - break; - } - } else { - break; - } - } - - if let Some(toml_path) = current_toml_path { - return resolve_workspace_from_toml( - &toml_path, - PackageSelection::All, - Some(NOIR_ARTIFACT_VERSION_STRING.to_string()), - ) - .map_err(|err| LspError::WorkspaceResolutionError(err.to_string())); - } - } - } - +pub(crate) fn resolve_workspace_for_source_path(file_path: &Path) -> Result { if let Some(toml_path) = find_file_manifest(file_path) { return resolve_workspace_from_toml( &toml_path, diff --git a/tooling/lsp/src/notifications/mod.rs b/tooling/lsp/src/notifications/mod.rs index 1d330a08061..528c675aa26 100644 --- a/tooling/lsp/src/notifications/mod.rs +++ b/tooling/lsp/src/notifications/mod.rs @@ -37,19 +37,9 @@ pub(super) fn on_did_open_text_document( state.input_files.insert(params.text_document.uri.to_string(), params.text_document.text); let document_uri = params.text_document.uri; - - // Ideally we'd process the entire workspace (only if we don't have another open file in the workspace), - // but that's too slow and it makes saving and every other LSP operation take too long. - let only_process_document_uri_package = true; - let output_diagnostics = true; - match process_workspace_for_noir_document( - state, - document_uri, - only_process_document_uri_package, - output_diagnostics, - ) { + match process_workspace_for_noir_document(state, document_uri, output_diagnostics) { Ok(_) => { state.open_documents_count += 1; ControlFlow::Continue(()) @@ -66,15 +56,9 @@ pub(super) fn on_did_change_text_document( state.input_files.insert(params.text_document.uri.to_string(), text.clone()); let document_uri = params.text_document.uri; - let only_process_document_uri_package = true; let output_diagnotics = false; - match process_workspace_for_noir_document( - state, - document_uri, - only_process_document_uri_package, - output_diagnotics, - ) { + match process_workspace_for_noir_document(state, document_uri, output_diagnotics) { Ok(_) => ControlFlow::Continue(()), Err(err) => ControlFlow::Break(Err(err)), } @@ -94,15 +78,9 @@ pub(super) fn on_did_close_text_document( } let document_uri = params.text_document.uri; - let only_process_document_uri_package = true; let output_diagnotics = false; - match process_workspace_for_noir_document( - state, - document_uri, - only_process_document_uri_package, - output_diagnotics, - ) { + match process_workspace_for_noir_document(state, document_uri, output_diagnotics) { Ok(_) => ControlFlow::Continue(()), Err(err) => ControlFlow::Break(Err(err)), } @@ -113,18 +91,9 @@ pub(super) fn on_did_save_text_document( params: DidSaveTextDocumentParams, ) -> ControlFlow> { let document_uri = params.text_document.uri; - - // Ideally we'd process the entire workspace, but that's too slow and it makes - // saving and every other LSP operation take too long. - let only_process_document_uri_package = true; let output_diagnotics = true; - match process_workspace_for_noir_document( - state, - document_uri, - only_process_document_uri_package, - output_diagnotics, - ) { + match process_workspace_for_noir_document(state, document_uri, output_diagnotics) { Ok(_) => ControlFlow::Continue(()), Err(err) => ControlFlow::Break(Err(err)), } @@ -136,19 +105,15 @@ pub(super) fn on_did_save_text_document( pub(crate) fn process_workspace_for_noir_document( state: &mut LspState, document_uri: lsp_types::Url, - only_process_document_uri_package: bool, output_diagnostics: bool, ) -> Result<(), async_lsp::Error> { let file_path = document_uri.to_file_path().map_err(|_| { ResponseError::new(ErrorCode::REQUEST_FAILED, "URI is not a valid file path") })?; - let workspace = resolve_workspace_for_source_path( - &file_path, - &state.root_path, - !only_process_document_uri_package, - ) - .map_err(|lsp_error| ResponseError::new(ErrorCode::REQUEST_FAILED, lsp_error.to_string()))?; + let workspace = resolve_workspace_for_source_path(&file_path).map_err(|lsp_error| { + ResponseError::new(ErrorCode::REQUEST_FAILED, lsp_error.to_string()) + })?; let mut workspace_file_manager = file_manager_with_stdlib(&workspace.root_dir); insert_all_files_for_workspace_into_file_manager( @@ -164,10 +129,6 @@ pub(crate) fn process_workspace_for_noir_document( .flat_map(|package| -> Vec { let package_root_dir: String = package.root_dir.as_os_str().to_string_lossy().into(); - if only_process_document_uri_package && !file_path.starts_with(&package.root_dir) { - return vec![]; - } - let (mut context, crate_id) = crate::prepare_package(&workspace_file_manager, &parsed_files, package); diff --git a/tooling/lsp/src/requests/code_lens_request.rs b/tooling/lsp/src/requests/code_lens_request.rs index 5afbd6193a4..325392e150c 100644 --- a/tooling/lsp/src/requests/code_lens_request.rs +++ b/tooling/lsp/src/requests/code_lens_request.rs @@ -63,8 +63,7 @@ fn on_code_lens_request_inner( ResponseError::new(ErrorCode::REQUEST_FAILED, "Could not read file from disk") })?; - let workspace = - resolve_workspace_for_source_path(file_path.as_path(), &state.root_path, false).unwrap(); + let workspace = resolve_workspace_for_source_path(file_path.as_path()).unwrap(); let package = crate::workspace_package_for_file(&workspace, &file_path).ok_or_else(|| { ResponseError::new(ErrorCode::REQUEST_FAILED, "Could not find package for file") diff --git a/tooling/lsp/src/requests/mod.rs b/tooling/lsp/src/requests/mod.rs index 233e1fecb9c..59ce91ea681 100644 --- a/tooling/lsp/src/requests/mod.rs +++ b/tooling/lsp/src/requests/mod.rs @@ -364,8 +364,7 @@ where ResponseError::new(ErrorCode::REQUEST_FAILED, "URI is not a valid file path") })?; - let workspace = - resolve_workspace_for_source_path(file_path.as_path(), &state.root_path, false).unwrap(); + let workspace = resolve_workspace_for_source_path(file_path.as_path()).unwrap(); let package = crate::workspace_package_for_file(&workspace, &file_path).ok_or_else(|| { ResponseError::new(ErrorCode::REQUEST_FAILED, "Could not find package for file") })?; diff --git a/tooling/lsp/src/requests/references.rs b/tooling/lsp/src/requests/references.rs index 3de7bfe4f91..fa7d05da004 100644 --- a/tooling/lsp/src/requests/references.rs +++ b/tooling/lsp/src/requests/references.rs @@ -111,13 +111,11 @@ mod references_tests { let two_lib = Url::from_file_path(workspace_dir.join("two/src/lib.nr")).unwrap(); // We call this to open the document, so that the entire workspace is analyzed - let only_process_document_uri_package = false; let output_diagnostics = true; notifications::process_workspace_for_noir_document( &mut state, one_lib.clone(), - only_process_document_uri_package, output_diagnostics, ) .unwrap(); From 833eab6e0904fb10ac28c45a2886afd3689011fe Mon Sep 17 00:00:00 2001 From: Ary Borenszweig Date: Thu, 1 Aug 2024 12:18:36 -0300 Subject: [PATCH 8/9] output_diagnotics -> output_diagnostics --- tooling/lsp/src/notifications/mod.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tooling/lsp/src/notifications/mod.rs b/tooling/lsp/src/notifications/mod.rs index 528c675aa26..b8ff4fb371f 100644 --- a/tooling/lsp/src/notifications/mod.rs +++ b/tooling/lsp/src/notifications/mod.rs @@ -56,9 +56,9 @@ pub(super) fn on_did_change_text_document( state.input_files.insert(params.text_document.uri.to_string(), text.clone()); let document_uri = params.text_document.uri; - let output_diagnotics = false; + let output_diagnostics = false; - match process_workspace_for_noir_document(state, document_uri, output_diagnotics) { + match process_workspace_for_noir_document(state, document_uri, output_diagnostics) { Ok(_) => ControlFlow::Continue(()), Err(err) => ControlFlow::Break(Err(err)), } @@ -78,9 +78,9 @@ pub(super) fn on_did_close_text_document( } let document_uri = params.text_document.uri; - let output_diagnotics = false; + let output_diagnostics = false; - match process_workspace_for_noir_document(state, document_uri, output_diagnotics) { + match process_workspace_for_noir_document(state, document_uri, output_diagnostics) { Ok(_) => ControlFlow::Continue(()), Err(err) => ControlFlow::Break(Err(err)), } @@ -91,9 +91,9 @@ pub(super) fn on_did_save_text_document( params: DidSaveTextDocumentParams, ) -> ControlFlow> { let document_uri = params.text_document.uri; - let output_diagnotics = true; + let output_diagnostics = true; - match process_workspace_for_noir_document(state, document_uri, output_diagnotics) { + match process_workspace_for_noir_document(state, document_uri, output_diagnostics) { Ok(_) => ControlFlow::Continue(()), Err(err) => ControlFlow::Break(Err(err)), } From 5b07290be889d62401d343e9450c161a5fb96506 Mon Sep 17 00:00:00 2001 From: Ary Borenszweig Date: Thu, 1 Aug 2024 12:20:29 -0300 Subject: [PATCH 9/9] Add a link to an issue --- tooling/lsp/src/requests/references.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/tooling/lsp/src/requests/references.rs b/tooling/lsp/src/requests/references.rs index fa7d05da004..c720156659d 100644 --- a/tooling/lsp/src/requests/references.rs +++ b/tooling/lsp/src/requests/references.rs @@ -96,6 +96,7 @@ mod references_tests { // Ignored because making this work slows down everything, so for now things will not work // as ideally, but they'll be fast. + // See https://github.com/noir-lang/noir/issues/5460 #[ignore] #[test] async fn test_on_references_request_works_accross_workspace_packages() {