<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 10, 2021 at 2:58 PM <<a href="mailto:paul.robinson@sony.com">paul.robinson@sony.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Geoffrey, Mehdi,<br>
<br>
Excellent observations, however I think it's worth remembering<br>
the stated use-case.<br>
<br>
Geoffrey Martin-Noble wrote:<br>
> To avoid the issue of constantly having to rewrite history,<br>
<br>
Note that the OP said:<br>
<br>
> from time to time get the latest changes from the official<br>
> llvm-project repo so we keep up to date over time.<br>
<br>
I think "from time to time" is far from "constantly." If they<br>
were going to do continual updates, I wouldn't suggest rebasing <br>
at all; but when updates are rare, I think it's an extremely<br>
viable choice. Also they said,<br>
<br>
> In the future, if support for our target architecture is mature,<br>
> and the hardware is publicly available,<br>
<br>
This (especially the not-public part) implies to me that the cadre <br>
of developers is small, and imposing a rare (2x/year?) requirement <br>
to do a force-pull or just re-clone is not a harsh burden.<br>
<br>
Mehdi AMINI wrote:<br>
> Another aspect is that rebasing a long-lived branch leads to an<br>
> history that does not make sense: you would likely just fix the<br>
> APIs uses for the top of the branch after rebasing which will<br>
> lead to most of the history that can't be build<br>
<br>
I find rebasing is effectively a commit-by-commit merge-to-HEAD.<br>
Normally when I've done this, conflicts are quite likely for API <br>
changes, which would have to be fixed up in the middle of the <br>
rebase before you could do the --continue; not a fix-at-the-end <br>
situation.<br>
<br>
It's true that for a new target, most of the work would be in<br>
target-specific files and git wouldn't notice any conflicts.<br>
If I were doing this semi-annual rebase, I'd probably want to do<br>
an incremental build after each commit just to catch that kind<br>
of thing. Tedious but not super expensive compute-wise, for a<br>
new target, and very scriptable.<br>
<br>
Rebasing instead of merging would also *improve* bisection, if<br>
you pay attention to keeping the rebased commits buildable.<br></blockquote><div><br></div><div>Yes, that the option I mentioned as "not scalable": if you are actively developing, you'll have lot of code churn and making sure all the intermediate state of your branch are buildable on top of the most recent LLVM can be a lot of "unnecessary" work (I'm using quote because it seems subjective here).</div><div>Also you may have O(100s) or O(1000s) commits to build and fix individually instead of making sure the end state is good. Take this over multiple years of developments potentially...</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
I promise you, having done it, bisecting the current problem to<br>
a 6-months-of-upstream-changes merge commit *really* isn't helpful.<br></blockquote><div><br></div><div>Yes: the answer to this isn't obviously rebasing to me, I rather merge multiple times a day (continuously if possible).</div><div>Ideally you're only limited by the length of your testing suite: if you have a bot that continuously does "attempt-merge, test, and push-if-passing" you get very good bisection for the minimum amount of work (you only have to fix something when an upstream commit breaks you, and the fix is scoped to the actual commit that broke you). This may be what you're mentionning below with "small merges"?</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
Eliminating those headaches was a significant benefit of our <br>
conversion to continual integration.<br>
<br>
Basically, for bisection to work in a reasonable way, you have<br>
to have either a linear history of small merges like we get now<br>
with our continual integration, or you want a linear history<br>
that is pure upstream with local changes at the very tip.<br>
<br>
Anyway, best of luck to the original poster, and back to doing<br>
real work!<br>
<br>
--paulr<br>
<br>
</blockquote></div></div>