ms-jpq / coq_nvim

Fast as FUCK nvim completion. SQLite, concurrent scheduler, hundreds of hours of optimization.
GNU General Public License v3.0
3.43k stars 96 forks source link

UNIQUE constraint failed: lines.buffer_id, lines.line_num #625

Open mrphil2105 opened 3 months ago

mrphil2105 commented 3 months ago

I sometimes get an SQL related error when the menu is open:

UNIQUE constraint failed: lines.buffer_id, lines.line_num
Traceback (most recent call last):
  File "/home/mrphil2105/.local/share/nvim/lazy/coq_nvim/.vars/runtime/lib/python3.11/site-packages/pynvim_pp/logging.py", line 31, in suppress_and_log
    yield None
  File "/home/mrphil2105/.local/share/nvim/lazy/coq_nvim/coq/shared/runtime.py", line 240, in cont
    async for items, completion in aenumerate(
  File "/home/mrphil2105/.local/share/nvim/lazy/coq_nvim/.vars/runtime/lib/python3.11/site-packages/std2/aitertools.py", line 37, in aenumerate
    async for item in ait:
  File "/home/mrphil2105/.local/share/nvim/lazy/coq_nvim/coq/clients/buffers/worker.py", line 169, in _work
    for word in words:
  File "/home/mrphil2105/.local/share/nvim/lazy/coq_nvim/coq/clients/buffers/db/database.py", line 203, in words
    _setlines(
  File "/home/mrphil2105/.local/share/nvim/lazy/coq_nvim/coq/clients/buffers/db/database.py", line 107, in _setlines
    cursor.executemany(sql("insert", "line"), m1())
sqlite3.IntegrityError: UNIQUE constraint failed: lines.buffer_id, lines.line_num

I just recently deleted the coq_nvim folder and ran COQdeps, but the error persists. Please let me know if you need more information in order to fix this. For reference, this is my COQ settings: lua/plugins/coq/config.lua

I think this might be related to #624. That issue is about the selection gets cleared, and sometimes the error comes up in connection with that.

mrphil2105 commented 3 weeks ago

Any update on this? This is still an issue and is very annoying.