Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ikappaki opened this issue Sep 20, 2024 · 0 comments · Fixed by #1068

Comments

@ikappaki
Copy link
Contributor

ikappaki commented Sep 20, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant