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

fix: Change __Nonexhaustive to __Invalid and update web-sys #5569

Merged
merged 11 commits into from
Aug 27, 2024

Conversation

Prabhat1308
Copy link
Contributor

Description

Bumps up web-sys version to 0.3.70
fixes #5557

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

@Prabhat1308 Prabhat1308 changed the title Fix : change __Nonexhaustive to __Invalid and update web-sys fix: Change __Nonexhaustive to __Invalid and update web-sys Aug 23, 2024
Copy link
Member

@dariusc93 dariusc93 left a comment

Choose a reason for hiding this comment

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

Thanks! Left a comment about the changelog but other than that LGTM.

transports/webrtc-websys/CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Member

@dariusc93 dariusc93 left a comment

Choose a reason for hiding this comment

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

Thanks. Can you update the Cargo.toml for the libp2p-webrtc-sys and the workspace to reflect the version change? Besides that everything LGTM

transports/webrtc-websys/CHANGELOG.md Outdated Show resolved Hide resolved
dariusc93
dariusc93 previously approved these changes Aug 25, 2024
jxs
jxs previously approved these changes Aug 26, 2024
Copy link
Member

@jxs jxs left a comment

Choose a reason for hiding this comment

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

LGTM but the wasm-pack tests are failing without a valuable output, the only changing piece seems to be web-sys should we open an issue upstream?
cc @oblique

@oblique
Copy link
Contributor

oblique commented Aug 27, 2024

Tests were failing because wasm-bindgen-test needs to be updated whenever wasm-bindgen is updated, otherwise generated code from #[wasm_bindgen_test] might be incompatible. You can use the following patch, I also updated some other dependencies in it.

diff --git a/Cargo.lock b/Cargo.lock
index 29d0df5c1..fff233de3 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3804,6 +3804,16 @@ dependencies = [
  "unicase",
 ]
 
+[[package]]
+name = "minicov"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c71e683cd655513b99affab7d317deb690528255a0d5f717f1024093c12b169"
+dependencies = [
+ "cc",
+ "walkdir",
+]
+
 [[package]]
 name = "minimal-lexical"
 version = "0.2.1"
@@ -6703,9 +6713,9 @@ dependencies = [
 
 [[package]]
 name = "wasm-bindgen-futures"
-version = "0.4.42"
+version = "0.4.43"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0"
+checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed"
 dependencies = [
  "cfg-if",
  "js-sys",
@@ -6744,12 +6754,13 @@ checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484"
 
 [[package]]
 name = "wasm-bindgen-test"
-version = "0.3.42"
+version = "0.3.43"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d9bf62a58e0780af3e852044583deee40983e5886da43a271dd772379987667b"
+checksum = "68497a05fb21143a08a7d24fc81763384a3072ee43c44e86aad1744d6adef9d9"
 dependencies = [
  "console_error_panic_hook",
  "js-sys",
+ "minicov",
  "scoped-tls",
  "wasm-bindgen",
  "wasm-bindgen-futures",
@@ -6758,9 +6769,9 @@ dependencies = [
 
 [[package]]
 name = "wasm-bindgen-test-macro"
-version = "0.3.42"
+version = "0.3.43"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b7f89739351a2e03cb94beb799d47fb2cac01759b40ec441f7de39b00cbf7ef0"
+checksum = "4b8220be1fa9e4c889b30fd207d4906657e7e90b12e0e6b0c8b8d8709f5de021"
 dependencies = [
  "proc-macro2",
  "quote",
diff --git a/transports/webtransport-websys/Cargo.toml b/transports/webtransport-websys/Cargo.toml
index 370158190..9541c49b7 100644
--- a/transports/webtransport-websys/Cargo.toml
+++ b/transports/webtransport-websys/Cargo.toml
@@ -15,7 +15,7 @@ categories = ["network-programming", "asynchronous"]
 
 [dependencies]
 futures = { workspace = true }
-js-sys = "0.3.69"
+js-sys = "0.3.70"
 libp2p-core = { workspace = true }
 libp2p-identity = { workspace = true }
 libp2p-noise = { workspace = true }
@@ -24,9 +24,9 @@ multihash = { workspace = true }
 send_wrapper = { version = "0.6.0", features = ["futures"] }
 thiserror = "1.0.61"
 tracing = { workspace = true }
-wasm-bindgen = "0.2.90"
-wasm-bindgen-futures = "0.4.42"
-web-sys = { version = "0.3.69", features = [
+wasm-bindgen = "0.2.93"
+wasm-bindgen-futures = "0.4.43"
+web-sys = { version = "0.3.70", features = [
     "ReadableStreamDefaultReader",
     "WebTransport",
     "WebTransportBidirectionalStream",
diff --git a/wasm-tests/webtransport-tests/Cargo.toml b/wasm-tests/webtransport-tests/Cargo.toml
index cf51a510a..d7db378ab 100644
--- a/wasm-tests/webtransport-tests/Cargo.toml
+++ b/wasm-tests/webtransport-tests/Cargo.toml
@@ -17,10 +17,10 @@ libp2p-noise = { workspace = true }
 libp2p-webtransport-websys = { workspace = true }
 multiaddr = { workspace = true }
 multihash = { workspace = true }
-wasm-bindgen = "0.2.90"
-wasm-bindgen-futures = "0.4.42"
-wasm-bindgen-test = "0.3.42"
-web-sys = { version = "0.3.69", features = ["Response", "Window"] }
+wasm-bindgen = "0.2.93"
+wasm-bindgen-futures = "0.4.43"
+wasm-bindgen-test = "0.3.43"
+web-sys = { version = "0.3.70", features = ["Response", "Window"] }
 
 [lints]
 workspace = true

@jxs jxs added the send-it label Aug 27, 2024
@mergify mergify bot dismissed stale reviews from jxs and dariusc93 August 27, 2024 11:12

Approvals have been dismissed because the PR was updated after the send-it label was applied.

@mergify mergify bot merged commit aa9317f into libp2p:master Aug 27, 2024
72 checks passed
@Prabhat1308 Prabhat1308 deleted the fix-webrtc_websys branch August 27, 2024 13:05
TimTinkers pushed a commit to unattended-backpack/rust-libp2p that referenced this pull request Sep 14, 2024
…2p#5569)

## Description
Bumps up web-sys version to `0.3.70`
fixes libp2p#5557 

## Change checklist

- [X] I have performed a self-review of my own code
- [ ] I have made corresponding changes to the documentation
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [X] A changelog entry has been made in the appropriate crates

---------

Co-authored-by: Darius Clark <[email protected]>
Co-authored-by: João Oliveira <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

webrtc-websys: __Nonexhaustive does not exist
4 participants