From 7877f7caa3535a7c477c911ddeafdf5bb14ebc14 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Fri, 27 Feb 2026 14:10:03 -0800 Subject: [WARP] Demote locking surrounding container function fetching By demoting the containers lock to read only for fetching we can prevent blocking the main ui thread while waiting for the network requests to finish --- plugins/warp/src/container.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'plugins/warp/src/container.rs') diff --git a/plugins/warp/src/container.rs b/plugins/warp/src/container.rs index b5e92bc7..79c243b3 100644 --- a/plugins/warp/src/container.rs +++ b/plugins/warp/src/container.rs @@ -39,6 +39,8 @@ pub enum ContainerError { SearchFailed(String), #[error("failed to commit source '{0}': {1}")] CommitFailed(SourceId, String), + #[error("container error encountered: {0}")] + Custom(String), } /// Represents the ID for a single container source. @@ -224,6 +226,7 @@ pub trait Container: Send + Sync + Display + Debug { /// to verify the permissions of the source. fn add_source(&mut self, path: SourcePath) -> ContainerResult; + // TODO: Make interior mutable. /// Flush changes made to a source. /// /// Because writing to a source can require file or network operations, we let the container @@ -293,7 +296,7 @@ pub trait Container: Send + Sync + Display + Debug { /// will do nothing. This function is blocking, so assume it will take a few seconds for a container /// that intends to fetch over the network. fn fetch_functions( - &mut self, + &self, _target: &Target, _tags: &[SourceTag], _functions: &[FunctionGUID], -- cgit v1.3.1