Hi,
I’m running into some issues when using custom groovy classes in lib
, while using multi-root workspaces and the vscode extension.
We have a wrapper around a nextflow pipeline, and our directory structure looks like this:
root
├─ project.code-workspace
├─ src
│ └─ nf-pipeline
├─ dir_1
├─ files...
When my project.code-workspace
is configured as follows:
{
"folders": [
{
"path": "src/nf-pipeline"
},
{
"path": "dir_1"
}
]
}
…the LSP works perfectly. Opening Nextflow files inside src/nf-pipeline
correctly detects all custom Groovy classes in src/nf-pipeline/lib/
(e.g., hover tooltips show function calls and signatures).
Now, for the problem: I need to have the root/files...
accessible alongside the pipeline, so I modified the workspace file, appending the following to the “folders”:
{
"path": "."
}
However, as soon as I include "path": "."
, the LSP stops detecting the Groovy classes in lib
(resulting in “Class not defined” errors), even though the LSP itself is still running. For instance, hovers still work for workflows, showing take
and emit
blocks, but not for the classes in lib
(and all my .nf
files are marked red with errors everywhere)
I’ve tried several things:
- ignoring the nf-pipeline folder in the
"path" : "."
, usingsettings.files.ignore
- setting the java home configuratin manually, at the user, workspace and folder levels, to avoid relying on the vscode extension’s
findJava
function - looking at the Nextflow Language Server output in both cases (which does not change at all, we get the same messages)
- enabled debug on hover, but again, the hover is identical both on the working and non-working cases.
Any Ideas?
I’m looking for guidance on how to have the parent root
folder included in the workspace without losing the LSP’s ability to resolve classes in lib
. The extension has been amazing so far, making development much easier (thanks a bunch btw!)
Any help or pointers would be greatly appreciated!