Skip to content

Refactor CLI - #881

Merged
Jake-Shadle merged 5 commits into
mainfrom
list
Jul 9, 2026
Merged

Refactor CLI#881
Jake-Shadle merged 5 commits into
mainfrom
list

Conversation

@Jake-Shadle

@Jake-Shadle Jake-Shadle commented Jul 9, 2026

Copy link
Copy Markdown
Member

This refactors the CLI, removing clap_derive in favor of the builder approach. This is a breaking change as several options were moved from subcommands into the root, as well as removing some deprecated values/flags.

<root>

  • +
    • --config
      Previously available on the check and list subcommands, this is now specified on the root. It is also the path that will be written to when using init.
    • --metadata-path
      Previously available on the check and list subcommands, this is now specified on the root. This is the path to a file with the output of cargo metadata so that cargo is not needed.
  • -
    • --allow-git-index
      This flag was deprecated a while ago and had no effect.

check

  • -
    • -c, --config
      Moved to root as --config
    • --metadata-path
      Moved to root.
    • -d, --disable-fetch
      Now specified by the --offline flag that already existed on root.
    • --exclude-dev
      Now specified by the --exclude-dev flag that already existed on root.
    • WHICH
      The ban and license options for which checks to run were deprecated a long time ago in favor of bans and licenses for consistency, they are now removed.

fetch

  • -
    • -c, --config
      Moved to root as --config.

init

  • -
    • CONFIG
      Moved to root as --config

list

  • -
    • -c, --config
      Moved to root as --config
    • --metadata-path
      Moved to root.

Resolves: #874
Closes: #875

@Jake-Shadle
Jake-Shadle merged commit fac3d3d into main Jul 9, 2026
14 checks passed
@Jake-Shadle
Jake-Shadle deleted the list branch July 9, 2026 15:09
sam-berning added a commit to sam-berning/tough that referenced this pull request Jul 9, 2026
cargo-deny 0.20.2 deprecated the --disable-fetch flag, with its
functionality provided by the --offline flag on the root command. See
[cargo-deny#881](EmbarkStudios/cargo-deny#881)

Signed-off-by: Sam Berning <bernings@amazon.com>
sam-berning added a commit to sam-berning/tough that referenced this pull request Jul 9, 2026
cargo-deny 0.20.2 deprecated the --disable-fetch flag, with its
functionality provided by the --offline flag on the root command. See
[cargo-deny#881](EmbarkStudios/cargo-deny#881)

This is not a clean upgrade though, since --offline prevents any type of
network call, which means if we need to fetch dependency crates, the
cargo-deny command will fail. This is the case in our GitHub actions.

Since we're not running advisories checks, and this flag is only
applicable to those, we can safely remove the flag, and there is no need
to enable --offline.

Signed-off-by: Sam Berning <bernings@amazon.com>
sam-berning added a commit to sam-berning/tough that referenced this pull request Jul 10, 2026
cargo-deny 0.20.2 deprecated the --disable-fetch flag, with its
functionality provided by the --offline flag on the root command. See
[cargo-deny#881](EmbarkStudios/cargo-deny#881)

This is not a clean upgrade though, since --offline prevents any type of
network call, which means if we need to fetch dependency crates, the
cargo-deny command will fail. This is the case in our GitHub actions.

Since we're not running advisories checks, and this flag is only
applicable to those, we can safely remove the flag, and there is no need
to enable --offline.

Signed-off-by: Sam Berning <bernings@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cargo deny list refuses to show dev dependencies

1 participant