Question
· Apr 27, 2021

VS Code Server-Side Editing Issues with 1) Unqualified Class Names in Routines and 2) 'Go to Definition' from CSP to CLS

I have run into two annoyances when using VS Code for server-side editing of Objectscript and was wondering if anyone knows of any solutions or workarounds.

 

1. In .mac routine files, class names that aren't fully qualified (e.g. ##class(example) instead of ##class(Package.example)) fail to be understood, so the class will have a red squiggly underneath it and a problem that reads

"Class 'example' does not exist. InterSystems Language Server".

In an old routine full of unqualified class names, it just fills the problems tab and drowns out the actual issues. Of course, one solution would be to go through and qualify all the classes, but is there some setting or another that will circumvent that endeavor?

 

2. If I open a .csp file that calls some method from a .cls file, and I try to right click the method and "Go to definition", it fails and then pops up an error:

"Unable to open 'example.cls': Unable to read file 'isfs://iscx..../example.cls&csp' (Error: Unable to resolve non-existing file 'isfs://iscx..../example.cls&csp').

This functionality works fine in Studio for me so it's a little irksome to not have it in VS Code. Is there some setup or setting that I'm missing?

Discussion (2)2
Log in or sign up to continue

@Dominic Chui Please try issue #2 again using LS version 1.1.6 and vscode-objectscript version 1.0.11. To diagnose issue #1, I'll need the text of the routine that you're seeing the "class does not exist" error in. Please submit an issue at https://github.com/intersystems/language-server/issues with a code sample.