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

Add 'extend' capability for tasks #206

Closed
sagiegurari opened this issue Mar 17, 2019 · 3 comments
Closed

Add 'extend' capability for tasks #206

sagiegurari opened this issue Mar 17, 2019 · 3 comments
Assignees
Milestone

Comments

@sagiegurari
Copy link
Owner

Features Description
Add a new 'extend' attribute for tasks to enable it to extend any other task.
This will enable to create a 'template' task from which actual implementations with few changes extend from.

@sagiegurari sagiegurari added this to the 0.17.0 milestone Mar 17, 2019
@sagiegurari sagiegurari self-assigned this Mar 17, 2019
@sagiegurari
Copy link
Owner Author

#201

@ssokolow
Copy link

You'll want to document that an explicit private = false is necessary in this situation:

[config.modify_core_tasks]
private = true
namespace = "default"

[tasks.kcov]
extend="default::coverage-kcov"
private = false

If someone's used to thinking in terms of object-oriented programming, it probably won't occur to them that you can change something's public/private status when extending it, they'll run into this error, and then mistakenly conclude that it's impossible:

[cargo-make] INFO - Using Build File: Makefile.toml
[cargo-make] INFO - Task: kcov
[cargo-make] INFO - Profile: development
[cargo-make] ERROR - Task kcov is private
[cargo-make] WARN - Build Failed.

I was actually caught by that assumption for a moment.

@sagiegurari
Copy link
Owner Author

I'll add this to the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants