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

Zellij v0.16.0 throws Deserialization error with empty config #714

Closed
conveen opened this issue Sep 13, 2021 · 1 comment · Fixed by #720
Closed

Zellij v0.16.0 throws Deserialization error with empty config #714

conveen opened this issue Sep 13, 2021 · 1 comment · Fixed by #720

Comments

@conveen
Copy link

conveen commented Sep 13, 2021

Thank you for taking the time to file this issue! Please follow the instructions and fill the missing parts below the instructions, if it is meaningful. Try to be brief and concise.

In Case of Graphical or Performance Issues

  1. Delete the contents of /tmp/zellij-1000/zellij-log, ie with cd /tmp/zellij-1000/ and rm -fr zellij-log/
  2. Run zellij --debug
  3. Recreate your issue.
  4. Quit Zellij immediately with ctrl-q (your bug should ideally still be visible on screen)

Please attach the files that were created in /tmp/zellij-1000/zellij-log/ to the extent you are comfortable with.

Basic information

zellij --version: zellij 0.16.0
tput lines: 46
tput cols: 189
uname -av or ver(Windows): Linux <hostname> 5.11.0-7633-generic #35~1630100930~20.04~ae2753e-Ubuntu SMP <timestamp> x86_64 x86_64 x86_64 GNU/Linux

List of programs you interact with as, PROGRAM --version: output cropped meaningful, for example:
nvim --version: NVIM v0.5.0-dev+1299-g1c2e504d5 (used the appimage release)
alacritty --version: alacritty 0.7.2 (5ac8060b)

Further information

To reproduce, run the following:

 ❯ cp ~/.config/zellij/config.yaml ~/.config/zellij/config.yaml.bak    # remove existing config if it exists
 ❯ touch ~/.config/zellij/config.yaml    # create empty config file
 ❯ zellij -s session-name                # create new sesion
Deserialization error: EOF while parsing a value
@a-kenji
Copy link
Contributor

a-kenji commented Sep 13, 2021

Thank you @conveen for taking the time filing this issue!
Do you believe that we should ignore this error?
Since an empty file is invalid yaml we don't hande that yet.

a-kenji added a commit to a-kenji/zellij that referenced this issue Sep 14, 2021
Fix zellij-org#714

Allow empty `config` and `layout` files

- Currently empty files are parsed as yaml documents, since they
  are empty they are invalid yaml files and a deseralization error would
  follow.

  Now we ignore the incorrect yaml on an empty document and treat it as
  an empty yaml document.

  Eg:
  ```
  ```
  and
  ```
  ---
  ```

  Are now treated equally.

Alternative: Keep treating the files as `yaml` documents.
a-kenji added a commit that referenced this issue Oct 1, 2021
Fix #714

Allow empty `config` and `layout` files

- Currently empty files are parsed as yaml documents, since they
  are empty they are invalid yaml files and a deseralization error would
  follow.

  Now we ignore the incorrect yaml on an empty document and treat it as
  an empty yaml document.

  Eg:
  ```
  ```
  and
  ```
  ---
  ```

  Are now treated equally.

Alternative: Keep treating the files as `yaml` documents.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants