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

Pin web-sys dependency to < 0.3.70. #159

Merged
merged 1 commit into from
Sep 2, 2024
Merged

Conversation

BGR360
Copy link
Contributor

@BGR360 BGR360 commented Sep 2, 2024

This allows eframe_template to compile when switching from glow to wgpu backend.

Fixes #158.

@emilk emilk merged commit 5056822 into emilk:main Sep 2, 2024
12 checks passed
@emilk
Copy link
Owner

emilk commented Sep 2, 2024

Thanks!

emilk pushed a commit that referenced this pull request Sep 2, 2024
This PR builds upon #159 and updates a few dependencies in `Cargo.lock`
so that `eframe_template` can be compiled with the `wgpu` backend
*without* removing and regenerating `Cargo.lock` from scratch.

Before this change, the following compile error occurs after switching
from `glow` to `wgpu` backend:

```
ben@Bens-MacBook-Pro eframe_template % cargo check
error: failed to select a version for `termcolor`.
    ... required by package `naga v0.20.0`
    ... which satisfies dependency `naga = "^0.20.0"` of package `wgpu v0.20.1`
    ... which satisfies dependency `wgpu = "^0.20.0"` of package `eframe v0.28.0`
    ... which satisfies dependency `eframe = "^0.28"` (locked to 0.28.0) of package `eframe_template v0.1.0 (/Users/ben/Documents/Fractals/eframe_template)`
versions that meet the requirements `^1.4.1` are: 1.4.1

all possible versions conflict with previously selected packages.

  previously selected package `termcolor v1.4.0`
    ... which satisfies dependency `termcolor = "^1.1.1"` (locked to 1.4.0) of package `env_logger v0.10.1`
    ... which satisfies dependency `env_logger = "^0.10"` (locked to 0.10.1) of package `eframe_template v0.1.0 (/Users/ben/Documents/Fractals/eframe_template)`

failed to select a version for `termcolor` which could resolve this conflict
```

So I removed the `termcolor` entry from `Cargo.lock` and recompiled so
that it would choose another version that works:

```
ben@Bens-MacBook-Pro eframe_template % cargo check
error: failed to select a version for `js-sys`.
    ... required by package `wgpu v0.20.1`
    ... which satisfies dependency `wgpu = "^0.20.0"` of package `eframe v0.28.0`
    ... which satisfies dependency `eframe = "^0.28"` (locked to 0.28.0) of package `eframe_template v0.1.0 (/Users/ben/Documents/Fractals/eframe_template)`
versions that meet the requirements `^0.3.69` are: 0.3.70, 0.3.69

all possible versions conflict with previously selected packages.

  previously selected package `js-sys v0.3.66`
    ... which satisfies dependency `js-sys = "^0.3"` (locked to 0.3.66) of package `eframe v0.28.0`
    ... which satisfies dependency `eframe = "^0.28"` (locked to 0.28.0) of package `eframe_template v0.1.0 (/Users/ben/Documents/Fractals/eframe_template)`

failed to select a version for `js-sys` which could resolve this conflict
```

Then I did the same for `js-sys` and recompiled:

```
ben@Bens-MacBook-Pro eframe_template % cargo check
error: failed to select a version for `wasm-bindgen-futures`.
    ... required by package `wgpu v0.20.1`
    ... which satisfies dependency `wgpu = "^0.20.0"` of package `eframe v0.28.0`
    ... which satisfies dependency `eframe = "^0.28"` (locked to 0.28.0) of package `eframe_template v0.1.0 (/Users/ben/Documents/Fractals/eframe_template)`
versions that meet the requirements `^0.4.42` are: 0.4.43, 0.4.42

all possible versions conflict with previously selected packages.

  previously selected package `wasm-bindgen-futures v0.4.39`
    ... which satisfies dependency `wasm-bindgen-futures = "^0.4"` (locked to 0.4.39) of package `eframe_template v0.1.0 (/Users/ben/Documents/Fractals/eframe_template)`

failed to select a version for `wasm-bindgen-futures` which could resolve this conflict
```

And finally I did the same for `wasm-bindgen-futures` and recompiled,
and it worked just fine.

I'm not sure if this is the proper way to resolve this issue. Let me
know if I should have done something different.
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

Successfully merging this pull request may close these issues.

web-sys 0.3.70 breaking change in unstable Clipboard API causes compilation failure with wgpu backend
2 participants