Comments (6)
Clap v4 must’ve changed how #[arg(value_parser)]
works, since not only does --palette
with any correct value trigger this panic, but so do --color-mode
, --bold
and --inherit-style
. Clap has now released v5. Rather than erroneously upgrading without proper testing as happened with Clap v4, I propose we roll our own CLI argument parsing. @lhvy How do you feel about this?
from pipes-rs.
After reading your comment, I was wondering why they already created a v5. But I couldn't find a v5 and there also doesn't seem to be a yanked release (the last one was
v3.0.0-beta.3
) https://crates.io/crates/clap/versions
You are, of course, completely right :) Turns out I saw v5 in the changelog, but yeah it looks like they haven’t released v5 anywhere. I’m not completely sure what’s up with that, though I’m sure there’s an explanation.
Clap recently did many refactorings and major breaking changes in order to get their API cleaned up and I would say they managed to do so. The crate is now much more mature, they managed to hide unwanted complexity behind feature flags and streamlined their API.
Thanks for the info! That’s good news, I’ll have to take a look at the changes.
Writing your own implementation of something hundreds of people racked their brains about will just resolve in much more maintenance work and new bugs for this project. IMO the better cause of action would be to help out with the development of
clap
instead.
Respectfully, I disagree. The tiny subset of Clap’s functionality strictly necessary for pipes-rs (short options, long options) is trivial to implement, and the rest isn’t much effort (Levenshtein distance-based typo correction, colored help output).
from pipes-rs.
Sure. I should have some time soon. Should we decide on what we want to do from here and then fix this up?
from pipes-rs.
@lhvy ?
from pipes-rs.
Clap v4 must’ve changed how
#[arg(value_parser)]
works, since not only does--palette
with any correct value trigger this panic, but so do--color-mode
,--bold
and--inherit-style
. Clap has now released v5. Rather than erroneously upgrading without proper testing as happened with Clap v4, I propose we roll our own CLI argument parsing. @lhvy How do you feel about this?
After reading your comment, I was wondering why they already created a v5.
But I couldn't find a v5 and there also doesn't seem to be a yanked release (the last one was v3.0.0-beta.3
)
https://crates.io/crates/clap/versions
I'm not involved into this project and just stumbled accross this issue, but rolling your own CLI argument parsing sounds like a bad idea. Clap recently did many refactorings and major breaking changes in order to get their API cleaned up and I would say they managed to do so. The crate is now much more mature, they managed to hide unwanted complexity behind feature flags and streamlined their API.
Writing your own implementation of something hundreds of people racked their brains about will just resolve in much more maintenance work and new bugs for this project. IMO the better cause of action would be to help out with the development of clap
instead.
from pipes-rs.
@lhvy It occurred to me that, in the over-engineered spirit of this project, it might be nice to add automated tests for the command-line interface so these sorts of bugs can be caught in the future.
from pipes-rs.
Related Issues (20)
- rainbow mode! HOT 3
- Migrate to clap v4
- Compensate for character dimensions
- Publish to crates.io? HOT 5
- Replace cargo install instructions with command to cargo install latest version HOT 1
- Build universal binaries for macOS
- Using config file: `Error: failed to read config` HOT 3
- Readme typo HOT 3
- Switch to alternate allocator
- Build failed, Compiling nanorand v0.5.2, error[E0277]: arrays only have std trait implementations for lengths 0..=32 HOT 1
- List available keys in the readme
- Performance issues with large numbers of pipes HOT 2
- Should we limit the FPS? HOT 1
- Fails to install HOT 3
- Typo in readme HOT 1
- Set `codegen_units` to 1 for release builds HOT 1
- Set `panic = "abort"` for release builds HOT 1
- Add benchmarks HOT 1
- Use newly-stabilised `std::ops::ControlFlow` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pipes-rs.