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

Improve actionability of "resolver = 2" error #2217

Closed
alice-i-cecile opened this issue Nov 27, 2021 · 6 comments
Closed

Improve actionability of "resolver = 2" error #2217

alice-i-cecile opened this issue Nov 27, 2021 · 6 comments
Labels
area: ecosystem Help the connected projects grow and prosper good first issue Good for newcomers help required We need community help to make this happen.

Comments

@alice-i-cecile
Copy link
Collaborator

Bevy users have been getting an error that looks like:

error: DX12 API enabled on non-Windows OS. If your project is not using resolver="2" in Cargo.toml, it should.

This is not very actionable or accessible for new users. Ideally, this error could be made somewhat more verbose to explain how to do this (and mention that they could swap to Rust 2021 instead).

Motivated by bevyengine/bevy#3205

@yottapanda
Copy link

yottapanda commented Nov 27, 2021

The docs that explain how to "fix" this: https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions

@kvark kvark added the area: ecosystem Help the connected projects grow and prosper label Nov 27, 2021
@Imberflur
Copy link
Contributor

Imberflur commented Nov 28, 2021

In regards to Rust 2021, I would like to note that it is somewhat misleading with respect to workspaces since you will need to specify resolver="2" in the workspace Cargo.toml regardless of the Rust edition being used for the contained crates.

(edit: that is when using a "virtual" manifest)

@fintelia
Copy link
Contributor

fintelia commented Nov 30, 2021

If you don't want to include a more complete description in the error message, including a link could still provide a hint of where to find more details. Either to the URL @thechubbypanda suggested, to this issue, or whatever

@alice-i-cecile
Copy link
Collaborator Author

Some users aren't seeing this error at all: I'm not entirely sure why, and can't reproduce locally on Windows 10 :(

@cwfitzgerald cwfitzgerald added help required We need community help to make this happen. good first issue Good for newcomers labels Jun 2, 2022
@Imberflur
Copy link
Contributor

Cargo added a warning when the resolver isn't explicitly specified in a workspace containing crates using newer editions: rust-lang/cargo#10910

Although, this probably doesn't completely address the issue since a user could still explicitly set resolver = 1. Also, if wgpu is already a dependency, I suspect the new warning would still get lost in the errors that are generated when the resolver is not 2.

@cwfitzgerald
Copy link
Member

This isn't going to be a problem anymore as we shouldn't require it as of v0.16.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ecosystem Help the connected projects grow and prosper good first issue Good for newcomers help required We need community help to make this happen.
Projects
None yet
Development

No branches or pull requests

6 participants