feat: cargo install astrid installs both CLI and daemon#613
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request streamlines the installation of the Astrid application by consolidating the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. One command now serves, CLI and daemon unite, Simpler setup blooms. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request aims to simplify installation by packaging both the astrid CLI and astrid-daemon into a single crate installable via cargo install. This is achieved by adding a second binary target to the astrid crate, with its source being a copy of the standalone daemon's entry point. While this approach is functional, it introduces significant code duplication. My review focuses on this key maintainability issue and proposes a refactoring to share the daemon logic from a library crate, thereby eliminating the duplicated code.
b1ad551 to
ff38da8
Compare
Add astrid-daemon as a second [[bin]] entry point in the astrid (CLI) crate. `cargo install astrid` now installs both binaries. The standalone astrid-daemon crate stays for workspace development. Also adds tokio signal feature to workspace deps (needed by daemon). Closes #612
ff38da8 to
4f5524e
Compare
Linked Issue
Closes #612
Summary
cargo install astridnow installs bothastrid(CLI) andastrid-daemonbinaries from the singleastridcrate. The daemon entry point is added as a second[[bin]]in the CLI crate's Cargo.toml.Changes
[[bin]] name = "astrid-daemon" path = "src/daemon.rs"to CLI crateastrid-kerneldependency to CLI cratesignalfeature to workspace tokio (daemon needs it for SIGTERM)src/daemon.rsis a copy of the standalone daemon'smain.rsastrid-daemoncrate unchanged (workspace development)Test Plan
Automated
cargo test --workspacepassesManual
cargo build -p astridproduces bothtarget/release/astridandtarget/release/astrid-daemonChecklist
[Unreleased]