Question
· Apr 10

VS Code ObjectScript extension error

InterSystems ObjectScript extension for VS Code, version 3.0.1

Am also asking this question on the extension's GitHub page: Request textDocument/documentSymbol failed. Error: name must not be falsy · intersystems-community/vscode-objectscript · Discussion #1530 - but suspect more eyes will see it here, which might help gather additional information.

Tried to compile some legacy ObjectScript code via Import/Compile in VS Code using the vscode-objectscript extension. Getting an error, and the content of the file is left changed on the filesystem simply by being compiled.

We think the error occurs when you have a commented out Property line, with no space after the '//' comment starter. But we've not completely isolated the situations where it occurs. Couple of screenshots attached - first is a before compilation / after compilation of a simple test file, showing what state the extension leaves the file in after an attempt to compile. Second is of the Output tab in VS Code for the extension detailing the error. We only stumbled into this yesterday, so still gathering information about when it occurs / doesn't occur. We will be continuing to try and narrow down exactly what combination of syntax triggers the problem, and try and post any clarifying updates - probably on the GitHub discussion in the first instance, since that's where the developers should see them.

Has anyone else ever seen this? Are there any known work-arounds or mitigations?

Product version: Ensemble 2018.1
$ZV: Cache for Windows (x86-64) 2018.1 (Build 184U) Wed Sep 19 2018 09:09:22 EDT
Discussion (4)2
Log in or sign up to continue

Hey Colin.

I had a few minutes before a meeting so wanted to try recreate on IRIS instead of Cache and happened to have not yet restarted VSCode so didn't have the new extension versions installed.

I was able to run the example you tried in the old extension versions and observed no errors in the output for the language server, ran my updates, and then lost the ability to select the Language Server from the Output selection dropdown:

I would have liked to been able to completely recreate this in the new version, or at least give some indication of where the fault may be. But not being able to see the Output window for the language server like in your screenshot stops me in my tracks 😅

An update in 2 parts:

  1. Some of the code in our repo is non-canonical ObjectScript (eg it has examples of '//ABC' comments, with no space, in the files in the repo; these are canonicalised to '// ABC'). So when imported into Ensemble via the VS Code extensions, it is "canonicalised" and subsequently shows as changed in relation to what was in the repo. This is our problem, not a bug, but we've no idea why it occurred in the first place!
  2. In the course of investigating it we stumbled on the ObjectScript Language Server error above, and I've subsequently been able to isolate it at least to the point of making it reproducible. There is further discussion on the GitHub discussion forum, including instructions for how to reproduce.

As result I'm going to mark this as answered, because further exploration will be done from stuff on the GitHub forum.