GithubHelp home page GithubHelp logo

Comments (4)

c-git avatar c-git commented on September 28, 2024

Humm if I may share an opinion on this. At first glace it doesn't appear to need to be a breaking change. Isn't it possible to support both (the -m without any args) and the subcommand with args?

from trippy.

fujiapple852 avatar fujiapple852 commented on September 28, 2024

@c-git it would be possible, but perhaps not desirable.

The motivation for introducing sub-commands is so that each sub-command can have bespoke arguments without polluting the common argument namespace.

So for example, for the dot report we wish to add some arguments to dictate how it is rendered and these arguments would not make sense for other reports or for the Tui. Likewise the various --tui-xxx arguments do not make sense when running in non-Tui modes but are allowed today. This is essentially applying the classic "make invalid state unrepresentable" guidance to command line arguments.

If we were to preserve the current --mode argument it would, at best, be restricted to specify default arguments for the sub-command.

More generally, until Trippy hits 1.0 it should be considered unstable (technically going from 0.x to 0.x+1 allows for breaking changes in the Cargo semver rules) such that we are not locked into non-optimal design choices prematurely.

Therefore I'd prefer to deprecate (with a runtime warning) and include a prominent notice in the release note.

This may all be moot however, as we can only switch to use sub-commands if we can discover the magic incantations needed to allow clap to make positional arguments mandatory in sub-commands.

from trippy.

c-git avatar c-git commented on September 28, 2024

Yeah this makes sense. I think it's better to keep it clean.

from trippy.

fujiapple852 avatar fujiapple852 commented on September 28, 2024

Putting this on the backlog for now, may revisit the idea in the future.

from trippy.

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.