googleapis / gapic-generator-php

Apache License 2.0
12 stars 12 forks source link

V2 post-processing step leaves "fragments" directories #621

Open bshaffer opened 1 year ago

bshaffer commented 1 year ago

This is of course very low priority, as it does not cause any issues AFAIK, but when untar-ing the resulting package from the GAPIC post-processor, I can see that the fragment directories are there even though they contain no files (and we don't want them there):

$ bazel build google/cloud/support/v2:google-cloud-support-v2-php
$ tar -xvf bazel-bin/google/cloud/support/v2/google-cloud-support-v2-php.tar.gz
google-cloud-support-v2-php/fragments/
google-cloud-support-v2-php/fragments/Google/
google-cloud-support-v2-php/fragments/Google/Cloud/
google-cloud-support-v2-php/fragments/Google/Cloud/Support/
google-cloud-support-v2-php/fragments/Google/Cloud/Support/V2/
google-cloud-support-v2-php/proto/
...

We should remove the empty directories in the post processing step to reduce the noise

noahdietz commented 1 year ago

The fragment files are excluded here, but the directories aren't removed. Tricky! Thanks, should be excluded for sure. Does this block generation? Is owlbot able to ignore those?

bshaffer commented 1 year ago

Owlbot does not move these over, and even if they did, git doesn't track empty directories, so this doesn't block anything