Version 2.0.0
Breaking change
This release marks a complete rework of the cargo-valgrind
tool in version 1.x
. This includes two kinds of change:
- CLI changes, that directly influence the users
- internal code changes in this tool
CLI changes
The first change is the most important one: instead of handling everything by cargo valgrind <FLAGS>
, where <FLAGS>
denote the actual action, the program is now called like this:
cargo valgrind run
for running the current binarycargo valgrind test
for running all kinds of testscargo valgrind run --example foo
for running the examplefoo
- ...
This new command line supports every runnable target, that the normal cargo
supports (likely even other cargo subcommands). Therefore most user-issues like "unit tests cannot be run" are now a thing of the past!
The downside of this change is the new command line, that has to be used. The changed command line is necessary due to the following internal changes:
Internal changes
This release marks a step in a completely new direction of this tool. Instead of parsing the command line and crucially the cargo
metadata ourselves, the tool now uses cargo
itself to handle the stuff, cargo
knows about the best: what binary is produced by which command (the building was done by cargo
in the older version 1.x
of cargo-valgrind
).
This greatly reduces the lines of code needed, as well as the complexity of the code. The now much more simple code is therefore also extendible in a more easy way.