Code navigation in basic project and rba extensions

Here you can discuss the universal Integrated Development Environment for OpenVMS.

Topic author
alister
Contributor
Posts: 16
Joined: Fri Sep 29, 2023 3:00 am
Reputation: 0
Status: Offline

Code navigation in basic project and rba extensions

Post by alister » Wed Nov 22, 2023 9:06 pm

I am trying to get code navigation going. Our code base primarily use VMS Basic. Presently it fails to find the defintion of most symbols or their references.

It's split between .rba and .bas files - where rba files are basic files that are preprocessed by RDBPRE

I've set the rba files as VMS-BASIC files - they are syntax highlighted accordingly.

As a starting point, while i investigate this more, do i have to do anything else to have to have vs code parse my basic files for symbols definition and references ? e.g
https://code.visualstudio.com/docs/lang ... a-language

Does the terminology "reparse a basic project" indicate i have to do anything to set it as a basic project ? Current project type is just "executable"

I've started to look through the code https://github.com/vmssoftware/vms-ide/ ... on.ts#L121, and https://github.com/vmssoftware/vms-ide/ ... ation.json but i haven't looked at vs code's language server functionality before so i thought i would post an initial check here as to whether rba files should be being parsed.

On enacting the "Reparse basic project" command, I dont' see a list of files being parsed output in the Developer Tools. I see "Found workspace for scope ..... " and other logging but nothing else obviously of interest

A lot of our references are link time via EXTERN keywords - but it doesn't presently seem to pick up either included functions, or link time resolved functions.
Last edited by alister on Wed Nov 22, 2023 9:09 pm, edited 1 time in total.


Topic author
alister
Contributor
Posts: 16
Joined: Fri Sep 29, 2023 3:00 am
Reputation: 0
Status: Offline

Re: Code navigation in basic project and rba extensions

Post by alister » Fri Nov 24, 2023 6:32 pm

The code base dates from 1985. It may have been a rewrite of an older code base. There have apparently been attempts to change the way data access is written, which is all to RDB, to SQLMOD, but RDO (thanks Arne) predominates and will remain for some time, for variety of reasons that i won't expand on.

sodjan - Thank you for the suggestion, i'm trying this to see how reference/symbol resolution goes. Just for clarity, I'd note again, that i can set .RBA in vscode as a VMS-basic file - which then does syntax highlighting fine for all .rba files. Its the language navigation features i'm after - go to definition, find all references. It's a large code base, i'm trialling using vs code/vms-ide to make it easier for younger developers who are new to this code base - so those features are significant.

I can always fork the repo, and get developers to run a development version of vms-ide - but thats a significant amount of work, and we are left maintaining it and merging from upstream etc. Not ideal.

Added in 4 minutes 37 seconds:
ok - after trialling this with rba files renamed to bas files, unfortunately i have to report with the code base all loaded in one instance of vs code, VMS-IDE will regularly struggle when looking for references or a definition - i just can't tell if its returning. Thats 1500 files, and 1.5M lines (it's a very sparse layout). I need to section the code base anyway, so i'll post here when i know if it succeeds resolving definitions when renamed to bas on smaller portions of the code base.

I've started to look into the textmate grammar, and the language server interaction and it's implmention - https://github.com/vmssoftware/vms-ide/ ... der.ts#L14.

If anyone has an open source github repo with VMS Basic source they can send me a link to that i can trial this on that would be fantastic - most of the vms code i find is in C. Irrespective i'll trial it with a section of the code base.

User avatar

arne_v
Master
Posts: 347
Joined: Fri Apr 17, 2020 7:31 pm
Reputation: 0
Location: Rhode Island, USA
Status: Online
Contact:

Re: Code navigation in basic project and rba extensions

Post by arne_v » Fri Nov 24, 2023 7:25 pm

What kind of VMS Basic code are you looking for to test with?

I am not a VMS Basic person, but I do have a dozen or so small VMS Basic examples of single file with 20-100 lines.

But I assume you are looking for something in between your 1500 files and 1 file projects.
Arne
arne@vajhoej.dk
VMS user since 1986


Topic author
alister
Contributor
Posts: 16
Joined: Fri Sep 29, 2023 3:00 am
Reputation: 0
Status: Offline

Re: Code navigation in basic project and rba extensions

Post by alister » Tue Nov 28, 2023 6:21 pm

Anything of a moderate size, enough such that there were multiple references to navigate to, try renaming etc. By the sounds of it though it might be tough to find - so i'll slowly get my own setup done here

Post Reply