{"action":"created","issue":{"url":"https://api.github.com/repos/stan-dev/rstan/issues/503","repository_url":"https://api.github.com/repos/stan-dev/rstan","labels_url":"https://api.github.com/repos/stan-dev/rstan/issues/503/labels{/name}","comments_url":"https://api.github.com/repos/stan-dev/rstan/issues/503/comments","events_url":"https://api.github.com/repos/stan-dev/rstan/issues/503/events","html_url":"https://github.com/stan-dev/rstan/issues/503","id":303976140,"number":503,"title":"Bizarre behavior of stanc_builder with include files","user":{"login":"ksvanhorn","id":739580,"avatar_url":"https://avatars2.githubusercontent.com/u/739580?v=4","gravatar_id":"","url":"https://api.github.com/users/ksvanhorn","html_url":"https://github.com/ksvanhorn","followers_url":"https://api.github.com/users/ksvanhorn/followers","following_url":"https://api.github.com/users/ksvanhorn/following{/other_user}","gists_url":"https://api.github.com/users/ksvanhorn/gists{/gist_id}","starred_url":"https://api.github.com/users/ksvanhorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ksvanhorn/subscriptions","organizations_url":"https://api.github.com/users/ksvanhorn/orgs","repos_url":"https://api.github.com/users/ksvanhorn/repos","events_url":"https://api.github.com/users/ksvanhorn/events{/privacy}","received_events_url":"https://api.github.com/users/ksvanhorn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-03-09T20:51:12Z","updated_at":"2018-03-09T22:04:07Z","closed_at":null,"author_association":"NONE","body":"#### Summary:\r\nIf I #include ssm.stan and the isystem path does not exist, stanc_builder hangs indefinitely using up 100% CPU.\r\n\r\n#### Description:\r\nIf I run\r\n\r\n    stanc_builder(\"foo.stan\", isystem=\"/nonexistent/path/\")\r\n\r\nthen, instead of getting an error, `stanc_builder` hangs indefinitely using 100% CPU.\r\n\r\nHere is the file `foo.stan`, renamed so that github will let me upload it:\r\n[foo.stan.txt](https://github.com/stan-dev/rstan/files/1798339/foo.stan.txt)\r\n\r\nNow for the bizarre part: If I change the line\r\n\r\n    #include ssm.stan\r\n\r\nin `foo.stan` to use *any other* file name, I get the expected error message instead of it hanging.\r\n\r\nThis problem *does not* occur with `stanc`, but instead I get a different problem: even if the include path is correct and the include file exists, I get the error message\r\n\r\n    could not find include file: #include ssm.stan\r\n    Error in stanc(\"foo.stan\", isystem = \"/nonexistent/path/\") :\r\n      failed to parse Stan model 'foo' due to the above error.\r\n\r\nI get this error regardless of the name of the include file.\r\n\r\n(BTW, I can find nothing in the documentation page for `stanc`/`stanc_builder` that tells me how these two functions differ, other than having different defaults, and `stanc` having some additional possibilities for specifying the model code.)\r\n\r\n#### RStan Version:\r\n2.17.3\r\n\r\n#### R Version:\r\nR version 3.4.3 (2017-11-30)\r\n\r\n#### Operating System:\r\nMac OS X 10.13.3\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/stan-dev/rstan/issues/comments/371958142","html_url":"https://github.com/stan-dev/rstan/issues/503#issuecomment-371958142","issue_url":"https://api.github.com/repos/stan-dev/rstan/issues/503","id":371958142,"user":{"login":"bob-carpenter","id":3383807,"avatar_url":"https://avatars1.githubusercontent.com/u/3383807?v=4","gravatar_id":"","url":"https://api.github.com/users/bob-carpenter","html_url":"https://github.com/bob-carpenter","followers_url":"https://api.github.com/users/bob-carpenter/followers","following_url":"https://api.github.com/users/bob-carpenter/following{/other_user}","gists_url":"https://api.github.com/users/bob-carpenter/gists{/gist_id}","starred_url":"https://api.github.com/users/bob-carpenter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bob-carpenter/subscriptions","organizations_url":"https://api.github.com/users/bob-carpenter/orgs","repos_url":"https://api.github.com/users/bob-carpenter/repos","events_url":"https://api.github.com/users/bob-carpenter/events{/privacy}","received_events_url":"https://api.github.com/users/bob-carpenter/received_events","type":"User","site_admin":false},"created_at":"2018-03-09T22:04:07Z","updated_at":"2018-03-09T22:04:07Z","author_association":"CONTRIBUTOR","body":"@ksvanhorn : We may go back and generalize the Stan include mechanism to match the old RStan behavior.  Despite wanting it to be line initial so file structure is easy to scan (as in C/C++), everyone seems to want an indented version, so I'll probably have to be less fussy and allow it anywhere.  \r\n\r\nThanks for pointing out the vagueness of the manual.  Whichever way this goes, the placement needs to be explicitly clarified. "}}
{"actor":{"display_login":"bob-carpenter"}}