<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></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 May 9, 2016, at 7:35 PM, Brian Gesiak &lt;<a href="mailto:modocache@gmail.com" class="">modocache@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Thanks for the feedback, everyone!<br class=""><br class="">Porting SourceKit to Linux seems like a reasonable solution to me. Still, there are 354 lines of code in tools/SourceKit that reference "XPC", so a Linux port will take more than a few lines of source code changes.<div class=""><br class=""></div><div class="">I imagine we'll need to insert some sort of shim layer that will use libxpc on OS X, and a hand-rolled solution for Linux. Alternatively, if anyone knows of a good open-source library that implements IPC for Linux (and that has a permissible license), that would be a great help here.<div class=""><br class="">I've also seen the idea proposed that Apple could open-source libxpc, which we could then port to Linux. This would involve less work than installing a shim layer in SourceKit, then in addition implementing a Linux IPC library behind the shim. I don't know who I could talk about making this happen, but in any case, I filed a Radar:</div><div class=""><br class=""></div><div class=""><div class=""><span style="font-size:12.8px" class="">* <a href="rdar://26187442" class="">rdar://26187442</a></span></div><div class=""><span style="font-size:12.8px" class="">* <a href="https://openradar.appspot.com/26187442" class="">https://openradar.appspot.com/26187442</a></span></div><br class="">&gt;&nbsp;<span style="font-size:12.8px" class="">2. Somehwat unrelated, but the compiler itself (`swiftc`) is not yet written in&nbsp;</span><span style="font-size:12.8px" class="">a way that it can be used from SourceKit.</span><span style="font-size:12.8px" class=""><br class=""></span><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div><div class=""><span style="font-size:12.8px" class="">Could you explain this further?</span></div></div></div></div></div></blockquote><div><br class=""></div>Basically, I just meant that SourceKit doesn't currently have APIs for driving the compiler (driver), just interrogating the AST.</div><div><br class=""></div><div>&nbsp;- Daniel</div><div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div><div class=""><span style="font-size:12.8px" class="">- Brian Gesiak</span></div><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div></div></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Sat, May 7, 2016 at 4:18 AM, Drew Crawford <span dir="ltr" class="">&lt;<a href="mailto:drew@sealedabstract.com" target="_blank" class="">drew@sealedabstract.com</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><span class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On May 6, 2016, at 3:04 PM, Daniel Dunbar &lt;<a href="mailto:daniel_dunbar@apple.com" target="_blank" class="">daniel_dunbar@apple.com</a>&gt; wrote:</div><br class=""><div class=""><div style="font-family:HelveticaNeue;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">The conclusion was that after weighing all of the tradeoffs, it made the most</div><div style="font-family:HelveticaNeue;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">sense to encourage porting of SourceKit to Linux and then using it to build out</div><div style="font-family:HelveticaNeue;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">the Linux test discovery feature. This was most in line with a desirable</div><div style="font-family:HelveticaNeue;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">long-term direction without being blocked on language design.</div></div></blockquote></div><br class=""></span><div class="">For whatever it's worth, this direction is a win on my side as well.</div><div class=""><br class=""></div><div class="">In addition to the problem of test discovery (for which I'm using an out-of-tree parser), I have a lot of other problems entirely outside of testing that rely on source-level queries similar to the XCTest problem.&nbsp; This is things like parsing comments for documentation, implementing dispatch-by-string, etc.&nbsp; I currently rely on SK in many cases, but lack of support on Linux is a major issue.&nbsp; Lack of features exposed in the SK APIs is another issue.</div><div class=""><br class=""></div><div class="">IMO it is a clear win to invest in resolving these problems inside SK.&nbsp; Right now it is basically a glorified Xcode daemon, but I think it can have a bright future as a multi-client tool if we're willing to invest in making that happen.</div></div></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></body></html>