{"id":19466,"date":"2017-11-09T16:21:49","date_gmt":"2017-11-09T21:21:49","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=19466"},"modified":"2017-11-10T15:07:22","modified_gmt":"2017-11-10T20:07:22","slug":"enduring-xcode-and-sourcekitservice-problems","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2017\/11\/09\/enduring-xcode-and-sourcekitservice-problems\/","title":{"rendered":"Enduring Xcode and SourceKitService Problems"},"content":{"rendered":"<p><a href=\"https:\/\/twitter.com\/an0\/status\/928385808163397632\">Ling Wang<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/an0\/status\/928385808163397632\"><p>This is how I&rsquo;ve been coding in Xcode 9 since WWDC. Code completion is totally broken. It&rsquo;s basically TextEdit with syntax highlight.<\/p>\n<\/blockquote>\n<blockquote cite=\"https:\/\/twitter.com\/an0\/status\/928386822576713728\"><p>Many issues beside code completion:<\/p>\n<ol><li>Jump to Definition shows menu not jump<\/li>\n<li>to ObjC header not Swift<\/li><\/ol>\n<\/blockquote>\n\n<p><a href=\"https:\/\/twitter.com\/tonyarnold\/status\/928537473050861570\">Tony Arnold<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/tonyarnold\/status\/928537473050861570\">\n<p>My experience isn&rsquo;t as bad, but it&rsquo;s still poor enough to have made me think seriously about starting a different career. There were a few points in the last year where Xcode made me want to give up coding entirely.<\/p>\n<\/blockquote>\n<blockquote cite=\"https:\/\/twitter.com\/tonyarnold\/status\/928538695073914880\"><p>I file bugs, I sympathise and I try to understand where I can. But I have jobs to do, too - there are limits to my time.<\/p>\n<p>Sadly and ultimately, working with Xcode is a minefield where the basics sound amazing on paper, but just don&rsquo;t live up to the promises made.<\/p><\/blockquote>\n<blockquote cite=\"https:\/\/twitter.com\/tonyarnold\/status\/928539215138136064\"><p>I had a realisation earlier this week that the only reason I was considering buying an iMac Pro (which is likely to be a $10-15k AUD Machine) was to make Xcode run faster because I spend half of my professional time cleaning &amp; rebuilding my projects to get basic editing working.<\/p><\/blockquote>\n\n<p>My recollection is that the old ProjectBuilder was solid but that <a href=\"http:\/\/www.cocoabuilder.com\/archive\/cocoa\/26936-getting-started-pb-pbx.html\">Project Builder<\/a> and Xcode have been perpetually buggy. It used to be that the compiler tools were reliable and the interface was buggy and crashy. Lately, the app itself has gotten better, but the Swift support (highlighting, jumping to definitions, and compiler) have been dragging it down. It is rare for me to make it through a day without the compiler crashing or the editor breaking. Fixing these issues would save developers inside and outside of Apple countless hours and frustration.<\/p>\n\n<p>Previously: <a href=\"https:\/\/mjtsai.com\/blog\/2017\/09\/20\/swift-4-0-released\/\">Swift 4.0 Released<\/a>, <a href=\"https:\/\/mjtsai.com\/blog\/2015\/06\/04\/why-i-dont-write-swift\/\">Why I Don&rsquo;t Write Swift<\/a>.<\/p>\n\n<p>Update (2017-11-09): <a href=\"https:\/\/twitter.com\/slava_pestov\/status\/928800248511606784\">Slava Pestov<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/slava_pestov\/status\/928800248511606784\">\n<p>I think we&rsquo;ve reached an inflection point and general compiler crashes have been getting fixed at a good pace since 3.1<\/p>\n<p>SourceKit crashes have the same root causes often but are more challenging because SourceKit sees more invalid states<\/p>\n<p>Source compatibility as a goal means we can grow the body of code we test against with the source compat suite<\/p>\n<p>Up until Swift 3 we had the double whammy of spending most of our time on language features and changes and also breaking compatibility meaning we had trouble getting good test coverage<\/p>\n<p>There is still a lot of work to do but I&rsquo;m much happier with our priorities now that the language has settled down and things are moving in the right direction<\/p>\n<\/blockquote>\n\n<p>Update (2017-11-10): <a href=\"https:\/\/twitter.com\/jckarter\/status\/929027958164959232\">Joe Groff<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/jckarter\/status\/929027958164959232\">\n<p>Turns out Ling&rsquo;s problem was a bug that is fixed in master SourceKit. You can remove <code>-v<\/code> from <code>OTHER_SWIFT_FLAGS<\/code> to work around it.<\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Ling Wang: This is how I&rsquo;ve been coding in Xcode 9 since WWDC. Code completion is totally broken. It&rsquo;s basically TextEdit with syntax highlight. Many issues beside code completion: Jump to Definition shows menu not jump to ObjC header not Swift Tony Arnold: My experience isn&rsquo;t as bad, but it&rsquo;s still poor enough to have [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[1143,131,30,1529,71,901,226],"class_list":["post-19466","post","type-post","status-publish","format-standard","hentry","category-technology","tag-apple-software-quality","tag-bug","tag-mac","tag-macos-10-13","tag-programming","tag-swift-programming-language","tag-xcode"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/19466","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=19466"}],"version-history":[{"count":3,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/19466\/revisions"}],"predecessor-version":[{"id":19480,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/19466\/revisions\/19480"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=19466"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=19466"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=19466"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}