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

resolver=2 still needed for workspaces when using rust 2021 #90148

Closed
rukai opened this issue Oct 21, 2021 · 5 comments
Closed

resolver=2 still needed for workspaces when using rust 2021 #90148

rukai opened this issue Oct 21, 2021 · 5 comments
Labels
C-bug Category: This is a bug. T-cargo Relevant to the cargo team, which will review and decide on the PR/issue.

Comments

@rukai
Copy link
Contributor

rukai commented Oct 21, 2021

This repo demonstrates the problem:
https://github.com/rukai/resolver2-workspace-bug

It includes wgpu 0.11 which requires resolver 2.

  • If you include resolver = 2 in the workspace Cargo.toml it builds fine.
  • If you remove resolver = 2 from the workspace Cargo.toml it fails with resolver = 1 related errors.

Meta

Occurs on:

  • cargo 1.57.0-nightly (7fbbf4e8f 2021-10-19)
  • cargo 1.56.0 (4ed5d137b 2021-10-04)
@rukai rukai added the C-bug Category: This is a bug. label Oct 21, 2021
@cuviper cuviper added the T-cargo Relevant to the cargo team, which will review and decide on the PR/issue. label Oct 21, 2021
@cuviper
Copy link
Member

cuviper commented Oct 21, 2021

I guess this is because a virtual manifest doesn't have an edition of its own, but this is a Cargo issue.
(I don't have access to transfer it myself.)

@rukai
Copy link
Contributor Author

rukai commented Oct 22, 2021

thanks, I can see there is already an issue there rust-lang/cargo#9996
So i'll close this one.

@rukai rukai closed this as completed Oct 22, 2021
@rukai
Copy link
Contributor Author

rukai commented Oct 22, 2021

Thinking about this, I think it really is a critical bug, possibly deserving of a 1.56.1 that either fixes the issue or rolls back resolver = 2 default,
So im reopening this as I want to make sure the right people are seeing it.
Feel free to close if thats not needed. :)

@rukai rukai reopened this Oct 22, 2021
@cuviper
Copy link
Member

cuviper commented Oct 22, 2021

We can consider that (cc @rust-lang/release), but IMO it's not a regression, so it wouldn't deserve a point release.

@ehuss
Copy link
Contributor

ehuss commented Oct 22, 2021

Thanks for the report! The resolver is inherently a global setting, and in a workspace can only be set at the workspace level. The edition cannot be set globally (tracked in rust-lang/cargo#5784), so it must be set with the resolver = "2" field. There was some clarification added to the edition guide about workspace behavior, but unfortunately did not make it into the stable docs.

I'm going to close as this is working as intended.

@ehuss ehuss closed this as completed Oct 22, 2021
mousetail added a commit to mousetail/cargo that referenced this issue May 3, 2022
It seems like `resolver = 2` is just a basic requirement to build any package with dependencies. To make the examples work it's needed. Apparently there is work to make it default (rust-lang/rust#90148) but right now it's required.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-cargo Relevant to the cargo team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants