refactor(zeph-core): remove anyhow, replace with typed thiserror errors#1750
Merged
refactor(zeph-core): remove anyhow, replace with typed thiserror errors#1750
Conversation
Closes #1742. - SubAgentError: remove Other(#[from] anyhow::Error); add Llm(String), Channel(String), TaskPanic(String) variants - run_agent_loop return type: anyhow::Result<String> -> Result<String, SubAgentError> - SubAgentHandle::join_handle and all spawn sites updated accordingly - ConfigWatcherError: new pub enum with NoParentDir, NoFilename, Notify(#[from] notify::Error) variants; ConfigWatcher::start return type updated - Remove anyhow from zeph-core Cargo.toml [dependencies]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1742.
Summary
SubAgentError: removeOther(#[from] anyhow::Error); addLlm(String),Channel(String),TaskPanic(String)variantsrun_agent_loopreturn type changed fromanyhow::Result<String>toResult<String, SubAgentError>SubAgentHandle::join_handlefield and all four spawn sites updated toJoinHandle<Result<String, SubAgentError>>ConfigWatcherError: newpub enumwithNoParentDir,NoFilename,Notify(#[from] notify::Error);ConfigWatcher::startreturn type updated accordinglyanyhowremoved fromzeph-core[dependencies]inCargo.tomlTest plan
cargo +nightly fmt --checkpassescargo clippy --workspace --features full -- -D warningspasses (0 warnings)cargo nextest run --config-file .github/nextest.toml --workspace --features full --lib --binspasses (5427 passed, 12 skipped)grep -r 'anyhow' crates/zeph-core/src/returns empty