Fix tests and lints for new version of Rust #848
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the change
The update to Rust 1.83 seems to have resulted in some parts of CI failing. This makes a few changes to get it passing:
#![allow(static_mut_refs)]
to a couple modulesWhy am I making this change?
We need CI to pass. For the
#![allow(static_mut_refs)]
, I looked into some alternatives but wasn't able to find a satisfying alternative. In the plugin, using another approach is going to introduce some overhead. In the codegen, I tried moving setting up the WASI context into the closure used to add WASI p1 to the linker inmake_linker
but that causes building modules to hang and apparently that's not unexpected (see bytecodealliance/wasmtime#9723). I also tried using an "immutable" staticRefCell
but the Rust compiler complains thatWasiCtx
doesn't implement'sync
. And trying to put a mutex around theRefCell
or using anRwLock
doesn't work because the closure needs to return a mutable reference but has to drop the lock when it returns which invalidates the reference.Arc
's also aren't supported as a top-level type for statics.Checklist
javy-cli
andjavy-plugin
do not require updating CHANGELOG files.