IBM / dbb-zappbuild

zAppBuild is a generic build solution for building z/OS applications using Apache Groovy build scripts and IBM Dependency Based Build (DBB) APIs.
Apache License 2.0
41 stars 141 forks source link

Defer allocation of working files until they are used #526

Open FALLAI-Denis opened 3 months ago

FALLAI-Denis commented 3 months ago

Hi,

The working files necessary for the build are allocated at the start of the process without even knowing if they will be used. If we declare several "languages" in zAppbuild, all the files of all these "languages" are allocated, while the build will probably not use them all, in particular during a userBuild which often only processes a single element and therefore a single “language”.

The allocation of working files should be deferred until they are used:

Thanks

dennis-behm commented 3 months ago

Hi @FALLAI-Denis,

the allocation is done inside the language scripts. If you only build a COBOL file (let's say via User Build), then only the necessary datasets for the COBOL compilation are created.

See: https://github.com/IBM/dbb-zappbuild/blob/a719842f8b9738133e375eaade8497289c30fc05/languages/Cobol.groovy#L22-L24

Today, zAppBuild does not have the capability to store outputs in dedicated libs for CICS or IMS. Therefore I believe the feature you are asking for already exists. Would you agree with that?

Dennis