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

Using eframe >= 1.17.0 in a workspace requires cargo resolver v2 #1307

Closed
DusterTheFirst opened this issue Feb 25, 2022 · 2 comments
Closed

Comments

@DusterTheFirst
Copy link
Contributor

When using eframe (especially compiling for wasm32-unknown-unknown) version 1.17, the code will fail to compile when using cargo resolver v1. For most recent crates (edition 2021) this should not be a problem, but when using multiple edition 2021 crates in a workspace with a virtual manifest, the resolver v1 will be used. This is marked as working as intended see here, but can be confusing when expecting to be using the resolver v2 in your workspace.

It would be useful to inform consumers of eframe (especially wasm32) that resolver v2 is required.

Resolver v1 failing is caused by these dependencies on eframe:

https://github.com/emilk/egui/blob/master/eframe/Cargo.toml#L55-L63

Intuitively this looks correct, and with resolver v2 is is correct. But in resolver v1, the features for target.'cfg(not(target_arch = "wasm32"))'.dependencies and target.'cfg(target_arch = "wasm32")'.dependencies are merged, meaning that the egui_glow/winit feature is enabled on wasm32, but the egui-winit dependency is not specified. This leads to a weird error in eframe of the external crate egui-winit not being found when compiling to wasm32.

@DusterTheFirst
Copy link
Contributor Author

This may be the same issue as is being fixed in #1303

@emilk
Copy link
Owner

emilk commented Mar 7, 2022

Closed by #1303 (if not, please tell me and I'll reopen this)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants