matklad/cargo-xtask

Example does not use the recommended approach (workspaces)

epage opened this issue · 6 comments

epage commented

Usually, but not always, the workspace setup is better.

Seems like we should use workspaces in the example if its the approach we recommend.

I'd be interested in hearing more about what exactly this means; what is "the workspace approach"?

@steveklabnik so you can put two different things in .cargo/config as an alias:

[alias]
xtask = "run --manifest-path ./xtask/Cargo.toml --"
[alias]
xtask = "run --package xtask --"

The second one requires that xtask is a part of the workspace, the first one works even if it isn't.

And yeah, we probably should show workspace by default, and leave non-workspace to a footnote.

Ah, I see. Thanks! I will go change my new xtask 😅

Can I nerd-snipe you into sending a PR to the docs? ^^