IBM / zopeneditor-about

IBM Z Open Editor: File issues here!
https://ibm.github.io/zopeneditor-about
Apache License 2.0
50 stars 20 forks source link

All languages (COBOL first) - Search for COPYBOOKs / INCLUDEs in Git Repositories #233

Open FALLAI-Denis opened 2 years ago

FALLAI-Denis commented 2 years ago

Description of the enhancement requested

IBM Z Open Editor can search for COPYBOOKs or INCLUDEs in the local Workspace, or on a remote z/OS system.

In a context of source management under Git, Z Open Editor should also be able to search for COPYBOOKs and INCLUDEs in Git repositories, in particular to access COPYBOOKs and INCLUDEs describing interfaces published by Applications external to the current Workspace.

This would also conform to the implementation provided by IBM Dependency Based Build, and more particularly by the zAppBuild, which may not be required is still recommended. Cf. Managing the build scope in IBM DBB builds with IBM zAppBuild

Without this possibility, it forces to duplicate the COPYBOOKs and INCLUDEs on the z/OS remote system, so a double management between Git and the storage on the z/OS remote system.

FALLAI-Denis commented 2 years ago

An alternative to git cloning to get external COPYBOOKs / INCLUDEs should be to use http request to Git Repositories Server.

In our case we use Bitbucket. Bitbucket expose an API to obtain an artefact in a Git Repository. So Properties group should use a generic url with placeholders. This should apply to any http server, not necessary a Git Server.

phaumer commented 2 years ago

Pointing to generic http urls is an interesting idea that we can explore, but our first approach would be to support multi-root workspaces in VS Code in which each sub-workspace could be from a different git repo and and branch.

FALLAI-Denis commented 2 years ago

Hi @phaumer

The operation of Z Open Editor in a multi-root workspace context is a need that we have identified ourselves. For example, for the same application, we manage several Git repositories and it is all of these Git repositories that constitute the context of the Application.

However, with regard to access to COPYBOOKs / INCLUDEs managed in Git Repositories, forcing to clone the Repositories of external applications will have implications:

Accessing a Git repository directly via http requests will also not solve some of the problems discussed above.

For these reasons, we are considering developing a "proxy" server for accessing the COPYBOOKs / INCLUDEs of external applications, rather than direct access to the Git repositories.

This "proxy" server could apply management rules, such as:

This "proxy" server might not be limited to accessing Git repositories. It could also access other repositories and therefore expose a unique solution to Z Open Editor to search for COPYBOOKs / INCLUDEs. This could also meet some of our needs expressed in other issues (management of the search context of COPYBOOKs / INCLUDEs according to the Git branch used in the workspace).

As input to the "proxy" server, the search context would be needed:

In fact, this "proxy" serveur need a mix between the information carried by the properties-group, the information carried by the IBM User Build interface, and the current development context.

This same "proxy" server could also be used by IBM Dependency Based Build, thus simplifying the writing of Groovy scripts and probably even allowing Groovy scripts not linked to the context of the application being built, (in the examples provided, the Groovy scripts are linked to the Application because access to the Git Repositories of external applications is hard-coded in the script).

FALLAI-Denis commented 2 years ago

Hi @phaumer

What do you think about Git submodules ?

My idea is to create Git repositories dedicated to "resources" as COPYBOOKs and to reference them in main Git repositories as submodules.

When cloning the main Git repository, all "resources" Git repositories are also cloned, so all COPYBOOKs are local, no more access to mvs are required.

Probably same process can apply to IBM DBB. Groovy scripts are simplified.

FALLAI-Denis commented 2 years ago

Hi,

In my post https://github.com/IBM/zopeneditor-about/issues/233#issuecomment-1109422062, I suggest using a proxy system to access COPYBOOKs.

This would be the equivalent of the IBM Enterprise COBOL compiler exit LIBEXIT.