refactor: migrate man page generation to cargo xtask#109
Merged
Conversation
Move man page generation from user-facing `daft man` command to a cargo xtask pattern. Man pages are now pre-generated and committed to the repository. Key changes: - Create xtask package with gen-man subcommand - Convert to Cargo workspace with xtask member - Expose commands module from library for xtask access - Pre-generate all 11 man pages in man/ directory - Remove daft man command from main binary - Move clap_mangen dependency to xtask only - Update Homebrew formula to install pre-generated man pages - Add xtask-test job to CI for verification - Update justfile with gen-man, install-man, verify-man recipes Benefits: - Smaller release binary (clap_mangen not bundled) - Simpler user experience (no need to generate man pages) - CI verification that man pages stay in sync with code Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove /man/ from .gitignore to allow committing pre-generated man pages - Add all 11 pre-generated man pages to repository - Mark remote.rs tests as #[ignore] since they require network access to the origin remote which is not available in CI Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
In CI environments with parallel test execution, the current directory might become invalid if another test deletes its temp directory. Update test_current_directory to gracefully handle this case. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.
Summary
daft mancommand to cargo xtask patternman/directoryclap_mangenfrom main binary dependencies (moved to xtask only)Changes
New files:
xtask/Cargo.toml- New package for development automationxtask/src/main.rs- gen-man subcommand implementation with testsKey modifications:
Cargo.toml- Added workspace config, removed clap_mangensrc/lib.rs- Expose commands module for xtask accesssrc/commands/mod.rs- Remove man modulejustfile- Updated gen-man, install-man; added verify-man.github/workflows/test.yml- Add xtask-test job.github/workflows/release.yml- Install pre-generated man pages in HomebrewDeleted:
src/commands/man.rs- User-facing man page generationTest plan
cargo test --libpasses (excluding network-dependent tests)cargo test --package xtaskpassescargo clippy -- -D warningspassescargo fmt -- --checkpassesjust gen-mangenerates all 11 man pagesjust verify-manconfirms man pages are up-to-date🤖 Generated with Claude Code