cargo-msrv icon indicating copy to clipboard operation
cargo-msrv copied to clipboard

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

Open foresterre opened this issue 3 years ago • 2 comments

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

foresterre avatar Sep 24 '21 00:09 foresterre

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

danieleades avatar Sep 25 '21 06:09 danieleades

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 avatar Sep 25 '21 19:09 foresterre