Keeping xtask dependencies in sync with regular crates?
epage opened this issue · 4 comments
Writing up #4 got me thinking that it'd be easy for people to get their xtask versions out of sync with their other crates. Having the xtask
in the workspace helps by
- Tools that update
Cargo.toml
are more likely to find the xtasks and update them - Shared lock file between the regular crates and the xtasks.
Should we recommend xtasks be part of the workspace? Possible with package.publish = false
. Should we at least document this trade off?
Good points!
I see benefits of keeping xtasks withing or outside the workspace, I've documented the tradeoffs in 15ac41b
That is a good point about using --package
. That reminds me of one of the concerns I've not had the chance to test: the CWD for aliases. I assume cargo doesn't change the CWD so the alias with --manifest-path
would only work in the root directory, breaking people's assumptions. This wouldn't be a problem with --package
.
Because of the CWD issue, should we switch which it so that workspaces are the default recommendation?
Hm, agree. Yeah, let's make workspace a preferred setup, but not that there are valid cases to not use a workspace (easier caching of xtasks/target and avoinding feature unification)