diff options
| author | soryu <soryu@soryu.co> | 2026-04-28 00:55:25 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-28 00:55:25 +0100 |
| commit | 5aa3fafb4acfa89c7d04e84abf7861607733e8ce (patch) | |
| tree | 8a444bcc3b595c5655b71e76a70e7b47936225f8 /makima/src/daemon | |
| parent | d6f01a69f61a40843054f27b427687e1fa1cedfb (diff) | |
| download | soryu-5aa3fafb4acfa89c7d04e84abf7861607733e8ce.tar.gz soryu-5aa3fafb4acfa89c7d04e84abf7861607733e8ce.zip | |
fix: resolve compilation error and warnings in Rust backend (#95)
* fix: resolve compilation error and warnings in Rust backend
- Fix syntax error in directive.rs phase_replanning (bad merge created
duplicate code blocks with broken `.await {` syntax)
- Remove unused imports: WorktreeError, DaemonReauthStatus, ratatui::prelude
- Prefix unused variables with underscore: claude_command, content, owner_id
- Suppress unused_assignments warning on final_exit_code
- Add #[allow(unused_imports)] for cfg(unix) CommandExt imports
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* WIP: heartbeat checkpoint
* fix: suppress remaining compiler warnings for clean build
- Add #[allow(dead_code)] for unused but intentionally kept functions
- Remove useless self-assignments in listen handler
- Fixes: truncate_string, checkout_commit, handle_get_worktree_diff,
default_max_retries, STREAM_CHUNK_MS, listen(), MessageResponse.role
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'makima/src/daemon')
| -rw-r--r-- | makima/src/daemon/process/claude.rs | 2 | ||||
| -rw-r--r-- | makima/src/daemon/storage/patch.rs | 1 | ||||
| -rw-r--r-- | makima/src/daemon/task/manager.rs | 6 | ||||
| -rw-r--r-- | makima/src/daemon/tui/mod.rs | 1 |
4 files changed, 7 insertions, 3 deletions
diff --git a/makima/src/daemon/process/claude.rs b/makima/src/daemon/process/claude.rs index 57c8f77..aa18fab 100644 --- a/makima/src/daemon/process/claude.rs +++ b/makima/src/daemon/process/claude.rs @@ -577,6 +577,7 @@ impl ProcessManager { // On Unix, create a new process group so we can kill all child processes #[cfg(unix)] { + #[allow(unused_imports)] use std::os::unix::process::CommandExt; cmd.process_group(0); } @@ -762,6 +763,7 @@ impl ProcessManager { // On Unix, create a new process group so we can kill all child processes #[cfg(unix)] { + #[allow(unused_imports)] use std::os::unix::process::CommandExt; cmd.process_group(0); } diff --git a/makima/src/daemon/storage/patch.rs b/makima/src/daemon/storage/patch.rs index 05c45a3..c9bc6f5 100644 --- a/makima/src/daemon/storage/patch.rs +++ b/makima/src/daemon/storage/patch.rs @@ -387,6 +387,7 @@ fn parse_diff_stat(stat_output: &str) -> (usize, usize) { } /// Checkout a specific commit in the worktree. +#[allow(dead_code)] pub async fn checkout_commit(worktree_path: &Path, sha: &str) -> Result<(), PatchError> { let output = Command::new("git") .current_dir(worktree_path) diff --git a/makima/src/daemon/task/manager.rs b/makima/src/daemon/task/manager.rs index ca97453..f483218 100644 --- a/makima/src/daemon/task/manager.rs +++ b/makima/src/daemon/task/manager.rs @@ -20,7 +20,7 @@ use crate::daemon::error::{DaemonError, TaskError, TaskResult}; use crate::daemon::process::{ClaudeInputMessage, ProcessManager}; use crate::daemon::storage; use crate::daemon::temp::TempManager; -use crate::daemon::worktree::{is_new_repo_request, ConflictResolution, WorktreeError, WorktreeInfo, WorktreeManager}; +use crate::daemon::worktree::{is_new_repo_request, ConflictResolution, WorktreeInfo, WorktreeManager}; use crate::daemon::db::local::LocalDb; use crate::daemon::ws::{BranchInfo, DaemonCommand, DaemonMessage}; @@ -3706,6 +3706,7 @@ impl TaskManager { } /// Handle GetWorktreeDiff command - get git diff for a task's worktree. + #[allow(dead_code)] async fn handle_get_worktree_diff( &self, task_id: Uuid, @@ -5622,7 +5623,7 @@ impl TaskManagerInner { let ws_tx = self.ws_tx.clone(); // For auth error detection - let claude_command = self.process_manager.claude_command().to_string(); + let _claude_command = self.process_manager.claude_command().to_string(); let daemon_hostname = hostname::get().ok().and_then(|h| h.into_string().ok()); let mut auth_error_handled = false; @@ -5630,6 +5631,7 @@ impl TaskManagerInner { let mut accumulated_output = String::new(); let mut circuit_breaker = CircuitBreaker::new(); let mut iteration_count = 0u32; + #[allow(unused_assignments)] let mut final_exit_code: i64 = -1; // Track the final exit code across iterations // Autonomous loop: we may run multiple iterations diff --git a/makima/src/daemon/tui/mod.rs b/makima/src/daemon/tui/mod.rs index e52b12a..46652ec 100644 --- a/makima/src/daemon/tui/mod.rs +++ b/makima/src/daemon/tui/mod.rs @@ -26,7 +26,6 @@ use crossterm::{ execute, terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen}, }; -use ratatui::prelude::*; use ratatui::backend::CrosstermBackend; pub type Terminal = ratatui::Terminal<CrosstermBackend<io::Stdout>>; |
