Brett Saviano · Aug 19, 2022 go to post

@Scott Roth 
I don't use podman so I'm not sure how to check this but it looks like the SAM Manager container (a modified IRIS) is not up or is not healthy. Can you check if it's up and if so, check the log contents? Nginx is probably reporting a bad gateway error because the SAM Manager isn't listening on the expected port

Brett Saviano · Aug 19, 2022 go to post

@Scott Roth 
SAM or Prometheus alone can be installed on a separate server. They just need network access to the IRIS servers that you want to collect metrics from.

Brett Saviano · Jul 27, 2022 go to post

@Michael Davidovich 
Refreshing the explorer only refreshes the nodes in the tree view. If you have a virtual file open that you opened from the explorer it won't auto-update. You can close it and reopen it and the extension should fetch the new copy. If you have your local copy open, you can export again to get the latest version.

Brett Saviano · Jul 27, 2022 go to post

@Michael Davidovich 
If you have a local folder open there should be two tree views within the ObjectScript view container (the left pane that is shown after clicking the InterSystems logo in the activity bar on the far left). The bottom one is the Projects Explorer and it's only used to create/modify/export server-side project contents (also known as Studio Projects). The top tree (with the Explorer name) is the ObjectScript Explorer where you can Compile/Export/Delete packages and files. Since you don't use server-side source control and need files in your local file system, you can safely ignore the Projects Explorer since they won't be useful for your workflow. Here's a screenshot of what this looks like for me in a locla folder called "langauge-server":

EDIT: If the ObjectScript Explorer isn't showing, make sure you don't have the setting "objectscript.showExpolorer" set to false.

Brett Saviano · Jul 27, 2022 go to post

@Michael Davidovich 
You can export individual packages or files from the ObjectScript Explorer. Simply right-click on the node(s) that you want to export and click the "Export" menu option. The command may be better in your use case though because once you have your settings configured properly, you don't need to do anything else besides run the command to update your local copies.

Unfortunately there isn't a way to automatically update your copy if changes are detected. If you make an edit and then try to save it to the server the extension will check if there's a conflict and help you resolve it. If you are working client-side then I wouldn't expect a server conflict though because your local copies (synced with source control of course) should be the "source of truth". You can always re-run the export command before you edit if you want to avoid conflicts.

As for the disappearing disp class, editing the impl class will not force the disp class to be regenerated so its state shouldn't change. That may be due to your Studio configuration being set to hide generated files.

Brett Saviano · Jul 27, 2022 go to post

@Michael Davidovich

As a first step I suggest you read through our online documentation to familiarize yourself with common workflows. The extension supports a client-side workflow where you export files to the currently open local folder and handle the source control yourself. To edit client-side, you can use the ObjectScript Explorer to export files. You can also use the Export Code From Server command, which uses the objectscript.export configuration settings to determine what to export. Our extension does not support VS Code's "Download" menu option.

Since the disp class is generated from the spec class you probably don't want to store it in source control but if you still want to export it, you can have the Explorer show generated files before you export a package or if you're using the command you can set the objectscript.export.generatedto true.

Brett Saviano · Apr 15, 2022 go to post

@Jonathan Lent 
Starting in IRIS 2020.1.2, 2021.1.1 and 2021.2 you can directly drill down into objects and see all of their properties during debugging. If a variable is an object, you will see its class name in grey next to it and an arrow to expand it like you would a folder in the VS Code file explorer view. This new feature is shown around timestamp 3:30 in this Learning Services produced video on debugging using VS Code.

Brett Saviano · Apr 6, 2022 go to post

@Kari Vatjus-Anttila 
Can you please download and install the version of the extension found here and check if that fixes the issue? To install it you can drag it from your downloads folder into the extensions view in your VS Code window.

Brett Saviano · Apr 6, 2022 go to post

We should re-write that line to use the regular http.proxyStrictSSL setting. The Language Server uses that setting in 2.0.1

EDIT: I opened PR #919 for this issue

Brett Saviano · Feb 8, 2022 go to post

@Jeffrey Drumm 
Sorry, I assumed you were asking this in the context of CI. AFAIK the only way to do this is what I described. If you would like a way to do this using server-side editing, please file an enhancement request issue in the GitHub repo.

Brett Saviano · Feb 8, 2022 go to post

@Jeffrey Drumm 
VS Code isn't a CI/CD tool so it wasn't specifically designed for this but it is doable if you're working client-side. You can export files from one namespace, change the namespace in your settings.json file and then import and compile.

Brett Saviano · Feb 1, 2022 go to post

I'm sorry, I misread the end of your post.Can you please answer Julian's question below? If the class is saved then the formatter should work.

Brett Saviano · Dec 8, 2021 go to post

Before SAM, there was no way to monitor Cache or IRIS using Prometheus out of the box. You had to implement the metrics exporter API yourself or use a community implementation like the one you linked. Since 2020.1, the /api/monitor API is provided by InterSystems out of the box. SAM uses this API to collect metrics and alerts from servers.

Brett Saviano · Dec 8, 2021 go to post

@Michael Lei That is a community tool that predates SAM and is not supported by SAM. The /api/montior API that was developed for SAM (but can be used by any tool that consumes Prometheus metric format) is only included in IRIS 2020.1+.
 

Brett Saviano · Nov 3, 2021 go to post

Yes, that's expected behavior. The vscode-objectscript extension defines the languages based on file extensions:

      {
        "id": "objectscript",
        "aliases": [
          "ObjectScript"
        ],
        "extensions": [
          ".mac",
          ".int"
        ]
      },
      {
        "id": "objectscript-class",
        "aliases": [
          "ObjectScript Class"
        ],
        "extensions": [
          ".cls"
        ]
      },
      {
        "id": "objectscript-macros",
        "aliases": [
          "ObjectScript Include"
        ],
        "extensions": [
          ".inc"
        ]
      },
      {
        "id": "objectscript-csp",
        "aliases": [
          "ObjectScript CSP"
        ],
        "extensions": [
          ".csp",
          ".csr"
        ]
      },
Brett Saviano · Nov 3, 2021 go to post

Hi Julian,

I just opened up my VS Code (version 1.61.2 on Mac, latest version of all 3 extensions) and tried formatting a class and mac routine and it worked both times. Can you confirm that the Language Server extension is enabled? Also, what's the extension of the file that you're trying to format?

Brett Saviano · Nov 3, 2021 go to post

@Julian.Matthews7786 The Language Server extension includes an ObjectScript formatter with the following features:

  • Normalize the case of ObjectScript commands, system functions and system variables.
  • Normalize the usage of short or long versions of ObjectScript commands, system functions and system variables.

You can invoke it like any other formatter in VS Code. This VS Code doc page has more information on formatting in VS Code. The Language Server README has more info on its features and configuration settings.

Brett Saviano · May 26, 2021 go to post

Do you have the file exported to your local file system already? If not, then you'll have to set the serverSideEditing setting to true for the server copy that gets opened to be editable.