Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revisit support export/import xml #1158

Closed
isc-lindensc opened this issue May 31, 2023 · 12 comments · Fixed by #1171
Closed

revisit support export/import xml #1158

isc-lindensc opened this issue May 31, 2023 · 12 comments · Fixed by #1171
Assignees
Labels
enhancement New feature or request priority/important-soon upstream Depends on an upstream change (e.g. VS Code fix or enhancement, IRIS change)

Comments

@isc-lindensc
Copy link

Hi All,
with the deprecation of InterSystems Studio, can we look into getting export/import of xml packaged source code implemented?

As a developer i often have the issue that i need to transport code from e.g. a non CCR controlled scratch environment to the BASE environment which then is under CCR source control.

This usually is done via ISC Studio export/import functionality.
ISC Studio import functionality also triggers the question on source controlled environment to add all imported code to source control (here CCR).

Using UDL as the export format can be prohibitive if the code consists of multiple classes/routines in multiple packages. (e.g. InterSystems Integration projects)

Also the current export functionality is rather clunky in large namespaces (i.e. thousands of classes) and also i found a bit hit and miss in regards to it working (got it working 2 out of 10 tries, usually not working when i try to present the functionality to others)

@gjsjohnmurray
Copy link
Contributor

Have you evaluated the current UI for Projects? Perhaps adding command to export a project's members to a single XML file would help you.

@isc-bsaviano
Copy link
Contributor

@isc-lindensc Even if we revisited the policy, I don't think the Atelier API supports getting multiple documents in a single XML file. I think the best approach is to use $SYSTEM.OBJ.Export from a terminal. You could even use our new WebSocket Terminal if you have the most recent beta version of this extension and a 2023.2 IRIS kit.

@isc-tleavitt
Copy link

I'd love to have support for this for the same use case(s). Can confirm after a quick look that we'd need new API endpoints for it to work properly though.

@isc-lindensc
Copy link
Author

@isc-bsaviano yes agreed we need probably an API extension for the multi file export. But same priority is a dedicated "import file to server" function based on formats UML and xml especially for server side editing, which is the default usage scenario for TC devs and TC customers.

@isc-bsaviano
Copy link
Contributor

@isc-lindensc That command has existed since January, see #1036. It only works for UDL files though and if we were to support XML files I'd probably create a separate command so that it works for client-side editing as well.

@isc-tleavitt
Copy link

@isc-bsaviano I think the specific use case to consider would be:
In isfs mode, export a multiple selection of items to XML. (Because that's the only way to export multiple items to a single file at this point.)
In isfs mode, provide a way to import an XML file containing multiple items (rather than e.g. using existing APIs to convert to UDL); import should trigger activity in %SourceControl same as it does in Studio.

Studio makes this super easy. You can even just drag and drop an XML export of multiple classes into Studio and it'll import them and do all the source control stuff.

@isc-bsaviano
Copy link
Contributor

@isc-tleavitt Does Studio trigger the source control hooks? I just did a local import in a source control enabled namespace and I was not prompted to add the new document to source control.

@isc-tleavitt
Copy link

@isc-bsaviano it'll prompt to check out, I don't think to add (with %Studio.SourceControl.ISC, that is).

The behavior is all based on the extension though - see https://docs.intersystems.com/irislatest/csp/documatic/%25CSP.Documatic.cls?LIBRARY=%25SYS&CLASSNAME=%25Studio.Extension.Base#UserAction , "6 : User has selected to import comma delimetered [sic] list of documents"

@isc-tleavitt
Copy link

Actually I think %Studio.SourceControl.ISC just checks out without prompting.

@isc-lindensc
Copy link
Author

@isc-lindensc That command has existed since January, see #1036. It only works for UDL files though and if we were to support XML files I'd probably create a separate command so that it works for client-side editing as well.

@isc-bsaviano This is great, i did not know that its available for UDL.

From a ease of use side could we also include a short-cut to the export for UDL on isfs folders: e.g. "Export to local filesystem" which then prompts with a save dialog?

@isc-bsaviano
Copy link
Contributor

@isc-lindensc Feel free to open a new issue to request that feature.

As for the XML import/export, I spoke to @isc-rsingh yesterday and we agreed to leave this open and gather more feedback before deciding what to do. The Atelier API was not designed for bulk import/export (the UDL command I added makes a bunch of REST requests and probably shouldn't be used on more than a handful of files at once). Since there are also other perfectly fine tools for this task we don't consider it a "must-add" at this time, but we are open to feedback that would change our perspective.

@isc-bsaviano isc-bsaviano added the enhancement New feature or request label Jun 2, 2023
@isc-bsaviano isc-bsaviano added this to the Backlog Candidates milestone Jun 2, 2023
@isc-bsaviano isc-bsaviano removed this from the Backlog Candidates milestone Jun 2, 2023
@isc-bsaviano
Copy link
Contributor

InterSystems is working on adding support for XML import/export in the Atelier API with integration in the VS Code UI via commands. I will post the PR here when it's opened and a suitable kit is publicly available.

@isc-bsaviano isc-bsaviano self-assigned this Jun 15, 2023
@isc-rsingh isc-rsingh added upstream Depends on an upstream change (e.g. VS Code fix or enhancement, IRIS change) priority/important-soon labels Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority/important-soon upstream Depends on an upstream change (e.g. VS Code fix or enhancement, IRIS change)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants
@isc-rsingh @gjsjohnmurray @isc-bsaviano @isc-lindensc @isc-tleavitt and others