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

error[E0004]: non-exhaustive patterns: async_tungstenite::tungstenite::Error::AttackAttempt not covered #17

Closed
Marmeladenbrot opened this issue Oct 26, 2023 · 3 comments · Fixed by #18
Assignees

Comments

@Marmeladenbrot
Copy link

Hi, I'm trying to use your package but I can't compile it.

  • OS: Windows 11
  • Rust version: rustc 1.73.0 (cc66ad468 2023-10-03)

Dependencies in Cargo.toml:

[dependencies]
polars = "0.34.2"
pyo3-polars = "0.8.0"
sqlx-exasol = "0.7.1-alpha-3"

Steps to reproduce:

cargo new teststuff
cargo add polars
cargo add pyo3-polars
cargo add sqlx-exasol

Creating a file /src/main.rs with:

use polars::prelude::*;

fn main() {
    println!("Hello, world!");
}

Running the following commands in teststuff:

cargo run

Resulting in the following error:

Compiling polars-row v0.34.2
Compiling sqlx-exasol v0.7.1-alpha-3
Compiling polars-core v0.34.2
error[E0004]: non-exhaustive patterns: async_tungstenite::tungstenite::Error::AttackAttempt not covered
--> C:\Users\XXX.cargo\registry\src\index.crates.io-6f17d22bba15001f\sqlx-exasol-0.7.1-alpha-3\src\error.rs:54:23
|
54 | let e = match e {
| ^ pattern async_tungstenite::tungstenite::Error::AttackAttempt not covered
|
note: async_tungstenite::tungstenite::Error defined here
--> C:\Users\XXX.cargo\registry\src\index.crates.io-6f17d22bba15001f\tungstenite-0.20.1\src\error.rs:64:5
|
15 | pub enum Error {
| --------------
...
64 | AttackAttempt,
| ^^^^^^^^^^^^^ not covered
= note: the matched value is of type async_tungstenite::tungstenite::Error
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
65 ~ WsError::HttpFormat(e) => SqlxError::Protocol(e.to_string()),
66 ~ async_tungstenite::tungstenite::Error::AttackAttempt => todo!(),
|

For more information about this error, try rustc --explain E0004.
error: could not compile sqlx-exasol (lib) due to previous error
warning: build failed, waiting for other jobs to finish...

@bobozaur bobozaur self-assigned this Oct 26, 2023
@bobozaur
Copy link
Owner

Hi @Marmeladenbrot ,

I'll be looking into this today. Looks like it's due to some platform specific stuff from async-tungstenite that makes it fail to compile.

It's also a wake-up call to at least set some cargo check CI jobs for windows and mac-os.

@bobozaur
Copy link
Owner

@Marmeladenbrot My initial assumptions were wrong, but I enhanced the CI nevertheless. The build was failing due to a vulnerability fix in tungstenite that was propagating upwards (and was done as a patch version, not a minor version). I fixed the issue and published version 0.7.1-alpha-4. Please try that instead.

Additionally, #18 has more details regarding the issue itself, if you are interested. Thank you for reporting this!

@bobozaur
Copy link
Owner

@Marmeladenbrot If you find the time, it'd be great to confirm that things are working now. If you still encounter issues, feel free to re-open this issue or create a new one, as applicable.

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.

2 participants