bytecodealliance / javy

JS to WebAssembly toolchain
Apache License 2.0
2.16k stars 103 forks source link

Fix CI #712

Closed jeffcharles closed 3 weeks ago

jeffcharles commented 1 month ago

Description of the change

Removing deprecated crates from the workspace, the fmt checks for deprecated crates from the makefile, and a few updates to appease the new version of Clippy:

Why am I making this change?

CI always uses the latest stable version of Clippy and that version of Clippy introduced new checks which our code fails. I adjusted the workspace and the Makefile since I don't want to make changes to the deprecated quickjs-wasm-sys or quickjs-wasm-rs crates but still want to be able to run make fmt to see all failing Clippy checks that would show up in CI.

For the &mut store to store.as_mut_context() changes, Clippy seems to sometimes get confused when passing &mut store to a Wasmtime method that takes store: impl AsContextMut and states we should only pass store. Unfortunately the Rust compiler obviously complains when passing store without the &mut if store is referenced again later because Rust will treat it as a move. At first I wrote I just updated call sites where Clippy complained but then it looks inconsistent within a function or file where sometimes we're passing store.as_context_mut() and sometimes we're passing &mut store and it's not obvious why we're using the first in some places and the second in others. So, I decided to make passing stores consistent since the behaviour is identical anyway.

Checklist