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

cargo-modules structure --types --traits --fns --tests ==> error: unexpected argument '--types' found #248

Closed
rtdietrich opened this issue Dec 25, 2023 · 1 comment

Comments

@rtdietrich
Copy link

If I try your example

cargo-modules structure --types --traits --fns --tests

I got this:
error: unexpected argument '--types' found

@regexident
Copy link
Owner

Hi @rtdietrich, it looks like the README examples got out of sync with the recent CLI changes. I've opened a fix PR.

The CLI filters of cargo-modules used to be opt-in, which resulted in common commands becoming rather verbose.
So with the new CLI commands such filters were flipped from opt-in (--types --traits --fns) to opt-out (--no-types --no-traits --no-fns).

The --tests, --cfg-test and --no-cfg-test options were merged into just --cfg-test: setting it simulates a cargo test --no-run build.

The tree-generating command used to look like this:

cargo-modules generate tree --types --traits --fns --tests

And now looks like this:

cargo-modules structure --cfg-test

with the --cfg-test being optional.

See cargo-modules structure --help for all the options recognized by the command.

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

No branches or pull requests

2 participants