IBM / zopeneditor-about

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

zapp.yaml propertyGroups - Search the program folder and all its subfolders #342

Open FALLAI-Denis opened 1 year ago

FALLAI-Denis commented 1 year ago

Description of the enhancement requested

Hi,

I would like to be able to specify in the zapp.yaml file to search for copybooks/includes in the folder of the program that references those copybooks/includes and all of its subfolders.

This can respond to the use case where several versions of copybooks that have the same name exist in the workspace and have content that depends on the calling program, and therefore are placed in a scope that depends on the calling program, (not easy to implement in a context where copybooks/includes are managed in PDS at compile time, but becomes possible with management under Git, and even potentially probable in a multi Git repositories context).

Apparently this does not seem to be provided for in the way of expressing the access paths (glob syntax) of the locations property of propertyGroups.

I think paths can only be absolute or relative to the workspace, but not relative to the program being edited.

For example the ./** path does not work (or does not give the expected result).

I tried to hijack using the ${buildFile.workspaceDir} variable with a ${buildFile.workspaceDir}/** path, but apparently that doesn't work for propertyGroups... seem to work only for profiles and probably only for a dbb profile type.

The zapp.yaml file should support the use of standard VS Code variables (which in fact will create a bond with VS Code), in particular for this use case the variable ${fileWorkspaceFolder}.

Either zapp.yaml should support an equivalent of $buildFile variables for propertyGroups, or support for these $buildFile variables should be extended to all zapp.yaml declarations.

Maybe we should define specific variables for zapp.yaml but applicable to all descriptions: profiles and propertyGroups.

Moreover, for a program-contextual search, zapp.yaml should also ignore the copybooks/includes already found for other programs, but which do not fall within the scope defined for the current program. But this may be a little more complicated to implement...

phaumer commented 1 year ago

@FALLAI-Denis the . would be relative to the workspace root of the program. We want to expand ZAPP files with more scoping capabilities in the future and are collecting requirements such as these. Thanks so much for the suggestions.