nvim-orgmode / orgmode

Orgmode clone written in Lua for Neovim 0.9+.
https://nvim-orgmode.github.io/
MIT License
3.04k stars 134 forks source link

Tests failing: Error while reading ShaDa file #442

Closed andreadev-it closed 1 year ago

andreadev-it commented 1 year ago

Describe the bug

Hi everyone, I'm trying to run tests on my local clone of orgmode. On Windows it was impossible, so I'm using WSL. The steps I've done and written below were all done through WSL, to avoid any problem with line endings.

Some tests run succesfully, but those that fail all seem to have the same exact problem (which I honestly don't believe is caused by my code changes):

./tests/plenary/ui/helpers.lua:3: Vim(edit):E576: Error while reading ShaDa file: there is an item at position 5289 that must not be there: Missing items are for internal uses only

            stack traceback:
                ./tests/plenary/ui/helpers.lua:3: in function 'load_file_content'
                ...tti/nvim/orgmode/tests/plenary/ui/mappings/todo_spec.lua:10: in function <...tti/nvim/orgmode/tests/plenary/ui/mappings/todo_spec.lua:9>

This error appears a ton of time. Does anyone know how to fix it and go on with the testing?

Steps to reproduce

  1. Clone orgmode
  2. Clone nvim-treesitter and plenary.nvim in the same folder
  3. run make test

Expected behavior

It should run the tests (which it does). It also tells me which tests fail, but it doesn't make sense that it is the same error over and over, in a file I didn't touch.

Emacs functionality

No response

Minimal init.lua

It uses the one that comes with the tests (/tests/minimal_init.vim)

Screenshots and recordings

No response

OS / Distro

Ubuntu 22.04 WSL (Windows 10)

Neovim version/commit

0.8.0-1210

Additional context

No response

kristijanhusak commented 1 year ago

You can try using a custom shada file by adding something like this to tests/minimal_init.vim:

set shadafile=/tmp/nvim_shada.shada
andreadev-it commented 1 year ago

Thank you, it worked flawlessly. In the end, my shada file was messed up for some reasons...