Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-design of CLI interface to use subcommands for different actions #100

Closed
foresterre opened this issue Sep 24, 2021 · 2 comments
Closed

Comments

@foresterre
Copy link
Owner

foresterre commented Sep 24, 2021

Re-design of CLI interface
==========================

why?

* too many option stacked below the primary command
* certain flags and options are irrelevant for certain actions
* improve clarity

redesign based on current:
--------------------------

cargo msrv
  --output human xor json
  --no-logging

cargo msrv list
  Lists the msrv's of all (transitive) dependencies, and computes the MSRV based on these values
  --include-dev
  --include-build
  --no-transitive
  --no-compute-msrv

cargo msrv verify
  Tests a crate against a given msrv 
.... file: Cargo.toml key: metadata.msrv
.... env: CARGO_MSRV_VERIFY   
.... arg: --msrv {}

  --on-error=(
    exit,
    msrv-run,
    cargo-check,
  )

--strategy (ast, toolchain, (db))

cargo msrv run (?)
  Determine the MSRV for the given crate
  --minimum or CARGO_MSRV_MINIMUM
  --maximum or ...
  --source SOURCE or ...
  --no-edit-cargo-toml or ...
  --beta xor --nightly
  --strategy (ast, toolchain)

cargo msrv install
	(no args) install [package.metadata.msrv] toolchain

cargo msrv pre-install-toolchain
	
	(list of versions) these versions
	(version range) 
	(expected bisection range)

   (Pre) install toolchains for current platform if necessary

longer term:
------------

cargo msrv submit
   Submit (vote) working versions to database

cargo msrv lookup 
  Attempts to look up the msrv of dependencies
  Uses Cargo.toml metadata.msrv or/and database
  As obtained sources by cargo

exported from notes

@danieleades
Copy link
Contributor

are you also interested in using Clap's declarative syntax for defining the CLI?

@foresterre
Copy link
Owner Author

foresterre commented Sep 25, 2021

are you also interested in using Clap's declarative syntax for defining the CLI?

I don't think that's directly related to the discussion above; so we should make a new issue for this 😄.
Within this issue I intend to discuss what the interface should look like; not so much how we would implement it :).

@foresterre foresterre changed the title Re-design of CLI interface Re-design of CLI interface to use subcommands for different actions Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants