hack-codegen icon indicating copy to clipboard operation
hack-codegen copied to clipboard

Add guidance for resolving merge conflicts for generated files

Open lazytype opened this issue 3 years ago • 1 comments

IIRC, Facebook has a custom merge driver for Mercurial that can automatically resolve conflicts for generated files. Before this was in place I believe one had to manually re-generate code that had conflicts. Would it be possible to:

  • open source the merge driver(s)
  • also provide them for Git
  • document these, or what to do in the absence of these

lazytype avatar Aug 04 '20 08:08 lazytype

open source the merge driver(s)

I think the relevant code is here: https://github.com/facebookexperimental/eden/blob/master/eden/scm/edenscm/hgext/mergedriver.py

Unfortunately I can't find any good documentation, but there are some tests that can be used as examples: https://github.com/facebookexperimental/eden/search?q=mergedriver&unscoped_q=mergedriver

I agree this should be mentioned somewhere in this repository and better documented, keeping this issue open for that.

jjergus avatar Aug 28 '20 23:08 jjergus