Skip to content

nrepl server: Moving to a symbol definition in VS Code Calva does not always work on MS-Windows #1066

Closed
@ikappaki

Description

@ikappaki

There is an issue in VS Code on MS-Windows where moving to the definition of a symbol to another file doesn't happen properly

image

To reproduce on MS-Windows

  1. Create a new project with poetry called issue-info, and basilisp and install it in the venv
> poetry new --src issue-info
> cd issue-info
> poetry add basilisp
> poetry install
  1. Create the following files from on the project root, so that b.lpy references issue-info.a/abc

./basilisp.edn (Empty)

./src/issue_info/a.lpy

(ns issue-info.a)

(defn abc []
  5)

./src/issue_info/b.lpy

(ns issue-info.b
  (:require [issue-info.a :as a]))

(a/abc)
  1. Run the nREPL server, an .nrepl-port file with the port number should be created at the project root.
(issue-info-py3.11) PS D:\bas\issue-info> poetry run basilisp nrepl-server
nREPL server started on port 64523 on host 127.0.0.1 - nrepl://127.0.0.1:64523
  1. In VS Code, open up the project folder, and the ./src/issue_info/b.lpy file. Press Ctrl-Alt-C Ctrl-Alt-C to connect to the server, and select basilisp as the project. It should connect to the server.
  2. In the b.lpy editor window, press Ctrl-Alt-C to evaluate the file. Place the cursor in the (a/abc) form, and press F12 to go to the definition, but the error depicted in the screenshot is shown.

This is because the nREPL server sends a local file path in response to an info req, but Calva expects a URI as per spec.

PR to follow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions