-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
docs: raise awareness of resolver used inside workspace #12388
Conversation
Workspaces by default use the resolver in version 1. It's been some time already since the 2021 edition which made version 2 a default for the alone packages, but yet most of the projects that make a use of the workspaces still depends on an old resolver. By being explicit about the resolver tag inside the workspace we can lower the usage of older resolver for the new projects.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ehuss (or someone else) soon. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
I feel like there was another PR that did something similar that I wanted to reference for comparing but so far I can't find it. As for raising awareness of this, in 1.72 we'll have a warning for this (#10910) |
Thanks, wasn't aware of #10910. It's great that there will be a warning, however I'm not sure if it makes changes to the documentation unneeded. Anyone who just goes through the |
@bors r+ |
Thanks! |
☀️ Test successful - checks-actions |
Update cargo 14 commits in 7ac9416d82cd4fc5e707c9ec3574d22dff6466e5..c91a693e7977e33a1064b63a5daf5fb689f01651 2023-07-24 14:29:38 +0000 to 2023-07-31 00:26:46 +0000 - fix: align `cargo --help` text (rust-lang/cargo#12418) - fix: normalize relative git submodule urls with `ssh://` (rust-lang/cargo#12411) - test: relax help text assertion (rust-lang/cargo#12416) - test: relax assertions of panic handler message format (rust-lang/cargo#12413) - fix(package): Recognize and normalize `cargo.toml` (rust-lang/cargo#12399) - Clarify `lto` setting passing `-Clinker-plugin-lto` (rust-lang/cargo#12407) - doc: add missing reference to `CARGO_PROFILE_<name>_STRIP` in environment variables docs (rust-lang/cargo#12408) - Update curl-sys to pull in curl 8.2.1 (rust-lang/cargo#12406) - docs: raise awareness of resolver used inside workspace (rust-lang/cargo#12388) - chore: update `home` to 0.5.7 (rust-lang/cargo#12401) - Update curl-sys to pull in curl 8.2.0 (rust-lang/cargo#12400) - test(cli): Track --help output (rust-lang/cargo#11912) - refactor(test): Move cargo-config into a dir (rust-lang/cargo#12398) - refactor(tests): Name init ui tests more consistently (rust-lang/cargo#12397) r? `@ghost`
Workspaces by default use the resolver in version 1. It's been some time already since the 2021 edition which made version 2 a default for alone packages, but yet most of the projects that make a use of the workspaces still depends on an old resolver.
By being explicit about the resolver tag inside the workspace we can lower the usage of older resolver for the new projects.
This can raise the awareness of this behavior and prevent issues like #12387. I also wasn't aware of this behavior before while not being so new to Rust, and we have the resolver 2 for good reasons, so I think we should be more explicit about it in the documentation.
When someone looks for the 'how to make cargo workspace' answers, he's unlikely to get to the
Dependency Resolution
section at the same time, he'll likely just copy paste the workspace example from theWorkspaces
and call it a day, yet extending the usage of an old resolver and not benefiting from the new one.