-
-
Notifications
You must be signed in to change notification settings - Fork 644
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
errors: Don't panic in
wasm_vm
(#1827)
* server/wasm_vm: Compact module imports * utils/errors: Impl `to_anyhow` for PoisonError which is returned by calls to `lock` on various types of locks from `std`. In our case, some of the locks we try to acquire in `wasm_vm` can contain an `mpsc::Sender`, which is `!Send` and hence doesn't work with `anyhow`. Turn the `PoisonError` into an error string instead and returns that as `anyhow::Err`. * wasm_vm: Remove calls to `unwrap` in the WASM VM codes server API. Note that this doesn't include the Plugin APIs. Mark the error as `fatal` in `server/lib`, where the wasm thread is created. This will cause zellij to report a proper error (and log it) when any of the plugin-related functions fails. Unfortunately, this closes the channel to the WASM thread. Hence, when loading the plugins upon startup fails, the error reported in the terminal (visible to the user) hints towards a call in `plugin_pane` being the culprit. However, the real error will be contained in the logs. Also add an error message and print it to the user in case that the plugin failure was caused by a plugin version mismatch. * server/wasm_vm: Restore panic on failure to load plugins. * server/wasm_vm: Add fix to plugin mismatch error * server/panes/plugin_pane: Hint to logs when failing to receive a message from the plugins for rendering pane contents.
- Loading branch information
Showing
4 changed files
with
170 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.