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

Lock the web-sys version to 0.3.67 #5211

Merged
merged 1 commit into from Feb 26, 2024
Merged

Lock the web-sys version to 0.3.67 #5211

merged 1 commit into from Feb 26, 2024

Conversation

jleibs
Copy link
Member

@jleibs jleibs commented Feb 15, 2024

What

When investigating the doc build issues I noticed that 0.3.68 is going to cause a build failure:

  Compiling rust to wasm in /home/jleibs/rerun/target_wasm…
  /home/jleibs/rerun> CARGO_ENCODED_RUSTFLAGS="--cfg=web_sys_unstable_apis" RUSTFLAGS="--cfg=web_sys_unstable_apis" "cargo" "build" "--quiet" "--package" "re_viewer" "--lib" "--target" "wasm32-unknown-unknown" "--target-dir" "/home/jleibs/rerun/target_wasm" "--no-default-features" "--features=analytics"
  error[E0061]: this function takes 1 argument but 3 arguments were supplied
     --> /home/jleibs/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.1/src/backend/webgpu.rs:375:22
      |
  375 |     let mut mapped = web_sys::GpuDepthStencilState::new(
      |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  376 |         map_compare_function(desc.depth_compare),
      |         ---------------------------------------- unexpected argument of type `GpuCompareFunction`
  377 |         desc.depth_write_enabled,
      |         ------------------------ unexpected argument of type `bool`
      |
  note: associated function defined here
     --> /home/jleibs/.cargo/registry/src/index.crates.io-6f17d22bba15001f/web-sys-0.3.68/src/features/gen_GpuDepthStencilState.rs:27:12
      |
  27  |     pub fn new(format: GpuTextureFormat) -> Self {
      |            ^^^
  help: remove the extra arguments
      |
  376 -         map_compare_function(desc.depth_compare),
  376 +         map_texture_format(desc.format),
      |

  error[E0061]: this function takes 1 argument but 2 arguments were supplied
      --> /home/jleibs/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.1/src/backend/webgpu.rs:1693:13
       |
  1693 |             web_sys::GpuVertexState::new(desc.vertex.entry_point, &module.0);
       |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -------------------------
       |                                          |
       |                                          unexpected argument of type `&str`
       |                                          help: remove the extra argument
       |
  note: associated function defined here
      --> /home/jleibs/.cargo/registry/src/index.crates.io-6f17d22bba15001f/web-sys-0.3.68/src/features/gen_GpuVertexState.rs:27:12
       |
  27   |     pub fn new(module: &GpuShaderModule) -> Self {
       |            ^^^

  error[E0061]: this function takes 2 arguments but 3 arguments were supplied
      --> /home/jleibs/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.1/src/backend/webgpu.rs:1768:17
       |
  1768 |                 web_sys::GpuFragmentState::new(frag.entry_point, &module.0, &targets);
       |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ----------------             -------- unexpected argument of type `&js_sys::Array`
       |                                                |
       |                                                expected `&GpuShaderModule`, found `&str`
       |
       = note: expected reference `&GpuShaderModule`
                  found reference `&str`
  note: associated function defined here
      --> /home/jleibs/.cargo/registry/src/index.crates.io-6f17d22bba15001f/web-sys-0.3.68/src/features/gen_GpuFragmentState.rs:27:12
       |
  27   |     pub fn new(module: &GpuShaderModule, targets: &::wasm_bindgen::JsValue) -> Self {
       |            ^^^
  help: remove the extra argument
       |
  1768 -                 web_sys::GpuFragmentState::new(frag.entry_point, &module.0, &targets);
  1768 +                 web_sys::GpuFragmentState::new(/* &GpuShaderModule */, &module.0);
       |

  error[E0061]: this function takes 1 argument but 2 arguments were supplied
      --> /home/jleibs/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.1/src/backend/webgpu.rs:1793:13
       |
  1793 |             web_sys::GpuProgrammableStage::new(desc.entry_point, &shader_module.0);
       |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ------------------
       |                                                |
       |                                                unexpected argument of type `&str`
       |                                                help: remove the extra argument
       |
  note: associated function defined here
      --> /home/jleibs/.cargo/registry/src/index.crates.io-6f17d22bba15001f/web-sys-0.3.68/src/features/gen_GpuProgrammableStage.rs:27:12
       |
  27   |     pub fn new(module: &GpuShaderModule) -> Self {
       |            ^^^

  error[E0599]: no method named `write_timestamp` found for struct `GpuCommandEncoder` in the current scope
      --> /home/jleibs/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.1/src/backend/webgpu.rs:2505:14
       |
  2503 | /         encoder_data
  2504 | |             .0
  2505 | |             .write_timestamp(&query_set_data.0, query_index);
       | |             -^^^^^^^^^^^^^^^ method not found in `GpuCommandEncoder`
       | |_____________|
       | 

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!

@jleibs jleibs added dependencies concerning crates, pip packages etc include in changelog labels Feb 15, 2024
@jleibs jleibs marked this pull request as ready for review February 15, 2024 18:02
Cargo.toml Outdated
@@ -230,7 +230,8 @@ walkdir = "2.0"
wasm-bindgen = "0.2.89"
wasm-bindgen-cli-support = "0.2.89"
wasm-bindgen-futures = "0.4.33"
web-sys = "0.3.61"
# web-sys 0.3.68 is a breaking API change
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that web-sys was already 0.3.67 in our Cargo.lock file

Cargo.toml Show resolved Hide resolved
@emilk emilk merged commit 22210f9 into main Feb 26, 2024
39 of 40 checks passed
@emilk emilk deleted the jleibs/lock_web_sys branch February 26, 2024 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies concerning crates, pip packages etc include in changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants