<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="">Le 12 févr. 2016 à 23:35, Maxim Veksler via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; a écrit :</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hello everyone,&nbsp;<div class=""><br class=""></div><div 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.</div><div class=""><br class=""></div><div class="">The value of having source code embedded alongside the binary is &nbsp;debugging 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.</div><div class=""><br class=""></div><div 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 property&nbsp;<a href="https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.7.11" class="">https://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.</div><div class=""><br class=""></div><div class="">The alternatives today are either decompilers, or&nbsp;.dSYM both are good but not great as each requires manually steps in either management or enforcing corrects of the results.&nbsp;</div></div></div></blockquote><div><br class=""></div><div>dsym is not an alternative and don’t provide the sources. It is just a bundle of debug symbols, which are information required to map instruction addresses to function name and source code line. Having the sources without dsym would be mostly useless. You won’t be able to put symbolic breakpoint or source location breakpoint, and won’t be able to get anything useful from the debugger but assembly.</div><div><br class=""></div><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="">Would the community be interested in such a "plug and play" approach for attaching source code to build frameworks / applications / stand alone binaries ?</div><div class=""><br class=""></div><div 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?</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">tnx,</div><div class="">-m</div></div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></body></html>