Giter VIP home page Giter VIP logo

Comments (6)

lunacookies avatar lunacookies commented on September 27, 2024 1

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.

lunacookies avatar lunacookies commented on September 27, 2024 1

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.

lhvy avatar lhvy commented on September 27, 2024 1

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.

sebasptsch avatar sebasptsch commented on September 27, 2024

@lhvy ?

from pipes-rs.

Nukesor avatar Nukesor commented on September 27, 2024

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.

lunacookies avatar lunacookies commented on September 27, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.