microsoft / microsoft/go

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

Open
#962 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Patching
Dominant language
Go
Stars
431
Forks
44
Avg merge
21h 18m
Merged PRs (30d)
30

Description

The vendoring patch says:

https://github.com/microsoft/go/blob/f88806da40882a7a451db0922dc30254930c186e/patches/0006-Vendor-crypto-backends.patch#L6

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, https://github.com/microsoft/go/pull/960 is adding some more code gen, and we might want to apply a regen command on each backend patch: https://github.com/microsoft/go/pull/960#discussion_r1240109730. 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.)


Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading patches/0006-Vendor-crypto-backends.patch and the git go-patch rebase/apply entry points, then compare the vendoring flow with the regeneration needs described in Microsoft Go PR 960. Done would be a defined, cross-platform way to run the relevant regeneration logic automatically or on demand, with its supported cases and environment assumptions documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, go
Domain
build-system, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.