CFiggers / janet-lsp

A Language Server (LSP) for the Janet programming language.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Module imports not working on Windows

CFiggers opened this issue · comments

At the moment, a module import such as (import spork/json) causes an error on Windows. This seems to happen with all module imports that are not project local.

Not Windows, but seemingly similar issue for a non-root install of janet on a linux box:

import-spork-vscode-janet-lsp

@sogaiu I just published a pre-release version of Janet++ that bundles Janet LSP as a .jimage rather than a compiled executable. This means that when the Language Server starts up, it will be running on the user's locally-installed copy of Janet (assuming janet is on the user's path, which it ought to be). In my preliminary testing, this seems to fix the module import issue, since the Language Server is running as the user's own install which means it should discover modules the same way any other invocation of janet on their system would.

Would you like to test this on your non-root Void Linux install? You can do so by switching to the Pre-release version on the extension page in VS Code:

image

@CFiggers Thanks for the heads up.

I gave it a try and it seems to be working better 👍

Fixed in Janet++ by running the LSP from a .jimage rather than a compiled executable. May need to revisit in the future if Janet LSP will be a stand-alone CLI tool in addition to editor integration.