Skip to content

Add patch content regeneration feature in git go-patch rebase/apply #962

Open

Description

The vendoring patch says:

To reproduce, run 'go mod vendor' in 'go/src'.

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


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions