GoPackagesDriver - tree artifacts support
What type of PR is this?
Feature
What does this PR do? Why is it needed?
Adds support to tree artifacts for the gopackagedriver.
Which issues(s) does this PR fix?
Fixes #3503
Other notes for review
Mostly added the aspect code. What is left is to write the golang code that performs json encoding.
@fmeum , I'm almost ready to open the PR for review. If you have some wishes to steer the development let me know! It's not extensively tested for now, but I can definitely add more features and checks. Do you have any remarks for now?
I noticed that in order to make bazel expand the file direcotory, all files need to be set as inputs. I'm updating the action declaring all the sources as inputs. Other than that, it seems to work neatly.
@fmeum there's still the test not included as target in bazel. Shall I remove it?
@fmeum If you are ok with the PR I won't add any more changes. Let me know if you need me to do anything else!
Will test when I have some time. We actually ran into this, but fixed our rule to statically define the outputs, I'll have to revert that to test it.
Sorry, I forgot about this for a long time.
@lromor Could you resolve the merge conflicts? @JamyDev Did you get to test this?
@fmeum , I should have some cycles this weekend!
@fmeum I'll give it a shot after rebase. Albeit we don't have any declare_directory rules anymore, and I'm concerned that this adds additional complexity to something that could be fixed by just declaring the files directly.
@fmeum , I had to add the Imports field as a separate argument, I also had to remove the orig_srcs.
I added a small test for the escaping/unescaping of the key value pairs.
Unfortunately this weekend I will not have time to test it on a rule that uses declare_directory.
@fmeum, let me know if you need other changes.
@jayconrod This looks good to me, but the packagesdriver is definitely a weak spot of mine. Could you review this as well?
Oh, this is a big one! I'll block out some time tomorrow to review.