tomaka / rouille

Web framework in Rust
Apache License 2.0
1.12k stars 106 forks source link

rouille `3.6.0` broke `wasm-bindgen` #266

Closed CryZe closed 1 year ago

CryZe commented 1 year ago

By moving assets behind a feature gate that might not be active, rouille 3.6.0 seems to have broken wasm-bindgen-cli:

error[E0425]: cannot find function `match_assets` in crate `rouille`
Error:   --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bindgen-cli-0.2.83/src/bin/wasm-bindgen-test-runner/server.rs:98:33
   |
98 |         let response = rouille::match_assets(request, dir);
   |                                 ^^^^^^^^^^^^ not found in `rouille`

error[E0425]: cannot find function `match_assets` in crate `rouille`
Error:    --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bindgen-cli-0.2.83/src/bin/wasm-bindgen-test-runner/server.rs:118:41
    |
118 |                 let response = rouille::match_assets(&new_request, dir);
    |                                         ^^^^^^^^^^^^ not found in `rouille`
bradfier commented 1 year ago

Thanks for the report @CryZe, I just checked and the assets feature is definitely enabled by default: https://github.com/tomaka/rouille/blob/5d989c8df2a19a4113583a32bbfae23cd201f5e9/Cargo.toml#L14

It seems wasm-bindgen-cli is specifying default-features = false for some reason but I acknowledge the breakage and will push a hotfix momentarily.

CryZe commented 1 year ago

Thank you, yeah it's a tricky problem. Fortunately the cargo team is aware of it and is working on an RFC to resolve this. But yeah for now it probably makes sense to consider this breaking.

bradfier commented 1 year ago

v3.6.1 should reolve this for you, it will take a few minutes to publish.

I don't have permission to yank 3.6.0 as Tomaka alone has held onto those rights, but I also don't think this is a sufficiently large problem to justify a yank anyway now that a working hotfix version is available.

CryZe commented 1 year ago

Thank you so much :)