[llvm-dev] Flang landing in the monorepo

James Y Knight via llvm-dev llvm-dev at lists.llvm.org
Wed Dec 18 08:03:56 PST 2019


On Wed, Dec 18, 2019 at 4:56 AM Peter Waller <Peter.Waller at arm.com> wrote:

> On 17/12/2019 22:25, James Y Knight wrote:
> > I think it would probably make the most sense to land this as a single
> > merge-commit (from the 2700-commit rewritten history you've created)
> > onto llvm-project master, rather than as 2700 individual toplevel
> > commits to master. (Which means: disable the merge-commit prohibition
> > in the github configuration, temporarily, push this commit, and then
> > enable it again).
>
> I understood that the LLVM project did not accept any merge commit so
> far. It seems a shame to make an exception if we don't have to


>
Can you elaborate on the perceived benefits of having it as a merge?
>

The rule against merge commits is primarily because we want to encourage
people to make reasonable separate commits to master which are sensible
(reviewable, buildable, etc) in isolation. And, to make it so the history
is more easily understandable to humans. It's not only that we don't want
merge commits -- we actually don't really want people doing merges, in
general.

But, here we actually *do* have a merge, because flang was developed
externally. This is an exceptional circumstance (and I'm sure we'll have a
few more). Using a merge commit in this circumstance makes it easier for
humans looking at history to understand what's going on here, rather than
harder -- because it actually marks the merge as being a merge. That's the
main reason why I think we ought to use a merge commit here.

Additionally (and less importantly), I'm going to presume that many/most of
the 2700 commits cannot actually be built. So, having a single merge commit
within which the unbuildable sub-commits are contained will also make
things better for autobuilders.


>  It's of course technically straightforward to push either "follow-on
> commits" or a merge commit.
>
> I think there could be a benefit to having it as a "follow-on commits",
> in that checking out an old flang commit won't have the effect of
> deleting the rest of the llvm monorepo. Granted, this may be a slim
> benefit since it will be a fairly arbitrary revision of the llvm
> monorepo, taken at the point of the initial push.
>

I'm suggesting to build the history the exact same way you are currently,
and then simply merging it onto master with a single merge commit ("git
merge --no-ff"), rather than "fast-forwarding" the entire set of commits.
So this is not a benefit, it'd be the same either way.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191218/585a5757/attachment.html>


More information about the llvm-dev mailing list