Git Product home page Git Product logo

mvbasic's People

Contributors

andrewcole50 avatar brentlblair avatar dependabot[bot] avatar dthiot avatar ianmcgowan avatar itsxallwater avatar jeffteter avatar kpowick avatar mikes-zum avatar mvdbms-solutions avatar patrickp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mvbasic's Issues

[FEATURE] Add jBASE Dynamic Objects Language Syntax

Is your feature request related to a problem? Please describe.
Currently, the Syntaxes\MvLanguage.json file contains MVON# Basic syntax. Ticket #9 addresses jBASE Basic syntax, but we are also looking to include jBASE Dynamic Objects syntax out of the box to have available as an option within the extension.

Describe the solution you'd like
An acceptable pull request for this issue would include a jBASE Dynamic Objects version of the MvLanguage.json file, and of the mvon.tmLanguage.json file (the syntax highlighting), that can be included in the base package. If reasonable, those additions could possibly be made to the jBASE versions of the language definition and syntax highlighting files but they may also need to be made separate so it's okay to start there. This pull request need not concern itself with any of the plumbing for the extension to be able to dynamically load that syntax into place, we're simply looking for the syntax definition here.

[BUG] Incorrect Comment highlighting

Describe the bug
Valid comments are not always highlighted correctly

To Reproduce
Steps to reproduce the behavior:
Any comment that is preceded by a label (both numerical and textual) as well as a comment without a character between the * and the new line.

Expected behavior
Expect to have the asterisk and characters after it highlighted as a comment.

Screenshots
comments

Versions of applicable software
Windows 10 VS Code. Connected to Jbase (CentOS 7) directory via SFTP. MVON version 1.96.0

Code samples and/or reproduceable test cases
I did some basic searching through the source files and I think changing the regex for the comments from .+ to .* would solve the asterisk without any following characters. Some suggested regex for the other situations are:
^\S+:\s+(\*.*)|^[0-9]+\s+(\*.*)

Additional context
Willing to help solve/test for this issue.

[FEATURE] Create VS Code Marketplace page

When this updated project is ready for public beta, a new extension page should be published and linked to this repo.

tags: MultiValue, MVDBMS, BASIC, MVBASIC, Pick
categories: Programming Languages, Snippets, Linters

To be discussed : Who manages = publishes the extension? ONgroup? Zumasys? Other?

[FEATURE] Auto-detect and set BASIC language

Other languages rely on a file extension to determine the language. With BASIC we have no such common conventions. Examples:

  • foo.java
  • bar.cs
  • baz.php

This is a proposal to auto-detect BASIC code.

There are two ways that I know of which can be used.

First, when the workspace includes a recognized file, it can trigger the activation of an extension. So if we include a file like ".mvbasic", this extension would activate, and we could default to opening all files in this workspace with BASIC language handling.

Second, whenever a file/document is opened in a VSCode TextEditor object, an event is fired. We can hook that event and use a function to determine if the file is a BASIC program. Avoiding random scans for words like COMMON, CRT, PRINT, READ, GOSUB, etc, I propose we standardize on using a comment as a definitive marker. So for example if the text * MVBASIC is found anywhere in the document, then we can assume it's a BASIC program.

The first option is the simplest and requires almost no effort from the user/developer. However it does clutter the workspace with an extra file, which may not be desirable for some.

The second option is best for one-off programs that get loaded, outside the context of an entire workspace. So if you drag/drop a program from anywhere, or load via FTP, etc, it will be recognized. This is also helpful if coding is coming from two different environments - language processing should be specific to the document currently active - the text inside a document should override the workspace spec.

Because both of these options have merit, I think both should be implemented.

Further, it would help to have an automated way to select the MVBASIC dialect for a code module. Again, this can be done at the workspace level, looking for files named .uvbasic, .qmbasic, .d3basic, etc. And for in-program cues: * UVBASIC ... * QMBASIC etc.

If this is approved, unless someone else wants to tackle it, I think I can handle it.

If this functionality is already included. OOPS! Sorry! ๐Ÿค• ๐Ÿ˜†

[BUG] Formatting adds spaces to blank lines within indented code

Describe the bug
It seems that as of v2.0.4, the formatting feature is now adding spaces, as defined by the setting "MVBasic.indent", to blank lines within indented code. e.g. Loops, If/Then, etc.

I noticed this when saving an existing program and my Git diff displayed the newly inserted spaces.

To Reproduce
Steps to reproduce the behavior:

  1. In VS Code, enable View/Render Whitespace

Screen Shot 2020-04-15 at 10 56 16

  1. Add a blank like to a section of indented code and save it. The formatter will add spaces to this blank line.

Expected behavior
Blank lines should remain blank, as they did in previous versions. No extraneous spaces should be added to a blank line, no matter where it is found.

Screenshots
In the screenshot below, line 78 is blank with no extra spaces because it is not within an indented section. However, blank line 88 has extra spaces added because it is within an indented section.

IMO, this is not correct and not consistent with the behaviour of previous versions of the extension.

Screen Shot 2020-04-15 at 11 05 24

Versions of applicable software
Detail on the versions of any and all pieces of software that are part of your environment, such as:

  • Host OS - MacOS 10.14.6
  • Remote OS - N/A
  • Extension - MV Basic 2.0.4
  • IDE - VS Code 1.44.1

[BUG] Invalid "Missing NEXT statement"

Describe the bug
Missing next statement error generated on this line of code:

FOR I = 32 TO 127; OUT I; NEXT I ;* Printable chars

To Reproduce
Insert this line of code in VS Code

See error and "squiggle" underline

Expected behavior
Code should be accepted
Screenshots

Versions of applicable software
Windows 10
VS Code Insiders 1.42.0-insider
MV Basic 2.0.2

Code samples and/or reproduceable test cases

FOR I = 32 TO 127; OUT I; NEXT I ;* Printable chars

Additional context

[BUG] Unable to resolve workspace folder w/ AccuTerm RestFS

Describe the bug
When I connect to the AccuTerm RestFS server, I get an error "Unable to resolve workspace folder" when attempting to browse through my filesystem.

I am using AccuTerm 7 w/ the VSCode plugin as a bridge for MVBasic. I am able to successfully launch VSCode using the VSCODE command in AccuTerm.

I'm pretty sure everything is talking, because if I launch VSCode using VSCODE <File> <Item>, the editor immediately opens to editing that item. For example, VSCODE BP MYPROGRAM and now I'm editing MYPROGRAM in VS Code.

To Reproduce
Steps to reproduce the behavior:

  1. Open VS Code using VSCODE in AccuTerm.
  2. Observe the "" folder in the workspace ( is replaced with the correct account from my Universe system).
  3. Attempt to open the folder.
  4. See the exclamation point and the error: Unable to resolve workspace folder.

Expected behavior
I expect to be able to browse through my account, similar to how I would via WED.

Screenshots
mvbasic

Versions of applicable software
Detail on the versions of any and all pieces of software that are part of your environment, such as:

  • Client - Windows 10 w/ Accuterm 7.3 and VSCode 1.43.2
  • Server - RHEL 7.7 w/ UniVerse 11.3.1

[FEATURE] Setup Extension Bundling

Is your feature request related to a problem? Please describe.
Microsoft recommends bundling Extensions especially for larger projects. We currently get a warning when running vsce package and vsce publish that we should consider it. This should be taken up as a performance improvement for the distribution of the extension.

Describe the solution you'd like
Ideally, follow the guide linked above to setup Webpack for bundling this extension,

Describe alternatives you've considered
Less an alternative and more of a parallel effort, we can also add unnecessary files to a .vscodeignore file to help reduce the extension size.

Additional context
Here's the current CLI output from vsce package:

This extension consists of 9342 files, out of which 4541 are JavaScript files. For performance reasons, you should bundle your extension: https://aka.ms/vscode-bundle-extension . You shndle your extension: https://aka.ms/vscode-bundle-extension . You should also exclude unnecessary files by adding them to your .vscodeignore: https://aka.ms/vscode-vscodeignore

[FEATURE] Update Naming Conventions

Is your feature request related to a problem? Please describe.
The project still references MVON and ONgroup. Need to update to change MVON references to MV Basic and ONgroup references to MV Extensions.

Describe the solution you'd like
Make the name changes, specifically focusing on extension configuration names and publisher info but elsewhere as acceptable/necessary.

An example where not necessary, the client\Syntaxes\MvLanguage.json file referencing "MVON# Basic" as a Language type.

An example where necessary, the client\src\extension.ts file referencing "mvon" as the configuration namespacece

[FEATURE] Add jBASE Language Syntax

Is your feature request related to a problem? Please describe.
Currently, the client\Syntaxes\MvLanguage.json file contains MVON# Basic syntax. We are looking to include jBASE syntax out of the box to have available as an option within the extension.

Describe the solution you'd like
An acceptable pull request for this issue would include a jBASE version of the MvLanguage.json file that can be included in the base package. This pull request need not concern itself with any of the plumbing for the extension to be able to dynamically load that syntax into place, we're simply looking for the syntax definition here.

[BUG] False Positive Undefined Label Error

Describe the bug
See the screenshot. I'm getting errors that say that the "remove.quotes" subroutine is not defined, yet it is defined. The upper right pane shown in the screenshot shows the "remove.quotes" label line, and also shows a similarly formatted "get.id,format" label line. No such errors are spit out for the "get.id.format" subroutine.

I have correct-on-save enabled. If I remove the indent preceding the "get.id.format" label, saving puts the indent back. But whether I indent the "remove.quotes" label or not, saving does not change it.

Note that I have tried removing the space+asterisk from the end of these label lines, which has no effect.

To Reproduce

  1. Enable auto-correct-on-save in VS code
  2. Move the attachment HEAT.API.txt to a VS code project
  3. Save it (file/save)

The errors show up in the terminal window.

Expected behavior
I would expect to NOT get these errors, and that the "remove.quotes" label line works in the exact same way as the "get.id.format" line.

Screenshots
image

Versions of applicable software

  • Host OS - Windows 10 Enterprice
  • Remote OS - D3 (D3Linux10_2)
  • Extension - MVBasic
  • IDE - VS code 1.40.1

HEAT.API.txt

[FEATURE] Add UniData Code Snippets

Is your feature request related to a problem? Please describe.
Currently, the client\Syntaxes\snippets.json file contains generic Code Snippets. We are looking to include UniData-specific snippets out of the box to have available as an option within the extension.

Describe the solution you'd like
An acceptable pull request for this issue would include a UniData version of the snippets.json file that can be included in the base package. This pull request need not concern itself with any of the plumbing for the extension to be able to dynamically load those snippets into place, we're simply looking for the definition here.

[BUG] Cannot read property 'substr' of undefined -> Code: -32603

Highlighting BASIC source code in both the stable and Insiders version of VS Code generates errors

To Reproduce
Use "Ctrl-A" on largest item being edited, or copy the path of one of the items being edited.
As expected, all lines of the item being edited are highlighted, and the path of an item is returned, but an error is thrown

Expected behavior
No error should be thrown with these operations

Screenshots
I[Server(25296)] Started and initialize received
[Server(25296)] Language definition loaded for jBASE]
[Server(25296)] Document opened: file:///d%3A/jBASE5/SandBox/PGM/SYNTAX.TEST.b
[Server(25296)] Document opened: file:///f%3A/Archive/QM/uvsave.b
[Server(25296)] Document opened: file:///f%3A/Archive/QM/QMSAVE.b
[Server(25296)] Document opened: file:///d%3A/jBASE5/SandBox/PGM/bittest.jabba
[Error - 16:41:05] Request textDocument/hover failed.
Message: Request textDocument/hover failed with message: Cannot read property 'substr' of undefined
Code: -32603
[Error - 16:41:05] Request textDocument/definition failed.
Message: Request textDocument/definition failed with message: Cannot read property 'substr' of undefined
Code: -32603

Versions of applicable software
Windows 10 1909 Build 18363.535
VS Code version 1.41.0
VS Code Insiders 1.42.0-insider
MVBasic.LanguageType = "jBASE".
bittest.zip

"extensions": [
".bas",
".b",
".jabba",
"."
],

Code samples and/or reproduceable test cases
Try requesting the path of the attached (zipped) .jabba item

Additional context
Add any other context about the problem here.

[BUG] Documented Goto/Peek is not working

Goto/Peek does not seem to be available. Tried with both numeric and alpha labels.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new file.
  2. Paste in BASIC code that includes a GOSUB and a label.
  3. Right click on the label in the GOSUB

Expected behavior
Context menu option to jump to label

image
image

Versions of applicable software

  • Windows 8.1
  • Not connected to DBMS
  • MVBASIC Extension v2.0.0
  • VSCode 1.38.1

Code sample

GOSUB FOO
STOP
FOO: RETURN

[BUG] The formattingEnabled setting is not enabling/disabling auto-formatting

Describe the bug
The extension contributes a setting called MVBasic.formattingEnabled which should enable/disable automatic code formatting when set to true or false. It is not currently impacting auto formatting.

To Reproduce
Steps to reproduce the behavior:

  1. Toggle the setting between true and false.
  2. Save code changes.
  3. Witness the extension auto format your code.

Expected behavior
Changing the setting should enable/disable the auto formatting accordingly.

Versions of applicable software

  • Extension = v2.0.4

[BUG] Extension crashes when used locally, with Remote SSH

Describe the bug
When using the extension with the Remote SSH extension, the extension fails to start 5 times in a row before shutting itself down.

To Reproduce
Steps to reproduce the behavior:

  1. Download the Remote SSH extension
  2. Use it to connect to a remote server via SSH (CentOS 7 was used in this instance)
  3. After connecting, tell the remote instance to install the MVON# Developer Extension
  4. See error in MVON# Server Output channel.

Expected behavior
Expectation is that the extension should install and run properly as not much should separate the remote environment from a local/host environment with the extension loaded and running in VS Code there, which we know works.

Screenshots
N/A - On a proprietary system.

Versions of applicable software

  • Host OS: Windows 10
  • Remote OS: CentOS 7
  • Extension: Remote SSH on Host, MVON# Developer Extension on Remote
  • IDE: VS Code (latest stable release)

Code samples and/or reproduceable test cases
Here is the error output:

internal/modules/cjs/loader.js:596
    throw err;
    ^

Error: Cannot find module '/home/mikew/.vscode-server/extensions/ongroup.mvon-1.93.0/server/server.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15)
    at Function.Module._load (internal/modules/cjs/loader.js:520:25)
    at Module.require (internal/modules/cjs/loader.js:650:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Server.<anonymous> (/home/mikew/.vscode-server/extensions/ongroup.mvon-1.93.0/client/node_modules/vscode-languageclient/lib/utils/electronForkStart.js:110:9)
    at Server.emit (events.js:182:13)
    at Pipe.onconnection (net.js:1551:8)

Additional context
A first reported use issue, huzzah! ๐ŸŽŠ ๐ŸŽˆ ๐ŸŽ‰

[BUG] Right Click -> Go to Definition & Peek Definition not working properly

When using remote SSH plugin in visual studio code and right click+CTRL to peek and see definition the mvbasic extension is not able to resolve the correct path for the peeked file and errors out.

Steps to reproduce the behavior:

  1. Open remote SSH
  2. Open BASIC program using mvbasic extension
  3. Open file that has references to other BASIC programs (CALL). Those programs need to be on a different folder then the one we just opened
  4. Try to use right click+CTRL to peek or open definition (nothing shows us or error trying to open incorrect files appears)

Expected behavior
referenced BASIC programs shows definition or opens up normally

Versions of applicable software

  • Remote SSH - 0.46.1
  • Visual Studio Code - 1.38.1
  • mvbasic - 2.0.1

[BUG] Add build config to drive prod vs dev requirements

Describe the bug
Currently when building for development vs building for production, the client\src\extension.ts file requires line 32 to be set appropriately.

  1. Development:
    let serverModule = context.asAbsolutePath(path.join('server', 'server.js'));
  2. Production:
    let serverModule = context.asAbsolutePath(path.join('client\server', 'server.js'));

This is a perfect opportunity to introduce a build configuration to allow this adjustment to be automated. NPM supports build configurations but open to suggestion as far as the best/most ideal implementation.

Expected behavior
A pull request to implement this feature should allow for "one-click" building for a target environment without having to modify source.

[BUG] - Auto-formatting failing to align nested "end else"

Here is an example of where the second end else should have been outdented.

     if device[1,1] eq "." then
        options_ok = @false
        error_message<-1> = "Relative paths ('.' or '..') are not allowed!"
     end else
        if index(device, dir_delim, 1) then       ;* we have a full path
           device_name = field(device, dir_delim, dcount(device, dir_delim))
           device_directory = group(device, dir_delim, 1, count(device, dir_delim))
           end else    ;* we have just the device name
           device_name = device
           device_directory = jbcdatadir
        end
        device_directory := dir_delim
        open device_directory to device_dscb then ;* don't close this file yet, still need to check if the overwrite option is in effect
           device = device_directory:device_name
        end else
           error_message<-1> = "Directory ":dquote(device_directory):" does not exist!~"
           options_ok = @false
        end
     end

[FEATURE] Add UniVerse Language Syntax

Is your feature request related to a problem? Please describe.
Currently, the client\Syntaxes\MvLanguage.json file contains MVON# Basic syntax. We are looking to include UniVerse syntax out of the box to have available as an option within the extension.

Describe the solution you'd like
An acceptable pull request for this issue would include a UniVerse version of the MvLanguage.json file that can be included in the base package. This pull request need not concern itself with any of the plumbing for the extension to be able to dynamically load that syntax into place, we're simply looking for the syntax definition here.

Decide on final name for main extension

We need to define names for each of the actual extensions. The entire git repository for all the extensions is mvextensions. It seemed redundant and not fully clear if we then called the primary extension also mvextensions. I checked in VSS and mvbasic is not taken. I have for now renamed this primary extension mvbasic. This extension has

  1. Syntax highlighting
  2. Linter
  3. File system handler

[FEATURE] Collaboration Forum

Please designate a collaboration / discussion hub where we can exchange notes about this project. Q&A's and project planning aren't suitable for GitHub "Issues".
I recommend one or more of the following:

  1. https://groups.google.com/d/forum/mvdbms
  2. https://mvtalk.slack.com
  3. https://gitter.im/mvextensions/mvbasic (doesn't exist yet)

All such media should be documented in repo README.md files.

If I am assigned as a collaborator, I will handle setup, announcements, and management of all of these.

Thanks.

[FEATURE] Add jBASE Code Snippets

Is your feature request related to a problem? Please describe.
Currently, the client\Syntaxes\snippets.json file contains generic Code Snippets. We are looking to include jBASE-specific snippets out of the box to have available as an option within the extension.

Describe the solution you'd like
An acceptable pull request for this issue would include a jBASE version of the snippets.json file that can be included in the base package. This pull request need not concern itself with any of the plumbing for the extension to be able to dynamically load those snippets into place, we're simply looking for the definition here.

[FEATURE] Enhance the Linter to include Code Snippets

Is your feature request related to a problem? Please describe.
The linter does not currently leverage the Code Snippets file, client\Syntaxes\snippets.json, to provide suggestions/enforce expected coding practices.

Describe the solution you'd like
Take, for instance, the snippet for a FOR loop:

"FOR Loop": {
	"prefix": "FOR",
	"body": [
		"FOR $1 = $2 To $3",
		"$4",
		"NEXT $1",
		"$5"
	],
	"description": "Standard FOR Loop"

The Linter should analyze for loops to ensure they adhere to this structure and if they are found to deviate, note them appropriately to the user within the Problems channel.

[FEATURE] Add UniVerse Code Snippets

Is your feature request related to a problem? Please describe.
Currently, the client\Syntaxes\snippets.json file contains generic Code Snippets. We are looking to include UniVerse-specific snippets out of the box to have available as an option within the extension.

Describe the solution you'd like
An acceptable pull request for this issue would include a UniVerse version of the snippets.json file that can be included in the base package. This pull request need not concern itself with any of the plumbing for the extension to be able to dynamically load those snippets into place, we're simply looking for the definition here.

[FEATURE] Add UniData Language Syntax

Is your feature request related to a problem? Please describe.
Currently, the client\Syntaxes\MvLanguage.json file contains MVON# Basic language definition and the client\Syntaxes\MVON.tmLanguage.json file contains the MVON# Basic syntax highlighting definition. We are looking to include UniData syntax out of the box to have available as an option within the extension.

Describe the solution you'd like
An acceptable pull request for this issue would include a UniData versions of the MvLanguage.json and MVON.tmLanguage.json files that can be included in the base package. This pull request need not concern itself with any of the plumbing for the extension to be able to dynamically load that syntax into place, we're simply looking for the syntax definition here.

[FEATURE] Add D3 Code Snippets

Is your feature request related to a problem? Please describe.
Currently, the client\Syntaxes\snippets.json file contains generic Code Snippets. We are looking to include D3-specific snippets out of the box to have available as an option within the extension.

Describe the solution you'd like
An acceptable pull request for this issue would include a D3 version of the snippets.json file that can be included in the base package. This pull request need not concern itself with any of the plumbing for the extension to be able to dynamically load those snippets into place, we're simply looking for the definition here.

[FEATURE] Add Configurable Language Syntax

Is your feature request related to a problem? Please describe.
Currently, server\src\server.ts hard codes the language syntax file to use with this line:

filePath = filePath+"/../Syntaxes/MvLanguage.json";

With the requests for platform specific language syntax, it would be efficient to tie the selected syntax to the user's/workspace's configured platform.

Additionally, the package.json file informs on the grammar files to use for things like syntax highlighting, using the file client\Syntaxes\MVON.tmLanguage.json. The appropriate tmLanguage.json file would need to also be selected in conjunction with the MvLanguage.json file.

Describe the solution you'd like
An acceptable pull request for this issue should abstract the selection of a language syntax to the platform specified within the extension's configuration settings and package.json. Bonus points for also allowing a user specified syntax as a dynamic overload, though currently that is not required.

[FEATURE] Add OpenQM Code Snippets

Is your feature request related to a problem? Please describe.
Currently, the client\Syntaxes\snippets.json file contains generic Code Snippets. We are looking to include OpenQM-specific snippets out of the box to have available as an option within the extension.

Describe the solution you'd like
An acceptable pull request for this issue would include an OpenQM version of the snippets.json file that can be included in the base package. This pull request need not concern itself with any of the plumbing for the extension to be able to dynamically load those snippets into place, we're simply looking for the definition here.

[FEATURE] D3 - Customize the Compile command

We would like to execute the "Compile" verb instead of the "Basic" verb as an option

We would also like to add the flash compile option to the Compile verb (o

Another option would be to add the catalog option to the command

we typically do Compile-Catalog %filename% %itemname% (O

Reference: D3/Windows Version 10.3

[FEATURE] Simplify/Standardize DBMS Connectivity

There is some confusion and stability questions about the mvGateway. While it was a fine first effort, I'd like to take a shot at providing an alternative connection method between VSCode and any MVDBMS.

Each MV platform has its own connectivity options. Examples include QMClient, MVSP, UOJ, and UO.NET. For our purposes I think it would help to have a single API for all platforms. Rather than writing a new one from scratch, my approach would be to use Linkar. As a general purpose connectivity product, this interface would not be limited for use to this one connection type. The exact same connection can be used for any client/server interface that a developer creates.

Linkar is a commercial product. The source is not FOSS, but there is no licensing issue because mvExtensions/MVBASIC is provided under the MIT license. No cost would be associated with this. Kosday provides a single developer license completely for free, no strings attached. One advantage of this connection option is that Linkar is supported over platforms other than Windows, so it should work as well with VSCode over Linux and Mac, connecting to any local or remote MVDBMS over any OS.

In this regard, Linkar is a shim between VSCode and native connectivity options. Just like what we do now with the mvGateway, one must setup connectivity for their platforms using one of the aforementioned options, or using Telnet/SSH. The difference here is that with Linkar, this VSCode project is no longer responsible for a connectivity pipe in addition to VSCode functionality. I think that's an unnecessary and fragile binding. Support for Linkar is generously and effectively provided by Kosday. All that we would need to support here is the VSCode interface to Linkar, which is already well-documented and very simple. I think the abstraction will simplify adoption of this MVExtension as well as ongoing maintenance.

My proposal is to create the alternative connectivity method and then to add a Settings option to choose between mvGateway and Linkar. This would then not interfere with anyone's choice, only present a new option. It would also pave the way for other options. For example, if someone wants to add a hard-coded interface with QMClient, they can do so, bypassing the middleware, and the addition to Settings would be trivial. I have not yet looked at exactly how the run-time would shift to the chosen connectivity option but of course that's part of the development.

My intent in the near-term is to create this interface in my project fork, make it work, ask people to test, and then offer a PR for final merge.

In full disclosure, I do have an association with Kosday. I believe they have a fine product and I am doing what I can to support the efforts of long-respected colleagues through assistance with their product, Marketing, Sales, etc. I do not have a financial bind with them (yet) and do not stand to derive profit from this initiative, especially given that all of the connectivity is free. Assuming I do establish a closer relationship with them to receive commissions on sales, and they sell licenses based on field experiences from use with VSCode, then yes, ultimately I may earn some recompense. If you look at the VERY low purchase price and yearly subscription for Linkar, you'll see that this indeed would be nothing more than coffee money. Given that I am volunteering to code and support this interface for those who choose to use it, I hope people don't mind this potential outcome.

[BUG] Compile Basic Program command for Unidata

I work on a Unidata system and found this extension which is great however cannot compile it.

When trying to compile a program using the "Compile Basic Program" I get an error.
image

However if I use the Debug version it works.
image

I've tested with a few differnent programs. I can't even get this to compile.
image

I have debugged the client side and when it return from the REST call it doesn't pick it up as an error, however doesn't acutely compile the program on the Unidata side. Maybe I'm wrong not very familiar with VSCode extensions. An without see what the gateway doesn't couldn't find a reason for this happening.

Host OS: Windows 10
Remote OS: Window server 2012 R2

[BUG] mvGateway

Describe the bug
we cannot save our work to D3 database item. It shows saved in the editor but is not on the server.
This works sometimes and other times not. It seems that once an item is not being saved, I cannot make it any time in the future.

To Reproduce
Change a line of code and Ctrl-S

Versions of applicable software
Detail on the versions of any and all pieces of software that are part of your environment, such as:

  • Win 10
  • D3 Windows/10.3
  • MVBasic 2.0.1

Additional context
I don't know how to monitor errors, which must be coming from the Rest service through the gateway.

I deleted the remote system item and tried to save my code. Somehow I once was able to get
image
But that was the only time I have had a message show up.

I have checked the "services on my laptop and started/restarted the MvGateway service." Since this works some of the time, so this does not seem to be a permissions on the service thing.

There are no messages in D3 errors file. There are no item-locks in D3 on these items.

we can see and list the files and items in the file. I can pull up the code to edit it.

I have not found any pattern to when it work and when it does not. Or what I am done. It happens 50% of the time I am saving items (ish).

[BUG] Syntax checking for not working

The Features documentation says:

Syntax checking for:
GOTO/GOSUB's
LOOPS
CASE statements
IF THEN/ELSE statements

Syntax checking does not seem to be enabled by default. Note in the screenshot that there is lots of invalid syntax but no squigglies or other error indicators.
Does the code need to be compiled, and server output returned to the client before syntax issues are flagged?

image

Versions of applicable software

  • Windows 8.1
  • Not connected to DBMS
  • MVBASIC Extension v2.0.0
  • VSCode 1.38.1

[FEATURE] Add VNAV checking to the Language Server

Is your feature request related to a problem? Please describe.
Many shops don't catch runtime-errors like VNAVs until execution occurs and the error is logged. Some flavors, like jBASE, will warn you about runtime errors during compilation but some of these errors would be relatively easy to look for when developing in a disconnected manner with no compiler access.

Describe the solution you'd like
The language server already evaluates for things like labels that are defined but not used so I believe it can be made to look for VNAV scenarios.

Describe alternatives you've considered
The alternative here is really the current state, wherein connectivity is required to the execution environment so that at best, the code can be compiled to verify or at worst, the code has to run to observe a VNAV.

Additional context
image

[BUG] Unable to connect to server

** NOTE **
I submit it as a bug, but it could also be a setup error on my side in VS Code. I am still trying to adjust my settings, will update this issue if I make it works.

Description
Get an error message when trying to open a new terminal to the server.

To Reproduce
Using this setup JSON:

{
"window.zoomLevel": 0,
"explorer.confirmDelete": false,
"MVBasic.Account": "DEV",
"MVBasic.languageType": "OpenQM",
"MVBasic.Password": "----------",
"MVBasic.RemoteHost": "http://10.0.0.201:4242",
"MVBasic.UserName": "dreller",
"MVBasic.RemoteDebug": false,
"keyboard.dispatch": "keyCode",
"terminal.integrated.confirmOnExit": true,
"terminal.integrated.cursorBlinking": true,
"files.associations": {
"*": "mvbasic"
},
"terminal.integrated.allowChords": false,
"terminal.integrated.detectLocale": "off",
"terminal.integrated.drawBoldTextInBrightColors": false,
"terminal.integrated.enableFileLinks": false,
"terminal.integrated.inheritEnv": false,
"MVBasic.GatewayType": "QM",
"MVBasic.RestPath": "http://10.0.0.201:4242",
"MVBasic.ServerName": "10.0.0.201",
"MVBasic.RestFS.AutoConnect": false,
"MVBasic.RestFS.CaseSensitive": false,
"MVBasic.EditFiles": [
],
}

  1. Press F1 to get in the command palette,
  2. Select MVBasic: Connect to MultiValue REST FS.
  3. VS Code display an error (see the Screenshots section).

Expected behavior
A new terminal should open.

Screenshots
image

Versions of applicable software

  • HOST: Linux (Rasbian Lite), openQM
  • CLIENT: MacOS
  • IDE: VS Code

[FEATURE] Add D3 Language Syntax

Is your feature request related to a problem? Please describe.
Currently, the client\Syntaxes\MvLanguage.json file contains MVON# Basic language definition and the client\Syntaxes\MVON.tmLanguage.json file contains the MVON# Basic syntax highlighting definition. We are looking to include D3 syntax out of the box to have available as an option within the extension.

Describe the solution you'd like
An acceptable pull request for this issue would include a D3 version of the MvLanguage.json and MVON.tmLanguage.json files that can be included in the base package. This pull request need not concern itself with any of the plumbing for the extension to be able to dynamically load that syntax into place, we're simply looking for the syntax definition here.

[BUG] /* comments are not being recognised as comments

Comment prefix /* is not recognised by syntax linting and highlighting

To Reproduce
Comment any code line by prefixing with /* or highlight a block of text and press Ctrl+/

Expected behavior
Code prefixed with /* should be colored in the same way that lines commented with the * prefix are.
Code prefixed with /* should be excluded from linting rules

[BUG] Variable Format feature confusing VS code auto quoting

Pick offers a format feature on a variable to force output syntax.

Example:
PRINT OUTPUT"MR(#10)"

This will format the output to 10 characters and right justify. VS code really doesn't like this and the feature that auto closes quotes for you jumps in and adds another quote.
PRINT OUTPUT"MR(#10)""

Not sure this can be resolved inside our plugin or it is a deeper issue. Right now you have to forward space to the second quote (the last one) and back space to delete it. If you try on the second to last one it then removes both quotes.

[FEATURE] Add OpenQM Language Syntax

Is your feature request related to a problem? Please describe.
Currently, the client\Syntaxes\MvLanguage.json file contains MVON# Basic language definition and the client\Syntaxes\MVON.tmLanguage.json file contains the MVON# Basic syntax highlighting definition. We are looking to include OpenQM syntax out of the box to have available as an option within the extension.

Describe the solution you'd like
An acceptable pull request for this issue would include an OpenQM version of the MvLanguage.json and MVON.tmLanguage.json files that can be included in the base package. This pull request need not concern itself with any of the plumbing for the extension to be able to dynamically load that syntax into place, we're simply looking for the syntax definition here.

[BUG] Using "customWordPath" options not working

Describe the bug
I have a file with custom words that in previous iterations worked properly. The following config options are set:

"mvon.customWordPath": "C:\users\jteter\documents\VSCode\WNBVariables.txt",
"mvon.customWordColor": "RED"

The words are not being colored and the hover function does not work. I am seeing the following messages in the output console:

[Error - 5:24:50 PM] Request textDocument/hover failed.
Message: Request textDocument/hover failed with message: Cannot read property 'substr' of undefined
Code: -32603
[Error - 5:24:51 PM] Request textDocument/hover failed.
Message: Request textDocument/hover failed with message: Cannot read property 'substr' of undefined
Code: -32603

To Reproduce
Steps to reproduce the behavior:

  1. Create a file on your PC called "WORDS.TXT". The contents of the file will be word, description pairs such as "CUST.NAME":"Customer name" with one pair on each line.
  2. In the workspace configuration, add a line for the file giving it the full path and file name:
    "mvon.customWordPath": "C:\users\jteter\documents\VSCode\WORDS.TXT"
  3. Assign a color in the workspace configuration:
    "mvon.customWordColor": "RED"
  4. Save the configuration and start the workspace session.
  5. Create a new file and enter one or more of the words you have put into the WORDS.TXT file.

Expected behavior
The words entered that are in the WORDS.TXT file should be colored and when hovering over them should display the description provided in the file.

Versions of applicable software
Detail on the versions of any and all pieces of software that are part of your environment, such as:

  • Windows 10
  • Linux 6, UV 11.3.1
  • VSCode with mvExtensions.

[FEATURE] Add sample Workspace Configurations & update Docs

Is your feature request related to a problem? Please describe.
New users looking to setup a workspace to connect with a supported Pick server may experience a little frustration getting started. The documentation does cover configurations, but it needs to be updated to include the latest configuration options.

Describe the solution you'd like
Update the docs and also introduce a new samples folder to the project to include sample workspaces born straight from the docs.

[BUG] Save to local file system forces .bas file extension

Attempt to save file to local file system. It seems to include the option to use any filename. With or without periods in the filename itself, ".bas" is always appended to the end.

The filename must not be altered from user specification.
image

Files without an extension should be allowed:
image

This may only be true for an initial Save. With Save As, files can be saved without the extension, but Windows tries to default in a new .txt extension:
image

Versions of applicable software

  • Windows 8.1
  • Not connected to DBMS
  • MVBASIC Extension v2.0.0
  • VSCode 1.38.1

[BUG] Inconsistent RestFS API

The RESTFS API has two different response formats for the 'dir' API command. In extension.ts, the results from the 'dir' command are returned as an array in the 'Directories' property. In RestFS.ts, the results from the 'dir' command are returned as an array in the 'Files' property.

When implementing a RestFS endpoint, how is the server to determine which response format to return? Should it return both 'Directories' and 'Files' properties, with identical content?

Extension version 1.85 (CHANGELOG.md)

[BUG] Leading, valid keywords not recognised in certain scenarios

Describe the bug
In certain constructs, (leading) valid keywords are not recognised

To Reproduce
Steps to reproduce the behavior:

  1. Enter the following code:
    LOOP
    READT TapeRec FROM 5 ELSE
    Reason = SYSTEM(0)
    IF Reason = 2 THEN BREAK ;* done
    CRT "Tape error" ; STOP
    END
    REPEAT
  2. Click on 'READT', "FROM", "ELSE", IF",CRT"
  3. No intellisense shows, but does for "SYSTEM","BREAK" and "STOP"
  4. The same applies if there is no preceding space, i.e.:
    PROGRAM doesn't work but
    PROGRAM (with a preceding space) does

Expected behavior
Keywords should be recognised whether they are in a loop, or there is no preceding
Screenshots
If applicable, add screenshots to help explain your problem.

Versions of applicable software
Windows 10 1909
VS Code Insiders 1.42.0-insiders
MV Basic 2.0.2
jBASE Language

Code samples and/or reproduceable test cases
LOOP
READT TapeRec FROM 5 ELSE
Reason = SYSTEM(0)
IF Reason = 2 THEN BREAK ;* done
CRT "Tape error" ; STOP
END
REPEAT

Additional context
Add any other context about the problem here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.