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 140 forks source link

Do not consider an only (Git) moved file as a modified file #274

Open FALLAI-Denis opened 1 year ago

FALLAI-Denis commented 1 year ago

Hi,

We have a problem with files moved inside a Git repository without being modified: nothing distinguishes them (for Git) from simply renamed files, because in both cases they are seen with a R100 Git action.

However, the files that have only been moved have not really been modified, but just moved, and this does not necessarily justify (re)building them.

zAppbuild should distinguish the two cases or R100 Git action:

For this, in case of R100 action, it would also be necessary to test the name of the file without the path of the folder which contains it to distinguish the two cases.

Lists powered by GitUtilities.groovy / getChangedFiles should also be handled differently:

In this case the renamedFiles list no longer exists... unless we also want to know which files are only renamed (and possibly moved). But in this case why not also manage the list of purely created files (Git action A) because there could be specific actions to do in case of pure creation.

If we want to be complete and cover all cases, we would need the lists:

There may be specific actions in case of creation and in case of deletion of files, and it seems interesting to us to identify these cases.

The changedFiles list would actually be the merging of the createdFiles + modifiedFiles lists.

FALLAI-Denis commented 10 months ago

Hi,

Problem stil present...

A "simply moved file" does'nt need to be built, (no change on source file, no change on binary outputs), but Collection needs to be updated to register is new path (and rescanned to find its dependencies...).

We have to modify:

And all refernces to these functions...