Description
openedon Jun 26, 2023
The vendoring patch says:
I think we could set up a way to do this automatically when necessary and/or on demand.
The first thing that comes to mind is putting a shell command in the patch file. However, this could be tricky cross-platform and it might be hard to avoid some other environment assumptions, so maybe it would be enough to have a set of built-in logic that handles the cases we care about. Another potential issue is that you might want some flexibility: maybe run gotip mod vendor
if go
isn't pointing at a recent build of this repo--implementing regen commands in Go would make it easier to add flexibility.
This isn't a big deal with vendoring, because the command is pretty simple and it's actually documented inside the upstream code, too. However, #960 is adding some more code gen, and we might want to apply a regen command on each backend patch: #960 (comment). Running the regen logic is a maintenance burden that we can improve on.
I'm not totally sure yet that this is worth the effort, but I think it's worth tracking. (I thought I'd submitted an issue for it a while back, but can't find one.)
- This could combine with Sync-from-upstream infra should attempt to fix up patches with 3-way
am
if patches don't apply cleanly #542 to make upstream sync pretty smart: also attempt to run the regeneration scripts to see if that solves merge conflicts.