<div class="gmail_quote">On Wed, Jun 13, 2012 at 11:43 AM, Andrew Trick <span dir="ltr"><<a href="mailto:atrick@apple.com" target="_blank">atrick@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><br><div><div>On Jun 13, 2012, at 7:15 AM, Sergei Larin <<a href="mailto:slarin@codeaurora.org" target="_blank">slarin@codeaurora.org</a>> wrote:</div><br><blockquote type="cite"><span style="font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">Again, this is branch code, but if I can see something wrong in platform</span><br style="font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<span style="font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">independent portion, I'll track it on the trunk.</span></blockquote>
</div><div><br></div><div><div>I hate to be the one to start this thread, but I have to say it at least once...</div></div><div><br></div>General advice. Working off trunk will be less painful than cherry-picking.</div></blockquote>
<div><br></div><div>TL;DR: Here here. Yes, more, please!</div><div><br></div><div><soap box></div><div>I'll go further: don't use development branches. It's just not worth it.</div><div><br></div><div>I say this as someone who created a development branch of Clang. It was and is a pile of pain. We want to kill it with fire.</div>
<div><br></div><div>A lot of people think that a development branch is a useful way to solve problems they run into while developing on trunk:</div><div>- Commit velocity</div><div>- Code review latency</div><div>- API instability</div>
<div>- Rough or WIP code being seen by others</div><div><br></div><div>I assert that these are either not actual problems when working on trunk, or are problems that will actually be worse with a development branch. They are very bad reasons to form one.</div>
<div>- Commit velocity may go up, but testing, correctness, and quality of those commits will go down. You also have the added burden of having to commit merges.</div><div>- Code review latency doesn't go away, it gets deferred until the time at which you want to re-integrate your changes. Deferring code review is like deferring payments on a loan. The more you do it, and the longer you do it, the more interest you build up. It's especially like a loan in that it is a *compounding* phenomenon. However, it's worse than most loans, because the interest rate is somewhere between 20% and 2000%. In such scenarios, micro-payments start to make sense, in the same way that tiny incremental patches make sense on trunk.</div>
<div>- API instability is the exact same problem as code review latency -- the API is no more stable, you're just deferring work. The interest rate here is much lower at least, but there is a secondary gotcha -- if your code is on trunk, then the API *changer* will do much of the work for you.</div>
<div>- Rough / WIP code *should* be seen by others, in order to get early feedback, avoid bad paths of implementation etc. We should indoctrinate ourselves as developers with a delightful glee in showing code before it's 100% ready for prime time.</div>
<div><br></div><div><br></div><div>There are actual cases where you must use a development branch, such as due to controversial changes that need to be demonstrated as viable before accepted, or drastic internal changes that require a lot of work to get into a working state (the type-system rewrite of LLVM is a good example here).</div>
<div><br></div><div>If you find yourself in such a scenario, it is essential to make the development branch look as much like trunk as possible. Integrate daily at least, and multiple times a day if you can. Otherwise, all of the problems above will eat away at your productivity.</div>
<div><br></div><div></soap box></div><div><br></div><div>-Chandler</div></div>