<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 19, 2014, at 2:24 PM, C Bergström <<a href="mailto:cbergstrom@pathscale.com" class="">cbergstrom@pathscale.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><br class="Apple-interchange-newline"><span style="font-family: LucidaGrande; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">On Sat, Dec 20, 2014 at 4:14 AM, Eric Fiselier<span class="Apple-converted-space"> </span></span><span dir="ltr" style="font-family: LucidaGrande; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><<a href="mailto:eric@efcs.ca" target="_blank" class="">eric@efcs.ca</a>></span><span style="font-family: LucidaGrande; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class=""> </span><span style="font-family: LucidaGrande; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">wrote:</span><blockquote class="gmail_quote" style="font-family: LucidaGrande; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">I don't really like allowing users to pick and choose which ABI<br class="">changes to adopt. I personally don't see the use case for picking a<br class="">subset of ABI changes to adopt. If you can adopt one ABI change,<br class="">then why can't you adopt them all? Furthermore, as time goes on and<br class="">more ABI changes are commited this could lead to quite a mess.<br class=""></blockquote></div></blockquote><div><br class=""></div><div>It’s not the users that will be picking and choosing.</div><div>I’m thinking of the people that ship libc++ as part of their systems.</div><div>[ Mac OS, FreeBSD, Android, iOS, etc ]</div><div><br class=""></div><div>Each of them have different requirements for ABI stability.</div><div><br class=""></div><div>Then there are the people/organizations who build and use their own libc++ libraries internally. They may or may not have any requirements for ABI stability, but they’re probably more flexible than the people who ship OS’es - whose change horizon is measured in years.</div><div class=""><br class=""></div><blockquote type="cite" class=""><div class=""><blockquote class="gmail_quote" style="font-family: LucidaGrande; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><br class="">I also don't like having a stable version and an unstable version of<br class="">the ABI. I'm afraid that by only introducing ABI changes into the<br class="">"unstable ABI configuration" they will never be adopted.<br class=""></blockquote></div></blockquote><div><br class=""></div><div>Yes. There will be vendors who never adopt anything that is an ABI change, </div><div>and I believe that supporting those people is important for libc++.</div><div class=""><br class=""></div><blockquote type="cite" class=""><div class=""><blockquote class="gmail_quote" style="font-family: LucidaGrande; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><br class="">Instead I think we should version the ABI and introduce a series of<br class="">stable ABI's under different versions. This allows us some sort of<br class="">forward momentum and fewer configurations that need maintaining and<br class="">testing.<br class="">When a consumer can tolerate introducing an ABI break they can move to<br class="">the most recent ABI version. After a given amount of time ABI versions<br class="">would be deprecated.<br class="">The only ABI versions that would be maintained indefinitely would be<br class="">the current one.<br class=""></blockquote><div style="font-family: LucidaGrande; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: LucidaGrande; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">This idea of ABI "version" paradigms well with real world packages. At some point we'll in theory have many libc++ packaged and released. If at the same time of the ABI breakage the libc++.so.${N} is incremented we have some tangible way to relay that information to potential end users.</div></div></blockquote><div><br class=""></div>I may be wrong, but I don’t see a use case (other than testing and/or libc++ development) for having multiple versions of libc++ on a system.</div><div>The goal is for it to be “the C++ standard library” - the one that you get from your system/distro vendor.</div><div><br class=""></div><div>Changing the ABI of the libc++.dylib means that you have to rebuild *every piece of code* that links to that dylib. That’s a high bar.</div><div><br class=""></div><div>What this proposal is about is providing those people (who distribute libc++) a method for managing the ABI that they ship.</div><div><br class=""></div><div><blockquote type="cite" class=""><div class=""><div style="font-family: LucidaGrande; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div><div style="font-family: LucidaGrande; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">I'm personally against the #if hell which could result in multiple universes (I'd rather put a "stable" piece of code in a maintenance branch, but that's must my not-so-humble opinion.) It's like saying that the IR should be stable and never change... This is more user facing and gets more hand waiving, but at the end of the day it's the same sort of problem.</div><div style="font-family: LucidaGrande; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: LucidaGrande; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Every time a set of ABI breaking changes happen.. bump the lib version, cut a branch before the changes and move on with life... what's so wrong about this? Changes can be ported forward/backward to the branch as the owners want. Keep code complexity down..</div></div></blockquote><div><br class=""></div>At the cost of pushing the complexity onto the code owners, making sure that every non-ABI breaking change goes to all branches.</div><div><br class=""></div><div><blockquote type="cite" class=""><div style="font-family: LucidaGrande; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Further - how do you QA libc++ when there's basically "2" correct ways to build it? Have the buildbots build it twice and report both results?</div></blockquote><div><br class=""></div>That’s what I would expect. Build once w/o any ABI breaks (because that’s the most common use case), and then once with them all.</div><div><br class=""></div><div>If someone wants a library with a subset of the changes, they can build and test that.</div><div>For example, Apple would build with _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT but no other changes for AArch64, because that’s what they ship today.</div><div><br class=""></div><div><br class=""><blockquote type="cite" class=""><span style="font-family: LucidaGrande;" class="">For anyone who wants or demands stability.. I'd love to hear why a branch won't work..</span></blockquote></div><br class=""><div class="">It’s not “a branch”, it’s N branches (2^N if you consider combinations).</div><div class=""><br class=""></div><div class="">— Marshall</div><div class=""><br class=""></div><div class=""><br class=""></div></body></html>