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

webrtc-websys: __Nonexhaustive does not exist #5557

Closed
dariusc93 opened this issue Aug 14, 2024 · 2 comments · Fixed by #5569
Closed

webrtc-websys: __Nonexhaustive does not exist #5557

dariusc93 opened this issue Aug 14, 2024 · 2 comments · Fixed by #5569

Comments

@dariusc93
Copy link
Member

Summary

web-sys recently released a patch update which include renaming __Nonexhaustive to __Invalid (see rustwasm/wasm-bindgen#3915), which would cause an compile time error for anyone checking __Nonexhaustive like we do here

RtcDataChannelState::Open | RtcDataChannelState::__Nonexhaustive => {}

Expected behavior

Not to error when compiling

Actual behavior

Error while compiling using latest patch release

Relevant log output

No response

Possible Solution

While the solution would be to pin the previous patch release, I do feel that we could make a change here by either renaming __Nonexhaustive to __Invalid while updating web-sys to 0.3.70 or remove checking __Nonexhaustive altogether (without updating the dependency) if we do not need to explicitly check it.

Version

0.53, 0.54, master

Would you like to work on fixing this bug ?

Maybe

mergify bot added a commit that referenced this issue Aug 27, 2024
## Description
Bumps up web-sys version to `0.3.70`
fixes #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>
@mergify mergify bot closed this as completed in #5569 Aug 27, 2024
TimTinkers pushed a commit to unattended-backpack/rust-libp2p that referenced this issue 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>
@mickvandijke
Copy link

I'm running into the same problem when using: libp2p-webrtc-websys = "0.4.0-alpha". I see that someone made a patch, but it isn't published to crates.io yet. Is there any other way to fix this while still using 0.4.0-alpha?

@DougAnderson444
Copy link
Contributor

I'm running into the same problem when using: libp2p-webrtc-websys = "0.4.0-alpha". I see that someone made a patch, but it isn't published to crates.io yet. Is there any other way to fix this while still using 0.4.0-alpha?

@mickvandijke No, you need to use the latest patch. I recently asked jxs to publish to crates.io, hopefully will be done soon.

Until then, I am using this branch: https://github.com/DougAnderson444/rust-libp2p/tree/webrtc-websys-deps

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 a pull request may close this issue.

3 participants