cargo-make
cargo-make copied to clipboard
Silent cargo make output but keep script output
Feature Description
I want to be able to get the output of a script without cargo make
steps info.
Use case
This is useful for piping the output of a script to some other tool or to a file
Describe The Solution You'd Like
A flag for silencing cargo make
output.
Current behavior
The current flags also affect the output of the script:
--loglevel, -l <LOG LEVEL>
--verbose, -v
--quiet
--silent
I can't setup flags for every possible output variation. since its for scripts, you could manually pipe relevant parts to a yarget i side the script itself
I can't setup flags for every possible output variation.
That is not what I meant. What I expected was to be able to control the log level exclusively of cargo make. The current behavior is quite limiting as it is a global option.
since its for scripts, you could manually pipe relevant parts to a yarget i side the script itself
In that case I would need a different target for every pipeline. If i need to edit an output with awk
, I would need a new target for every type of change I want to do.
This was also one of the first things I reacted over when trying out this project. I strongly dislike the verbose unrelated output.
@silven you have both --quiet and --silent to make output very minimal/off
closing due to lack of feedback
I agree this is very unusual behavior. I would expect cargo-make
's log output to be on stderr
(this is what make
does). But barring that, I would expect --quiet/--silent
to suppress only the output of cargo-make
itself, and not the commands' output.
As it is currently, there is no way to generally run a task and pipe it's output somewhere. One such use-case is to set VSCode to use a cargo-make
task as the formatter, so that we can manage using a specific rustfmt nightly in one place. This requires the stdout of the task to only contain the formatted file, which simply isn't possible without invoking some intermediary shell script with a bunch of text shuffling.
@jdygert-spok the logging config is complex already as it is. i get people saying its too much, others too little, others complain on hard to troubleshoot due to things not logged out by default and so on.... its not possible to accommodate everyone. all i can say is maybe enable via cargo make duckscript plugin capability to setup logging per task....
Here is another use case that cannot be done due to this surprising behavior. I expected to be able to configure VSCode workspace to use cargo make clippy
instead of cargo clippy
to check the code.
{
"settings": {
"rust-analyzer.check.overrideCommand": [
"cargo",
"make",
"clippy",
"--workspace",
"--message-format=json",
"--all-targets",
"--tests",
],
}
}
Because the IDE expects a JSON output from that command (see: --message-format=json
parameter), and only JSON output, this configuration is unusable.
ya, its a bit tricky but will find some solution for this...
Yep, already looking for alternatives to cargo make
.
Yep, already looking for alternatives to
cargo make
.
enjoy