BetterThanTomorrow / calva

Clojure & ClojureScript Interactive Programming for VS Code
https://marketplace.visualstudio.com/items?itemName=betterthantomorrow.calva
Other
1.63k stars 213 forks source link

Connecting to running REPL fails if project has never had Calva REPL file #2605

Open TuggyNE opened 2 months ago

TuggyNE commented 2 months ago

STR

  1. Create new project with e.g. Leiningen
  2. Start a non-Calva REPL, e.g. lein run
  3. Run Calva: Connect to a Running REPL Server in the Project (from palette or C-C, C-C)
  4. Select appropriate project type, e.g. Leiningen

Expected

Connection to the REPL, possibly confirming host:port details first.

Actual

VS Code dev tools console shows unhandled exception:

Error writing to results doc: CodeExpectedError: cannot open file:///Users/ntuggy/programs/primary/srv/caddy-auth/.calva/output-window/output.calva-repl. Detail: Unable to read file '/Users/ntuggy/programs/primary/srv/caddy-auth/.calva/output-window/output.calva-repl' (Error: Unable to resolve nonexistent file '/Users/ntuggy/programs/primary/srv/caddy-auth/.calva/output-window/output.calva-repl')
    at o.$tryOpenDocument (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2217:111412)

Creating the directory and empty file resolves this exception.

Version: Calva 2.0.467 in VS Code 1.91.1 (Universal) (macOS Monterey, Intel)

PEZ commented 2 weeks ago

Hi! I can't reproduce this. Do you see any other console errors that could give us a clue? Like maybe when the file is created, that goes wrong and shows up in the console.