Commit Graph

2137 Commits

Author SHA1 Message Date
har7an
aa7fe853d6
changelog: Add PR #1872
Remove calls to `unwrap` in `zellij_server::pty_writer`
2022-10-28 14:44:31 +00:00
har7an
6ae18b4187
errors: Don't unwrap in server::pty_writer (#1872)
* server/pty_writer: Don't unwrap

and handle occuring errors instead. Replace calls to `log::error` with
`non_fatal` instead.

* server/pty_writer: Apply rustfmt
2022-10-28 14:43:06 +00:00
har7an
f23108f63f
changelog: Add PR #1870
Remove calls to `unwrap` in `zellij_server::ui::*`
2022-10-28 14:16:27 +00:00
哇呜哇呜呀咦耶
c5b1eb0a9e
improve error handling in ui module (#1870)
* improve error handling in ui module

* resolve problems in the review
2022-10-28 14:15:16 +00:00
Jae-Heon Ji
668df6bbd7
docs(changelog): support multiple themes 2022-10-28 22:50:00 +09:00
Jae-Heon Ji
38d23d7218
feat: support multiple themes in one file (#1855)
* feat: support multiple themes in a one file

* chore: update example of multiple themes to gruvbox
2022-10-28 22:48:51 +09:00
Thomas Linford
9fa73d5758
docs(changelog): add everforest themes 2022-10-28 13:31:19 +02:00
Thomas Linford
0857ac1f8a
fix(themes): fix error in everforest themes (#1874) 2022-10-28 13:30:14 +02:00
Nrishinghananda Roy
587a0d2f5a
Add everforest theme in theme examples (#1873) 2022-10-28 13:11:48 +02:00
Aram Drevekenin
82c365831e
docs(changelog): close on exit 2022-10-28 13:04:54 +02:00
Aram Drevekenin
c97b972383
feat(command-panes): optionally allow panes to be closed on exit (#1869)
* feat(cli): allow option to close command pane on exit

* feat(layouts): allow option to close command panes on exit

* style(fmt): rustfmt
2022-10-28 13:03:37 +02:00
har7an
eed9541a74
changelog: Add PR #1840
improve error handling in `zellij_server::pty`
2022-10-26 06:53:42 +00:00
哇呜哇呜呀咦耶
bb9437ff6c
improve error handling in pty (#1840)
* improve error handling in pty

* improve error handling in pty

* format code

* attach context to remaining result
2022-10-26 06:51:51 +00:00
Aram Drevekenin
5793af7655 chore(version): bump development version 2022-10-25 11:43:53 +02:00
Aram Drevekenin
f23ea515d4
chore(ci): do not strip binary 2022-10-25 11:02:18 +02:00
Aram Drevekenin
5cc5995912
chore(ci): do not strip for aarch64 2022-10-25 10:45:59 +02:00
Aram Drevekenin
339eacce99
chore(release): temporarily disable aarch64 2022-10-25 10:15:32 +02:00
Aram Drevekenin
59d9cb53b6
chore(ci): fix binaryen install for ubuntu (I hope) 2022-10-25 09:56:21 +02:00
Aram Drevekenin
6550c8dc3a
chore(release): remove extraneous ci step 2022-10-25 09:44:16 +02:00
Aram Drevekenin
c50103ffb9
chore(ci): brew work now plox 2022-10-25 09:42:39 +02:00
Aram Drevekenin
df77577274
chore(ci): install brew in ubuntu 2022-10-25 09:28:49 +02:00
Aram Drevekenin
56d67ec2c3 chore(release): v0.32.0 2022-10-25 08:47:11 +02:00
Aram Drevekenin
b1fef873fa hotfix: update yaml to kdl in the makefile 2022-10-25 08:46:26 +02:00
Aram Drevekenin
88647ae275
fix(various): minor fixes before 32 (#1841)
* fix(layouts): point to layout documentation

* adjust shell completions

* comment about clear-defaults in the config
2022-10-24 19:21:03 +02:00
Jae-Heon Ji
63cf3a6b01
docs(changelog): add help to cli options 2022-10-24 00:47:07 +09:00
Jae-Heon Ji
2fc6cefb95
chore: add help to cli options (#1839) 2022-10-24 00:46:01 +09:00
har7an
75801bdb0e
plugins: Improve error handling on plugin version mismatch (#1838)
* 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.

* 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.

* 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.

* 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.

* 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.

* server/wasm_vm: Prettier error handling

in call to `wasmer::Function::call` in case a plugin version mismatch
can occur.

* 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.

* 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.

* 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.

* tile: Reword plugin mismatch error message

* zellij: Apply rustfmt

* changelog: Add PR #1838

Improve error handling on plugin version mismatch.

* server/wasm_vm: Rephrase error in passive voice
2022-10-23 13:14:24 +00:00
a-kenji
788bcd6151
rust-toolchain: Update (#1834)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-22 12:12:42 +02:00
har7an
d36e91e072
changelog: Add PR #1808
Improve error handling in `server/route`.
2022-10-21 13:51:01 +00:00
naosense
e5115e88a7
improve error handling in route (#1808)
* improve error handling in route

* improve error handling in route

* improve error handling in route

* format code

* improve error handling in route
2022-10-21 13:49:39 +00:00
Aram Drevekenin
e62bb93df3
fix(layouts): various bugs and better errors (#1831)
* fix(layout): error on percent size 0

* fix(command): better error on invalid commands

* fix(layouts): better error on unknown pane nodes

* fix(layouts): disallow certain template names

* style(fmt): rustfmt
2022-10-20 20:16:46 +02:00
Aram Drevekenin
ebc4222d6a
fix(layouts): do not override explicitly set layout if it exists (#1830) 2022-10-20 18:09:23 +02:00
har7an
27c875b568
server/panes/grid: Fix whitespace error 2022-10-20 16:06:04 +00:00
har7an
d8fcaf8e05
server/panes/grid: Document dropping 0-width chars
and add a reference to the issue discussing/tracking this (https://github.com/zellij-org/zellij/issues/1538).
2022-10-20 15:59:12 +00:00
har7an
348a197eb9
changelog: Add PR #1827
which removes calls to `unwrap` from `wasm_vm` and prints sensible error messages when errors in the plugins occur.
2022-10-20 15:51:23 +00:00
har7an
a56723f7ce
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.
2022-10-20 15:49:04 +00:00
Aram Drevekenin
b94a626959
fix(command): better error when command not found (#1829)
* fix(command): better error when command not found

* fix(cli): open edit file from current cwd

* style(fmt): rustfmt?
2022-10-20 17:27:44 +02:00
Aram Drevekenin
8431b9e0ef
docs(changelog): tab cwd in layouts 2022-10-20 15:24:28 +02:00
Aram Drevekenin
e59b09a1b6
feat(layouts): allow defining a tab cwd (#1828) 2022-10-20 15:23:20 +02:00
Aram Drevekenin
ebf61f6ff2
docs(changelog): scroll region fix 2022-10-19 18:37:18 +02:00
Aram Drevekenin
3d0c35489f
fix(terminal): reset scroll region when clearing screen (#1826) 2022-10-19 18:36:17 +02:00
Jae-Heon Ji
ca182fd216
docs(changelog): update DumpScreen action 2022-10-19 22:53:25 +09:00
Dan Näsman
2e70a4c672
allow dump_screen() to only dump the viewport (#1794)
* allow dump_screen() to only dump the viewport

* add additional implementations

* set full default as false
2022-10-19 22:49:13 +09:00
Aram Drevekenin
5878e9f6f8
docs(changelog): upgrade log4rs 2022-10-19 09:26:59 +02:00
Aram Drevekenin
81081bc2c2
chore(deps): upgrade log4rs (#1814) 2022-10-19 09:23:56 +02:00
Aram Drevekenin
130c16beb3
docs(changelog): default to vi editor 2022-10-18 17:37:16 +02:00
Aram Drevekenin
617b52f8f4
fix(editor): default to vi when no editor is set (#1811)
* fix(editor): default to vi when no editor is set

* style(fmt): rustfmt
2022-10-18 17:33:48 +02:00
Aram Drevekenin
5c8cded2f5
docs(changelog): floating panes grouped 2022-10-18 16:45:19 +02:00
Aram Drevekenin
abc710e124
feat(panes): change floating window positions (#1810)
* feat(panes): group floating panes

* style(fmt): rustfmt
2022-10-18 16:44:05 +02:00
har7an
d533299656
changelog: Add PR #1805
Add tips for code contributions to CONTRIBUTING, and expand the error docs with regard to how to handle `Option` types.
2022-10-18 14:16:30 +00:00