Skip to content

Commit

Permalink
Merge branch 'zellij-org:main' into fix/compact-bar
Browse files Browse the repository at this point in the history
  • Loading branch information
imsuck committed Nov 16, 2022
2 parents ab28377 + dc92290 commit 6c9697f
Show file tree
Hide file tree
Showing 38 changed files with 1,469 additions and 528 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,3 @@ jobs:
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: |
nix build || nix build --substituters 'https://cache.nixos.org' --extra-substituters ''
build-msrv:
runs-on: ubuntu-latest
name: "build msrv"
timeout-minutes: 35
steps:
- uses: actions/checkout@v3
with:
# Nix Flakes doesn't work on shallow clones
fetch-depth: 0
- uses: cachix/install-nix-action@v18
- uses: cachix/cachix-action@v12
with:
name: zellij
# If you chose API tokens for write access OR if you have a private cache
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: |
nix build .#zellij-msrv || nix build .#zellij-msrv --substituters 'https://cache.nixos.org' --extra-substituters ''
- if: ${{ failure() }}
run: |
echo "::error :: If this is the only ci step failing, it is likely that the MSRV needs to be bumped."
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

## [Unreleased]

* (BREAKING CHANGE) performance: change plugin data flow to improve render speed (https://github.com/zellij-org/zellij/pull/1934)
* feat: support text input from clipboard (https://github.com/zellij-org/zellij/pull/1926)
* errors: Don't log errors from panes when quitting zellij (https://github.com/zellij-org/zellij/pull/1918)
* docs(contributing): update log path (https://github.com/zellij-org/zellij/pull/1927)
* fix: Fallback to `/bin/sh` if `SHELL` can't be read, panic if shell doesn't exist (https://github.com/zellij-org/zellij/pull/1769)

## [0.33.0] - 2022-11-10

* debugging: improve error handling in `zellij_server::pty` (https://github.com/zellij-org/zellij/pull/1840)
* feat: allow command panes to optionally close on exit (https://github.com/zellij-org/zellij/pull/1869)
* add: everforest-dark, everforest-light themes to the example theme directory (https://github.com/zellij-org/zellij/pull/1873)
Expand Down Expand Up @@ -33,6 +41,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
* debugging: Improve error logging in server (https://github.com/zellij-org/zellij/pull/1881)
* docs: add kanagawa theme (https://github.com/zellij-org/zellij/pull/1913)
* fix: use 'temp_dir' instead of hard-coded '/tmp/' (https://github.com/zellij-org/zellij/pull/1898)
* debugging: Don't strip debug symbols from release binaries (https://github.com/zellij-org/zellij/pull/1916)
* deps: upgrade termwiz to 0.19.0 and rust MSRV to 1.60.0 (https://github.com/zellij-org/zellij/pull/1896)

## [0.32.0] - 2022-10-25

Expand Down
19 changes: 17 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Once you do, in the repository root:
To re-run the tests after you've changed something in the code base, be sure to repeat steps 2 and 3.

## Debugging / Troubleshooting while developing
Zellij uses the excellent [`log`](https://crates.io/crates/log) crate to handle its internal logging. The output of these logs will go to `/tmp/zellij-<UID>/zellij-log/zellij.log`.
Zellij uses the excellent [`log`](https://crates.io/crates/log) crate to handle its internal logging. The output of these logs will go to `/$temp_dir/zellij-<UID>/zellij-log/zellij.log` which `$temp_dir` refers to [std::env::temp_dir()](https://doc.rust-lang.org/std/env/fn.temp_dir.html). On most of operating systems it points to `/tmp`, but there are exceptions, such as `/var/folders/dr/xxxxxxxxxxxxxx/T/` for Mac.

Example:
```rust
Expand All @@ -94,7 +94,7 @@ log::info!("my variable is: {:?}", my_variable);

Note that the output is truncated at 100KB. This can be adjusted for the purposes of debugging through the `LOG_MAX_BYTES` constant, at the time of writing here: https://github.com/zellij-org/zellij/blob/main/zellij-utils/src/logging.rs#L24

When running Zellij with the `--debug` flag, Zellij will dump a copy of all bytes received over the pty for each pane in: `/tmp/zellij-<UID>/zellij-log/zellij-<pane_id>.log`. These might be useful when troubleshooting terminal issues.
When running Zellij with the `--debug` flag, Zellij will dump a copy of all bytes received over the pty for each pane in: `/$temp_dir/zellij-<UID>/zellij-log/zellij-<pane_id>.log`. These might be useful when troubleshooting terminal issues.

## How we treat clippy lints

Expand Down Expand Up @@ -124,8 +124,23 @@ something interesting to work on and guide through.
- Generate ad-hoc errors with `anyhow!(<SOME MESSAGE>)`
- *Further reading*: [See here][error-docs-result]

### Logging errors

- When there's a `Result` type around, use `.non_fatal()` on that instead of `log::error!`
- When there's a `Err` type around, use `Err::<(), _>(err).non_fatal()`
- Also attach context before logging!
- *Further reading*: [See here][error-docs-logging]

### Adding Concrete Errors, Handling Specific Errors

- Add a new variant to `zellij_utils::errors::ZellijError`, if needed
- Use `anyhow::Error::downcast_ref::<ZellijError>()` to recover underlying errors
- *Further reading*: [See here][error-docs-zellijerror]

[error-docs-context]: https://github.com/zellij-org/zellij/blob/main/docs/ERROR_HANDLING.md#attaching-context
[error-docs-result]: https://github.com/zellij-org/zellij/blob/main/docs/ERROR_HANDLING.md#converting-a-function-to-return-a-result-type
[error-docs-logging]: https://github.com/zellij-org/zellij/blob/main/docs/ERROR_HANDLING.md#logging-errors
[error-docs-zellijerror]: https://github.com/zellij-org/zellij/blob/main/docs/ERROR_HANDLING.md#adding-concrete-errors-handling-specific-errors


## Filing Issues
Expand Down
Loading

0 comments on commit 6c9697f

Please sign in to comment.