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

Features added in dev-dependencies are always active inside a virtual workspace #10909

Closed
Nemo157 opened this issue Jul 28, 2022 · 2 comments
Closed
Labels
C-bug Category: bug

Comments

@Nemo157
Copy link
Member

Nemo157 commented Jul 28, 2022

Problem

If a crate has a dependency as both a normal dependency and as a dev-dependency, then the features it activates for the dev-dependency will be active during a normal build iff that crate is a member of a virtual workspace.

Steps

Playground building a local workspace showing the error: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=36347271fd4c23914346a6df034dc1dd

The Error is expected, it is the panic at the end that should not happen.

Possible Solution(s)

No response

Notes

Found while investigating rust-lang/docs.rs#1783

Version

No response

@Eh2406
Copy link
Contributor

Eh2406 commented Jul 28, 2022

resolver and workspaces interact oddly, see #10745 (comment)

@Nemo157
Copy link
Member Author

Nemo157 commented Jul 28, 2022

Ok, setting workspace.resolver = "2" does fix it; and it looks like #10112 tracks adding a warning that would have instantly diagnosed this.

@Nemo157 Nemo157 closed this as completed Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

2 participants