Skip to content

Workspaces: skip setup for all members #1254

@jaskij

Description

@jaskij

Feature Description

Skip gathering crate and rust information for workspace members only

Describe The Solution You'd Like

A config option that enables that, similar to skip_crate_env_info

Use case

I have a monorepo with thirteen different crates, organized as a single workspace. Currently, cargo-make takes over a second per crate, most of that gathering information.

A typical case would have timings like below, with ~120 ms spent actually checking, and ~900 ms of cargo-make overhead.

Adding the three skip_x_env_info options to member crates is a valid workaround, reducing the overhead to ~90 ms.

What I would like is that, instead of copy-pasting the same Makefile.toml between thirteen member crates (and remembering to add it to future ones!), I am able to set this option once, workspace-wide.

[cargo-make][1] INFO - Execute Command: "cargo" "check"
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.12s
[cargo-make][1] INFO - ==================Time Summary==================
[cargo-make][1] INFO - [Setup Env]:                44.04%     0.81 seconds
[cargo-make][1] INFO - [Setup Env - Crate Info]:   39.00%     0.71 seconds
[cargo-make][1] INFO - check:                      11.93%     0.22 seconds
[cargo-make][1] INFO - [Setup Env - Rust]:         4.60%      0.08 seconds
[cargo-make][1] INFO - [Setup Env - Git]:          0.44%      0.01 seconds
[cargo-make][1] INFO - [Load Makefiles]:           0.00%      0.00 seconds
[cargo-make][1] INFO - [Setup Env - Duckscript]:   0.00%      0.00 seconds
[cargo-make][1] INFO - [Setup Env - CI]:           0.00%      0.00 seconds
[cargo-make][1] INFO - [Setup Env - Project]:      0.00%      0.00 seconds
[cargo-make][1] INFO - [Setup Env - Vars]:         0.00%      0.00 seconds
[cargo-make][1] INFO - ================================================
[cargo-make][1] INFO - Build Done in 1.02 seconds.

Workspace level Makefile.toml:

[config]
skip_core_tasks = true

[env]
CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true

[tasks.deny]
command = "cargo"
args = ["deny", "--workspace", "check"]

[tasks.check]
command = "cargo"
args = ["check"]

[tasks.full-check]
dependencies = [
    "deny",
    "check"
]

[tasks.default]
alias = "full-check"

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions