<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="">Hey Maxim,<div class=""><br class=""></div><div class="">I understand your point. This kind of behavior is ideal development workflow, and we should move our package management systems in this direction.</div><div class=""><br class=""></div><div class="">Including source code into binary will do the job, however, we should consider different approaches. </div><div class=""><br class=""></div><div class="">For example: </div><div class=""><br class=""></div><div class="">1) Inside your project you specify RxSwift dependency.</div><div class="">2) During build phase, IDE / compiler will download sources.</div><div class="">3) Sources are stored in system cache, independent from project tree. Sources are read only.</div><div class="">4) RxSwift sources compilation.</div><div class="">5) Resulting RXSwift framework is stored in system cache.</div><div class="">6) Project is build using resulting framework from cache.</div><div class="">7) During debug, exact sources can be displayed to developer.</div><div class=""><br class=""></div><div class="">Advantages of this approach: </div><div class="">1) No need to keep sources or binaries in project repo.</div><div class="">2) IDE / compiler can reuse resulting binaries.</div><div class="">3) Full debug support.</div><div class=""><br class=""></div><div class="">To be honest, this is exactly what you are suppose to do. But on infrastructure level instead of implementation level.</div><div class="">I believe we can achieve this behavior using combination of small improvements into existing infrastructure, </div><div class="">instead of adding more complexity into compiler.</div><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">14 февр. 2016 г., в 12:12, Maxim Veksler <<a href="mailto:maxim@vekslers.org" class="">maxim@vekslers.org</a>> написал(а):</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hey Alexey, <div class=""><br class=""></div><div class="">Imagine being able to add RxSwift into your project (either via manually, cocoa pods, carthage, swift package manager or otherwise) and having the seamless experiences of being able to drill down in a debugging session into the code of the framework, looking for why it does something you did not expect. </div><div class=""><br class=""></div><div class="">This experience is very valuable time saver, because today should you wish to reach this point of being able to drill down you need to:</div><div class=""><br class=""></div><div class="">1. Find the source code repository</div><div class="">2. clone it locally</div><div class="">3. checkout to the correct version / patch</div><div class="">4. add the framework source code into your app</div><div class="">5. fix any build problems</div><div class="">6. remove the binary framework you already have included.</div><div class="">7. run the debugging session and hope to be able to reproduce your bug</div><div class="">7.1 let Xcode compile the framework from source -- time consuming, without value task.</div><div class="">8. Now you need to choose if you leave the framework in source form or starting changing your app back into binary form.<br class=""></div><div class=""><br class=""></div><div class="">So I think a complete automation is possible, but it does require many moving parts which is why I think Swift poses a great opportunity of making this leap. </div><div class=""><br class=""></div><div class="">Would be glad to hear your feedback.</div><div class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Sat, Feb 13, 2016 at 10:20 AM, Alexey Demedetskiy <span dir="ltr" class=""><<a href="mailto:dalog@me.com" target="_blank" class="">dalog@me.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Why not use _just_ source code and let Xcode / Package Manager to do the job of building?<br class="">
<br class="">
Or you to want have binary distribution and source code for debug?<br class="">
<br class="">
<br class="">
- Alexey Demedetskiy<br class="">
<span class=""><br class="">
> Hello everyone,<br class="">
><br class="">
> I would like to start a discussion on the possibility of enabling compelling Swift binaries that embed the source code from which they've been compiled.<br class="">
><br class="">
</span>> The value of having source code embedded alongside the binary isdebugging aid - A developer will be able to download 3rd party framework, include it into his Xcode project and then drill down in a debug session into the framework code, having Xcode showing him the source code from which the current breakpoint instruction was built.<br class="">
><br class="">
> This feature exists in the java world where you can compile a Jar file, having each .class contain it's .java counter part. I //think// it's stored in this propertyhttps://<a href="http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.7.11" rel="noreferrer" target="_blank" class="">docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.7.11</a>. This allows opening the Jar of a target library in eclipse and instantly seeing what the code is doing.<br class="">
><br class="">
> The alternatives today are either decompilers, or.dSYM both are good but not great as each requires manually steps in either management or enforcing corrects of the results.<br class="">
<div class=""><div class="h5">><br class="">
> Would the community be interested in such a "plug and play" approach for attaching source code to build frameworks / applications / stand alone binaries ?<br class="">
><br class="">
> Is it feasible to expect such a thing from native apps? if not, can it be an Xcode level feature when only .packages (Framework/Application) will be added support for shipping the .dSYM and Xcode will know to do the lifting to make it just work for the developer?<br class="">
><br class="">
><br class="">
> tnx,<br class="">
> -m<br class="">
><br class="">
><br class="">
><br class="">
> </div></div></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class="gmail_signature"><div dir="ltr" class="">puıɯ ʎɯ ɯoɹɟ ʇuǝs<br class=""></div></div>
</div></div></div>
</div></blockquote></div><br class=""></div></body></html>