Open MarcoIeni opened 7 months ago
That'd be quite nice!
I would use the same CLI structure of cargo fmt
(i.e. cargo autoinherit --check
) though.
Yes, I think it's fine đź‘Ť The only downside I see is that there could be confusion if we want to add other flags to the check operation. We should explain that certain flags only apply if the check flag is passed.
This risk can be mitigated with a configuration file. I.e. devs specify their desired behavior with the config file instead of flags.
I lean towards having minimal or no configuration options, although it's always difficult to predict the future. A proper sub-command is certainly more flexible.
There could also be a flag to warn on mismatched versions as described in the readme, so they can be resolved manually
There could also be a flag to warn on mismatched versions as described in the readme, so they can be resolved manually
That's already the case—any version conflict is reported in the terminal. We exit with a success status code though.
It would be great to run this tool in CI to check if there are no duplicate dependencies across the workspace (i.e. all compatible dependencies are inherited).
Something like
cargo autoinherit check
.This command should:
additional feature
There could be an additional flag to forbid dependencies which aren't inherited. Useful for maintainers who wants to specify all dependencies verdions in the main Cargo.toml