{"action":"created","issue":{"url":"https://api.github.com/repos/jpsim/SourceKitten/issues/235","repository_url":"https://api.github.com/repos/jpsim/SourceKitten","labels_url":"https://api.github.com/repos/jpsim/SourceKitten/issues/235/labels{/name}","comments_url":"https://api.github.com/repos/jpsim/SourceKitten/issues/235/comments","events_url":"https://api.github.com/repos/jpsim/SourceKitten/issues/235/events","html_url":"https://github.com/jpsim/SourceKitten/pull/235","id":170896517,"number":235,"title":"[Question] `sourcekitten demangle` implementation segfaults","user":{"login":"modocache","id":552921,"avatar_url":"https://avatars.githubusercontent.com/u/552921?v=3","gravatar_id":"","url":"https://api.github.com/users/modocache","html_url":"https://github.com/modocache","followers_url":"https://api.github.com/users/modocache/followers","following_url":"https://api.github.com/users/modocache/following{/other_user}","gists_url":"https://api.github.com/users/modocache/gists{/gist_id}","starred_url":"https://api.github.com/users/modocache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/modocache/subscriptions","organizations_url":"https://api.github.com/users/modocache/orgs","repos_url":"https://api.github.com/users/modocache/repos","events_url":"https://api.github.com/users/modocache/events{/privacy}","received_events_url":"https://api.github.com/users/modocache/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-08-12T15:25:14Z","updated_at":"2016-08-13T03:11:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jpsim/SourceKitten/pulls/235","html_url":"https://github.com/jpsim/SourceKitten/pull/235","diff_url":"https://github.com/jpsim/SourceKitten/pull/235.diff","patch_url":"https://github.com/jpsim/SourceKitten/pull/235.patch"},"body":"I'm trying to implement `sourcekitten demangle`, a SourceKitten command for that wraps SourceKit's `source.request.demangle`.\r\n\r\nI need this functionality to complete [type hints for Swift in Nuclide](https://d3vv6lp55qjaqc.cloudfront.net/items/1k030c0r3E0I0k0D243k/NuclideTypehint.gif). An alternative approach is to [use `xcrun swift-demangle`](https://github.com/modocache/nuclide/blob/0bf641c0e8b4eb3a44832b838a838acf221fbb2a/pkg/nuclide-swift/lib/taskrunner/typehint/SwiftDemangle.js#L26), but I'd prefer to use SourceKitten so that I can support Linux at some point.\r\n\r\nI copied the implementation of other SourceKitten commands, but my `demangle` command crashes every time it's run. This is because the response from SourceKit appears to be of type `SOURCEKITD_VARIANT_TYPE_NULL`. However, issuing my `source.request.demangle` request directly on the `sourcekitd-repl` works just fine.\r\n\r\nAm I doing something wrong in this implementation? What could be causing a null response from SourceKit?"},"comment":{"url":"https://api.github.com/repos/jpsim/SourceKitten/issues/comments/239598673","html_url":"https://github.com/jpsim/SourceKitten/pull/235#issuecomment-239598673","issue_url":"https://api.github.com/repos/jpsim/SourceKitten/issues/235","id":239598673,"user":{"login":"norio-nomura","id":33430,"avatar_url":"https://avatars.githubusercontent.com/u/33430?v=3","gravatar_id":"","url":"https://api.github.com/users/norio-nomura","html_url":"https://github.com/norio-nomura","followers_url":"https://api.github.com/users/norio-nomura/followers","following_url":"https://api.github.com/users/norio-nomura/following{/other_user}","gists_url":"https://api.github.com/users/norio-nomura/gists{/gist_id}","starred_url":"https://api.github.com/users/norio-nomura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/norio-nomura/subscriptions","organizations_url":"https://api.github.com/users/norio-nomura/orgs","repos_url":"https://api.github.com/users/norio-nomura/repos","events_url":"https://api.github.com/users/norio-nomura/events{/privacy}","received_events_url":"https://api.github.com/users/norio-nomura/received_events","type":"User","site_admin":false},"created_at":"2016-08-13T03:11:25Z","updated_at":"2016-08-13T03:11:25Z","body":"> I guess Nuclide is trying to launch sourcekitten in sandbox.\r\n\r\nMy guess was incorrect."}}
{"actor":{"display_login":"norio-nomura"}}