From 55e4e1dc584d2785d91ec2e00a4fd802ca3095f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Fri, 15 Oct 2021 23:00:41 +1300 Subject: [PATCH] Review TODOs in the code --- lib/src/action.rs | 2 +- lib/src/error.rs | 1 - lib/src/filter/tagged.rs | 3 +-- lib/src/fs.rs | 1 + lib/src/signal.rs | 1 - 5 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/src/action.rs b/lib/src/action.rs index 693d7dfa..aab60b93 100644 --- a/lib/src/action.rs +++ b/lib/src/action.rs @@ -226,7 +226,7 @@ async fn apply_outcome( .handle(post_spawn) .map_err(|e| rte("action post-spawn", e))?; - // TODO: consider what we want to do for processes still running here? + // TODO: consider what we want to do for (previous) process if it's still running here? *process = Some(sup); } } diff --git a/lib/src/error.rs b/lib/src/error.rs index b539bd7c..ad583c13 100644 --- a/lib/src/error.rs +++ b/lib/src/error.rs @@ -186,7 +186,6 @@ pub enum RuntimeError { #[source] err: Box, - // FIXME: can we have dyn Diagnostic here or downcast it somehow? }, } diff --git a/lib/src/filter/tagged.rs b/lib/src/filter/tagged.rs index 9dce6c6f..3b8a9240 100644 --- a/lib/src/filter/tagged.rs +++ b/lib/src/filter/tagged.rs @@ -185,7 +185,6 @@ impl TaggedFilterer { origin: impl Into, workdir: impl Into, ) -> Result, TaggedFiltererError> { - // TODO: make it criticalerror Ok(Arc::new(Self { origin: canonicalize(origin.into())?, workdir: canonicalize(workdir.into())?, @@ -396,7 +395,7 @@ pub struct Filter { } impl Filter { - // TODO non-unicode matching + // TODO: non-unicode matching pub fn matches(&self, subject: impl AsRef) -> Result { let subject = subject.as_ref(); diff --git a/lib/src/fs.rs b/lib/src/fs.rs index 49f1cefc..fd5df379 100644 --- a/lib/src/fs.rs +++ b/lib/src/fs.rs @@ -213,6 +213,7 @@ pub async fn worker( errors.send(e).await?; } // TODO: unwatch and re-watch manually while ignoring all the erroring paths + // See https://github.com/watchexec/watchexec/issues/218 } else { pathset.insert(path); } diff --git a/lib/src/signal.rs b/lib/src/signal.rs index cc1e210f..2dce3783 100644 --- a/lib/src/signal.rs +++ b/lib/src/signal.rs @@ -163,7 +163,6 @@ async fn imp_worker( } // TODO: figure out how to prioritise signals. -// TODO: also, figure out why event processing is stalling when the channel limit is reached (when there are lots of fs events). async fn send_event( errors: mpsc::Sender, events: mpsc::Sender,