Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugins: Improve error handling on plugin version mismatch #1838

Merged
merged 13 commits into from
Oct 23, 2022

Commits on Oct 22, 2022

  1. server/tab: Don't panic in Pane::render

    and do not crash the application on failure to receive a render update
    from plugins any longer. Instead, will print a simple string with a hint
    to check the application logs, where a more thorough error indication
    can be found.
    har7an committed Oct 22, 2022
    Configuration menu
    Copy the full SHA
    2dcd76a View commit details
    Browse the repository at this point in the history
  2. utils/errors: re-export anyhow::Error

    to create ad-hoc errors with custom error types, without having to wrap
    them into a `context()` before to turn the into anyhow errors.
    har7an committed Oct 22, 2022
    Configuration menu
    Copy the full SHA
    5e33922 View commit details
    Browse the repository at this point in the history
  3. plugins: Check plugin version on startup

    and terminate execution with a descriptive error message in case the
    plugin version is incompatible with the version of zellij being run.
    har7an committed Oct 22, 2022
    Configuration menu
    Copy the full SHA
    3ae383a View commit details
    Browse the repository at this point in the history
  4. server/wasm_vm: Add plugin path in version error

    so the user knows which plugin to look at in case they're using custom
    plugins.
    har7an committed Oct 22, 2022
    Configuration menu
    Copy the full SHA
    762fc54 View commit details
    Browse the repository at this point in the history
  5. server/wasm_vm: Check plugin version for equality

    Previously we would accept cases where the plugin version was newer than
    the zellij version, which doesn't make a lot of sense.
    har7an committed Oct 22, 2022
    Configuration menu
    Copy the full SHA
    d8ee985 View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2022

  1. server/wasm_vm: Prettier error handling

    in call to `wasmer::Function::call` in case a plugin version mismatch
    can occur.
    har7an committed Oct 23, 2022
    Configuration menu
    Copy the full SHA
    7880416 View commit details
    Browse the repository at this point in the history
  2. tile: Install custom panic handler

    that will print the panic message to a plugins stdout and then call a
    panic handler on the host that turns it into a real application-level
    panic.
    har7an committed Oct 23, 2022
    Configuration menu
    Copy the full SHA
    83ea39b View commit details
    Browse the repository at this point in the history
  3. tile: Catch errors in event deserialization

    and turn them into proper panics. These errors are symptomatic of an
    uncaught plugin version mismatch, for example when developing from main
    and compiling zellij/the plugins from source. Normal users should never
    get to see this error.
    har7an committed Oct 23, 2022
    Configuration menu
    Copy the full SHA
    13fa4cd View commit details
    Browse the repository at this point in the history
  4. utils/errors: Improve output in to_stdout

    for anyhow errors. The default anyhow error formatting of `{:?}` is
    already very good, and we just made it worse by trying to invent our own
    formatting.
    har7an committed Oct 23, 2022
    Configuration menu
    Copy the full SHA
    77b9648 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    af82b81 View commit details
    Browse the repository at this point in the history
  6. zellij: Apply rustfmt

    har7an committed Oct 23, 2022
    Configuration menu
    Copy the full SHA
    78ab8db View commit details
    Browse the repository at this point in the history
  7. changelog: Add PR zellij-org#1838

    Improve error handling on plugin version mismatch.
    har7an committed Oct 23, 2022
    Configuration menu
    Copy the full SHA
    6904ede View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    23f6932 View commit details
    Browse the repository at this point in the history