restart repo manager task if it crashes

[?]
May 21, 2025, 12:48 PM
FVA36HBVXZCYW7FMQLST63Q6IDGLJ23OIHORF67BUIO2GXYNBW2QC

Dependencies

  • [2] EC3TVL4X add untracked files
  • [3] YBJRDOTC make all repo actions async
  • [4] KM5PSZ4A watch repo once loaded
  • [5] 4WO3ZJM2 show untracked files' contents
  • [6] 23SFYK4Q big view refactor into a new crate
  • [7] ACDXXAX2 refactor main's updates into smaller fns
  • [8] ZVI4AWER woot contents_diff
  • [9] D7A7MSIH allow to defer or abandon record, add buttons
  • [10] BFN2VHZS refactor file stuff into sub-mod
  • [11] 3SYSJKYL add app icon
  • [*] 6YZAVBWU Initial commit

Change contents

  • replacement in inflorescence/src/main.rs at line 75
    [3.5476][3.5476:5633](),[3.5633][4.22:67](),[4.67][3.5633:5679](),[3.5633][3.5633:5679](),[3.5679][4.68:138](),[4.138][6.25552:25580](),[6.25580][3.5775:5848](),[3.5775][3.5775:5848](),[3.5848][6.25581:25648]()
    let (repo_tx_in, repo_rx_in) = mpsc::unbounded_channel::<repo::MsgIn>();
    let (repo_tx_out, repo_rx_out) = mpsc::unbounded_channel::<repo::MsgOut>();
    let repo_path_clone = repo_path.clone();
    let repo_task = Task::future(async move {
    repo::manage(repo_path_clone, repo_rx_in, repo_tx_out).await;
    Msg::RepoTaskExited
    });
    let repo_rx_out = UnboundedReceiverStream::new(repo_rx_out);
    let repo_msg_out_task = Task::run(repo_rx_out, Msg::FromRepo);
    [3.5476]
    [2.1996]
    let (repo_task, repo_tx_in) = start_task_to_manage_repo(repo_path.clone());
  • edit in inflorescence/src/main.rs at line 88
    [5.2176][5.2176:2203]()
    repo_msg_out_task,
  • replacement in inflorescence/src/main.rs at line 143
    [6.26032][7.143:182]()
    panic!("Repo task exited")
    [6.26032]
    [3.6820]
    error!("Task managing repo has crashed. This shouldn't happen, please report what happened!");
    info!("Starting a new task to manage repo");
    let (task, repo_tx_in) =
    start_task_to_manage_repo(state.repo_path.clone());
    state.repo_tx_in = repo_tx_in;
    task
  • edit in inflorescence/src/main.rs at line 165
    [6.26298]
    [6.26298]
    }
    fn start_task_to_manage_repo(
    repo_path: PathBuf,
    ) -> (Task<Msg>, mpsc::UnboundedSender<repo::MsgIn>) {
    let (repo_tx_in, repo_rx_in) = mpsc::unbounded_channel::<repo::MsgIn>();
    let (repo_tx_out, repo_rx_out) = mpsc::unbounded_channel::<repo::MsgOut>();
    let repo_task = Task::future(async move {
    repo::manage(repo_path, repo_rx_in, repo_tx_out).await;
    Msg::RepoTaskExited
    });
    let repo_rx_out = UnboundedReceiverStream::new(repo_rx_out);
    let repo_msg_out_task = Task::run(repo_rx_out, Msg::FromRepo);
    (Task::batch([repo_task, repo_msg_out_task]), repo_tx_in)