Support sarge#2
Merged
Merged
Conversation
- Add `sarge` as an optional dependency in Cargo.toml - Enable `sarge` feature by default - Introduce new module `src/cli/sarge.rs` to implement argument parsing logic for `InputArgs` and `OutputArgs` - Implement `ArgumentType` trait for `InputArgs` and `OutputArgs` with placeholder implementations using `todo!()` - Update Cargo.lock to include `sarge` crate with version 9.0.0
- Introduce `@<path>` syntax to force treating arguments as file paths - Add `=<content>` syntax for inline in-memory input content - Support `stdin`, `stdout`, and `stderr` aliases for better CLI ergonomics - Extend `InputArgs` and `OutputArgs` with helper methods and deref implementations - Implement argument parsing logic for sarge integration with auto-detection - Add new I/O providers: `InMemorySource`, `StderrOutput`, and their async counterparts - Update builders to resolve inputs/outputs using the new conventions - Include comprehensive tests for resolution logic and CLI argument handling
- Removed "sarge" from the default feature set in `Cargo.toml` - Moved CLI argument parsing tests to a dedicated module under the "sarge" feature flag - Added test cases for input/output argument handling in the new `sarge_tests.rs` file - Updated feature matrix tests to include standalone and combined usage of the "sarge" feature
- Introduce `multiio_sarge` demo binary using the `sarge` argument parser - Add end-to-end tests covering various input/output scenarios for the new CLI - Extend feature matrix to include "sarge" capability - Implement robust comma-aware splitting for repeatable CLI arguments - Support stdin/stdout alias tokens and explicit stderr output in manual CLI tests - Add XML roundtrip data fixtures for testing purposes The new binary provides a user-friendly CLI interface leveraging the sarge crate, enabling expressive and flexible I/O handling through command-line arguments.
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.
feat(cli): add support for sarge feature and argument parsing