Closed matansh closed 3 weeks 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: )
@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.
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 installdeep-copy
locally. (I assume we are not the only ones)When
deep-copy
is invoked viago run
it creates the following comment on the auto generated filesThis is problematic because:
go-buildxxxx
which is unneeded noisego generate ./...
in our CI to validate that contributors have not forgotten to update required autogenerated code in their PRs, this CI job will always fail as it will alter thego-buildxxxx
Solution
Normalize the output of the code generator so no-op regeneration results in no diffs.
Notes
// Code generated by mockery.
allowing users to safely invoke it viago run
.