bobozaur / sqlx-exasol

An Exasol database driver for the Rust SQLx framework
Apache License 2.0
1 stars 0 forks source link

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

Closed Marmeladenbrot closed 8 months ago

Marmeladenbrot commented 8 months ago

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

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 commented 8 months ago

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 commented 8 months ago

@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 commented 8 months ago

@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.