Eugleo / magic-racket

The best coding experience for Racket in VS Code
https://marketplace.visualstudio.com/items?itemName=evzen-wybitul.magic-racket
GNU General Public License v3.0
202 stars 28 forks source link

LSP doesn't work: virtual-statement: no such table: documented #72

Open Origami404 opened 2 years ago

Origami404 commented 2 years ago

Environment

Error message

virtual-statement: no such table: documented
  error code: 1
  context...:
   /usr/share/racket/collects/db/private/sqlite3/connection.rkt:515:0: handle-status*
   /usr/share/racket/collects/db/private/sqlite3/connection.rkt:474:8
   /usr/share/racket/collects/db/private/sqlite3/connection.rkt:273:4: prepare1* method in connection%
   /usr/share/racket/collects/db/private/generic/common.rkt:215:18
   /usr/share/racket/collects/db/private/generic/common.rkt:180:8
   /usr/share/racket/collects/db/private/generic/common.rkt:209:4: call-with-lock* method in locking%
   /usr/share/racket/collects/db/private/generic/functions.rkt:38:2
   /usr/share/racket/collects/db/private/generic/functions.rkt:90:0: compose-statement
   /usr/share/racket/collects/db/private/generic/functions.rkt:119:0: query-rows0
   /usr/share/racket/collects/setup/doc-db.rkt:94:3
   /usr/share/racket/collects/setup/doc-db.rkt:519:11
   /usr/share/racket/collects/setup/doc-db.rkt:503:2: loop
   /usr/share/racket/collects/setup/doc-db.rkt:71:0: call-with-database
   /home/origami/.local/share/racket/8.4/pkgs/racket-index/setup/xref.rkt:126:6: try
   /home/origami/.local/share/racket/8.4/pkgs/racket-index/setup/xref.rkt:122:2
   /home/origami/.local/share/racket/8.4/pkgs/scribble-lib/scribble/xref.rkt:68:19: send-arg69
   ...

Additional context

Magic racket works well when I first use it. But after I close the file and then open a workspace, the autocomplete stop working. Even if I reload/close VSCode and then reopen the same file I opened first time, the problem still exists.

I can start the LSP without any error message by this command (which is as same as I set in VSCode's settings file):

racket --lib racket-langserver

And when I open a rkt file, I could see there is a LSP process running by ps aux.


The first file I have opened:

#lang r5rs

(define (f x)
  (if (> x 0)
      x
      (- x)))

(define (g x)
  (* x x))

The second file:

#lang racket

(define (f x)
  (* x x))
Origami404 commented 2 years ago

Reinstall magic racket doesn't help.