{"action":"created","issue":{"url":"https://api.github.com/repos/krzysztofzablocki/Sourcery/issues/420","repository_url":"https://api.github.com/repos/krzysztofzablocki/Sourcery","labels_url":"https://api.github.com/repos/krzysztofzablocki/Sourcery/issues/420/labels{/name}","comments_url":"https://api.github.com/repos/krzysztofzablocki/Sourcery/issues/420/comments","events_url":"https://api.github.com/repos/krzysztofzablocki/Sourcery/issues/420/events","html_url":"https://github.com/krzysztofzablocki/Sourcery/issues/420","id":259817367,"number":420,"title":"Sourcery doesn't work with Apollo GraphQL generated API.swift","user":{"login":"va1da","id":961352,"avatar_url":"https://avatars3.githubusercontent.com/u/961352?v=4","gravatar_id":"","url":"https://api.github.com/users/va1da","html_url":"https://github.com/va1da","followers_url":"https://api.github.com/users/va1da/followers","following_url":"https://api.github.com/users/va1da/following{/other_user}","gists_url":"https://api.github.com/users/va1da/gists{/gist_id}","starred_url":"https://api.github.com/users/va1da/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/va1da/subscriptions","organizations_url":"https://api.github.com/users/va1da/orgs","repos_url":"https://api.github.com/users/va1da/repos","events_url":"https://api.github.com/users/va1da/events{/privacy}","received_events_url":"https://api.github.com/users/va1da/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"krzysztofzablocki","id":1468993,"avatar_url":"https://avatars1.githubusercontent.com/u/1468993?v=4","gravatar_id":"","url":"https://api.github.com/users/krzysztofzablocki","html_url":"https://github.com/krzysztofzablocki","followers_url":"https://api.github.com/users/krzysztofzablocki/followers","following_url":"https://api.github.com/users/krzysztofzablocki/following{/other_user}","gists_url":"https://api.github.com/users/krzysztofzablocki/gists{/gist_id}","starred_url":"https://api.github.com/users/krzysztofzablocki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krzysztofzablocki/subscriptions","organizations_url":"https://api.github.com/users/krzysztofzablocki/orgs","repos_url":"https://api.github.com/users/krzysztofzablocki/repos","events_url":"https://api.github.com/users/krzysztofzablocki/events{/privacy}","received_events_url":"https://api.github.com/users/krzysztofzablocki/received_events","type":"User","site_admin":false},"assignees":[{"login":"krzysztofzablocki","id":1468993,"avatar_url":"https://avatars1.githubusercontent.com/u/1468993?v=4","gravatar_id":"","url":"https://api.github.com/users/krzysztofzablocki","html_url":"https://github.com/krzysztofzablocki","followers_url":"https://api.github.com/users/krzysztofzablocki/followers","following_url":"https://api.github.com/users/krzysztofzablocki/following{/other_user}","gists_url":"https://api.github.com/users/krzysztofzablocki/gists{/gist_id}","starred_url":"https://api.github.com/users/krzysztofzablocki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krzysztofzablocki/subscriptions","organizations_url":"https://api.github.com/users/krzysztofzablocki/orgs","repos_url":"https://api.github.com/users/krzysztofzablocki/repos","events_url":"https://api.github.com/users/krzysztofzablocki/events{/privacy}","received_events_url":"https://api.github.com/users/krzysztofzablocki/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2017-09-22T13:36:48Z","updated_at":"2017-11-29T22:53:14Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\nI'm using Sourcery to generate methods for GraphQL API.\r\nCurrently as generated API.swift is about 710 KB Sourcery gets stuck (eats all my RAM and then available disk space).\r\n\r\nI understand that there are a lot of types in API.swift, but even though, it could work on 8GB RAM notebook?\r\n\r\nAnyone having similar issue?\r\n\r\nXcode 9\r\n[API.swift.zip](https://github.com/krzysztofzablocki/Sourcery/files/1324683/API.swift.zip)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/krzysztofzablocki/Sourcery/issues/comments/348023972","html_url":"https://github.com/krzysztofzablocki/Sourcery/issues/420#issuecomment-348023972","issue_url":"https://api.github.com/repos/krzysztofzablocki/Sourcery/issues/420","id":348023972,"user":{"login":"Antondomashnev","id":2076088,"avatar_url":"https://avatars0.githubusercontent.com/u/2076088?v=4","gravatar_id":"","url":"https://api.github.com/users/Antondomashnev","html_url":"https://github.com/Antondomashnev","followers_url":"https://api.github.com/users/Antondomashnev/followers","following_url":"https://api.github.com/users/Antondomashnev/following{/other_user}","gists_url":"https://api.github.com/users/Antondomashnev/gists{/gist_id}","starred_url":"https://api.github.com/users/Antondomashnev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Antondomashnev/subscriptions","organizations_url":"https://api.github.com/users/Antondomashnev/orgs","repos_url":"https://api.github.com/users/Antondomashnev/repos","events_url":"https://api.github.com/users/Antondomashnev/events{/privacy}","received_events_url":"https://api.github.com/users/Antondomashnev/received_events","type":"User","site_admin":false},"created_at":"2017-11-29T22:53:14Z","updated_at":"2017-11-29T22:53:14Z","author_association":"COLLABORATOR","body":"@krzysztofzablocki FYI I've checked it a while ago and because there are plenty of nested of levels of recursion here:\r\n```\r\nprivate func walkDeclarations(source: [String: SourceKitRepresentable], containingIn: (Any, [String: SourceKitRepresentable])? = nil, processed: inout [[String: SourceKitRepresentable]], foundEntry: (SwiftDeclarationKind, String, AccessLevel, [String], [String: SourceKitRepresentable], Any?) -> Any?) {\r\n        if let substructures = source[SwiftDocKey.substructure.rawValue] as? [SourceKitRepresentable] {\r\n            for substructure in substructures {\r\n                if let source = substructure as? [String: SourceKitRepresentable] {\r\n                    processed.append(source)\r\n                    walkDeclaration(source: source, containingIn: containingIn, foundEntry: foundEntry)\r\n                }\r\n            }\r\n        }\r\n    }\r\n```\r\nIt ends up consuming a huge amount of memory."}}
{"actor":{"display_login":"Antondomashnev"}}