globusdigital / deep-copy

Deep copy generator
BSD 3-Clause "New" or "Revised" License
150 stars 34 forks source link

chore(generator): always use lib name as "generated by" #43

Closed matansh closed 3 weeks ago

matansh commented 1 month ago

Problem

In the project I am working on we want to use //go:generate go run github.com/globusdigital/deep-copy [args...] instead of forcing all of our contributors to install deep-copy locally. (I assume we are not the only ones)

When deep-copy is invoked via go run it creates the following comment on the auto generated files

// generated by /tmp/go-build335036942/b001/exe/deep-copy [args...]

This is problematic because:

Solution

Normalize the output of the code generator so no-op regeneration results in no diffs.

Notes

matansh commented 1 month ago

@urandom @egawata @romshark I don't know if anyone is actively subscribed to notifications from this repo, there are no reviewers automatically assigned to PRs, and I could not find contribution guidelines so I am using @ as a low tech way to ping the top contributors in order to make sure there is visibility for this proposal. (sorry not sorry :wink: )

egawata commented 1 month ago

@matansh I've created PRs for this repo several times, and @urandom reviewed them. I believe he'll find this PR, so it would be good to wait a few days.