-
Notifications
You must be signed in to change notification settings - Fork 121
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
Overrides & documentation #121
Comments
I think overall the problem you are stating is very real and I totally agree that cargo-make should provide the tools to help and make extending files more understandable.
|
Thanks for your quick response. The diff part might actually not be too hard because you don't have to do the diffing yourself. |
@thomaseizinger I just added a new output format option which should help and partially resolve some of the issues you listed in here. it would basically print a list of tasks with name and description only which give high level overview of what is going to executed. |
@thomaseizinger diff flows is now also supported via new cli command. [cargo-make] INFO - cargo make 0.16.0
[cargo-make] INFO - Using Build File: ./examples/override_core.toml
[cargo-make] INFO - Task: post-build
[cargo-make] INFO - Setting Up Env.
[cargo-make] INFO - Printing diff...
[cargo-make] INFO - Execute Command: "git" "diff" "--no-index" "/tmp/cargo-make/nIcv9f5Mur.toml" "/tmp/cargo-make/qfZeaxVN3R.toml"
diff --git a/tmp/cargo-make/nIcv9f5Mur.toml b/tmp/cargo-make/qfZeaxVN3R.toml
index 5152290..ba0ef1d 100644
--- a/tmp/cargo-make/nIcv9f5Mur.toml
+++ b/tmp/cargo-make/qfZeaxVN3R.toml
@@ -42,7 +42,9 @@
name: "post-build",
config: Task {
clear: None,
- description: None,
+ description: Some(
+ "Overide description"
+ ),
category: Some(
"Build"
),
[cargo-make] INFO - Done Using git as you recommended so it has the normal git colors for the diff. |
Awesome! Thanks a lot :) |
@thomaseizinger 0.16.1 has just been published with all changes. |
Problem Description
We have found cargo-make to be very useful, thanks for making it!
The override concept is pretty powerful but at the same time requires developers to be aware of what the defaults are in order to understand/predict, which tasks will be executed.
I've got some ideas on how
cargo-make
could help here. Some of them are orthogonal. Overall, the goal is make it possible for a developer that has basic understanding of cargo-make + is new to a project that uses it to understand, how the local configuration works.--print-steps
. The current output doesn't fit on one terminal screen, which makes it basically unusable if I want to get a quick overview of what a command will do. Maybe just print the task name + description? I think it would also add value if--print-steps
could highlight somehow, which of the tasks were modified by the local config.--diff
flag to see, how the current config modifies the built-in one. Sincecargo-make
is most likely invoked from an interactive-terminal, the output could be similar togit-diff
. (Maybe even with some nice colors?)overridden_because
that forces you to specify a small sentence on why the local config has to override the default task.If there would be other ways to configure certain things, we could also get rid of some of the overrides. For example, we wanted to remove the
--verbose
flag from the build + test arguments because it just spams our logs and doesn't really add value. Maybe there could be a way to modify the argument list of a task without having to replace it?The issue with replacing is that it is not self-documenting: A developer coming across the configuration file will not know, what the original arguments were without searching through the documentation of
cargo-make
.The text was updated successfully, but these errors were encountered: