Question
· Aug 22

VS code not importing CSP files

Trying to import a .csp with VS code appears to do nothing.

Making a change to the file, saving it and then doing "Import and compile" results in no output and there is no change to the file on the server.

Plugin version is 3.0.5

Product version: IRIS 2023.1
Discussion (3)2
Log in or sign up to continue

The issue you are experiencing with VS Code when trying to import and compile CSP files using the ObjectScript plugin may stem from several possible reasons:

  1. Server-Side Editing Configuration:

    • The VS Code InterSystems ObjectScript integrated environment is designed to work effectively with server-side editing when configured correctly. If you are attempting to handle CSP files, ensure that the isfs mode is configured properly in your workspace settings. This allows the CSP files to be edited directly on the server without needing to download them locally. [1][2]
  2. CSP File Compatibility:

    • Editing and compiling .csp files is supported when the files are part of a web application with a path starting with /csp and are properly associated with the namespace on the server. If the web application does not meet these conditions, it could explain why changes are not applied. [1]
  3. Import Process:

    • make sure that your import process works correctly for .csp files. If importing these files results in no visible effects, as was noted in some Atelier workflows, it might be that the file associations or namespace mappings between source and server are misconfigured. Align your setup as per the documented relationship between .csp files and the respective generated .cls class configurations, adjusting paths and parameters in the code accordingly. [3][4]
  4. Role and Access Restrictions:

    • Verify that the user account in use has the %Developer role since server-side interactions, including importing .csp files, may require these permissions. Although %All should suffice generally, access specifics might still cause blocks. [1]
  5. Ability of VS Code Extension:

    • The Import and Compile functionality in VS Code's ObjectScript extension is specific for UDL-format exports, and it does not natively support direct .csp file handling for source-level operations unless enhanced by other internal setups explained by best-practices [5].

Recommendations:
- Configure isfs for server-first file handling for .csp.
- Check or redefine role dependencies granting dev write areas setups esc deadline ordered

Sources: