usethesource / rascal-language-servers

An LSP server for Rascal which includes an easy-to-use LSP generator for languages implemented in Rascal, and an interactive terminal REPL.
BSD 2-Clause "Simplified" License
10 stars 7 forks source link

Project does not load if Rascal project is not the root of the workspace in VS Code #341

Open linuswagner opened 8 months ago

linuswagner commented 8 months ago

I'm unsure if this belongs here or is better off in the documentation of Rascal.

If you add a folder to VS Code that contains one or multiple Rascal projects (i.e. folders again) and try to launch code from a file inside these using Import in new Rascal terminal, this throws you an Could not import module SOME_MODULE_NAME: can not find in search path error in the REPL.

It's unclear to me if this is something, we should document somewhere ("Make sure to load the Rascal project directly and add other folders to the workspace") or fix somewhere in the plugin. In any case, it is hard to understand if you don't know how Rascal/Java defines the search path for the JVM

DavyLandman commented 8 months ago

true, we have the assumption that any folder is the root of a project. So I think we should indeed document that. and add some better warnings around that if we detect it.

so you have to add every subfolder as a "root" folder to your workspace.