{"action":"created","issue":{"url":"https://api.github.com/repos/RomanYankovsky/DelphiAST/issues/140","labels_url":"https://api.github.com/repos/RomanYankovsky/DelphiAST/issues/140/labels{/name}","comments_url":"https://api.github.com/repos/RomanYankovsky/DelphiAST/issues/140/comments","events_url":"https://api.github.com/repos/RomanYankovsky/DelphiAST/issues/140/events","html_url":"https://github.com/RomanYankovsky/DelphiAST/issues/140","id":120647231,"number":140,"title":"DelphAST does not support include files that include other files","user":{"login":"RomanYankovsky","id":1485472,"avatar_url":"https://avatars.githubusercontent.com/u/1485472?v=3","gravatar_id":"","url":"https://api.github.com/users/RomanYankovsky","html_url":"https://github.com/RomanYankovsky","followers_url":"https://api.github.com/users/RomanYankovsky/followers","following_url":"https://api.github.com/users/RomanYankovsky/following{/other_user}","gists_url":"https://api.github.com/users/RomanYankovsky/gists{/gist_id}","starred_url":"https://api.github.com/users/RomanYankovsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RomanYankovsky/subscriptions","organizations_url":"https://api.github.com/users/RomanYankovsky/orgs","repos_url":"https://api.github.com/users/RomanYankovsky/repos","events_url":"https://api.github.com/users/RomanYankovsky/events{/privacy}","received_events_url":"https://api.github.com/users/RomanYankovsky/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-06T17:33:02Z","updated_at":"2015-12-06T18:24:10Z","closed_at":"2015-12-06T17:33:51Z","body":"I'm going to check in my changes. It works fine with my test cases, but I will be happy if you guys review that."},"comment":{"url":"https://api.github.com/repos/RomanYankovsky/DelphiAST/issues/comments/162334527","html_url":"https://github.com/RomanYankovsky/DelphiAST/issues/140#issuecomment-162334527","issue_url":"https://api.github.com/repos/RomanYankovsky/DelphiAST/issues/140","id":162334527,"user":{"login":"Wosi","id":3448684,"avatar_url":"https://avatars.githubusercontent.com/u/3448684?v=3","gravatar_id":"","url":"https://api.github.com/users/Wosi","html_url":"https://github.com/Wosi","followers_url":"https://api.github.com/users/Wosi/followers","following_url":"https://api.github.com/users/Wosi/following{/other_user}","gists_url":"https://api.github.com/users/Wosi/gists{/gist_id}","starred_url":"https://api.github.com/users/Wosi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wosi/subscriptions","organizations_url":"https://api.github.com/users/Wosi/orgs","repos_url":"https://api.github.com/users/Wosi/repos","events_url":"https://api.github.com/users/Wosi/events{/privacy}","received_events_url":"https://api.github.com/users/Wosi/received_events","type":"User","site_admin":false},"created_at":"2015-12-06T18:24:10Z","updated_at":"2015-12-06T18:24:10Z","body":"Which problems did you face with the buffer size? \r\n\r\nShort explanation for the fixed buffer size:\r\n - DelphiAST uses different pointers on the file contents via PChars during parsing/lexing. \r\n - Includes are added to the string during the parsing process\r\n - Based on the way included file contents are added to the origin file content you can face two problems when the included contents are too big: a) The resulting string moves to a different location when it exceeds the available space. Hence the PChars are pointing to wrong addresses b) You cause a buffer overflow and the application crashes.\r\n - `INCLUDE_BUFFER_SIZE` is used to reserve space for including 1024*1024 Characters. An exception is raised when attempting to include more characters to a unit.\r\n - **The described problems only appear when you work with big units and big include files. When testing with small files everything looks fine!**\r\n\r\nI don't have time now to test your changes now. But I recommend you to create some huge test files. \r\n[Here is a huge file](https://raw.githubusercontent.com/project-jedi/jcl/master/jcl/source/windows/mscorlib_TLB.pas) with a lot of includes. Does DelphiAST still work with your changes?"}}