rules_go icon indicating copy to clipboard operation
rules_go copied to clipboard

GoPackagesDriver - tree artifacts support

Open lromor opened this issue 2 years ago • 12 comments

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.

lromor avatar Apr 02 '23 19:04 lromor

@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?

lromor avatar Apr 22 '23 20:04 lromor

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.

lromor avatar Apr 23 '23 16:04 lromor

@fmeum there's still the test not included as target in bazel. Shall I remove it?

lromor avatar Apr 23 '23 17:04 lromor

@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!

lromor avatar Apr 25 '23 08:04 lromor

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.

JamyDev avatar Apr 26 '23 23:04 JamyDev

Sorry, I forgot about this for a long time.

@lromor Could you resolve the merge conflicts? @JamyDev Did you get to test this?

fmeum avatar Jan 09 '25 15:01 fmeum

@fmeum , I should have some cycles this weekend!

lromor avatar Jan 09 '25 16:01 lromor

@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.

JamyDev avatar Jan 10 '25 18:01 JamyDev

@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.

lromor avatar Jan 11 '25 16:01 lromor

@fmeum, let me know if you need other changes.

lromor avatar Feb 04 '25 15:02 lromor

@jayconrod This looks good to me, but the packagesdriver is definitely a weak spot of mine. Could you review this as well?

fmeum avatar Feb 20 '25 18:02 fmeum

Oh, this is a big one! I'll block out some time tomorrow to review.

jayconrod avatar Feb 20 '25 19:02 jayconrod