{"action":"created","issue":{"url":"https://api.github.com/repos/rebar/rebar/issues/503","labels_url":"https://api.github.com/repos/rebar/rebar/issues/503/labels{/name}","comments_url":"https://api.github.com/repos/rebar/rebar/issues/503/comments","events_url":"https://api.github.com/repos/rebar/rebar/issues/503/events","html_url":"https://github.com/rebar/rebar/issues/503","id":83802227,"number":503,"title":"Release location moved, crashing on recompile","user":{"login":"choptastic","id":186524,"avatar_url":"https://avatars.githubusercontent.com/u/186524?v=3","gravatar_id":"","url":"https://api.github.com/users/choptastic","html_url":"https://github.com/choptastic","followers_url":"https://api.github.com/users/choptastic/followers","following_url":"https://api.github.com/users/choptastic/following{/other_user}","gists_url":"https://api.github.com/users/choptastic/gists{/gist_id}","starred_url":"https://api.github.com/users/choptastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/choptastic/subscriptions","organizations_url":"https://api.github.com/users/choptastic/orgs","repos_url":"https://api.github.com/users/choptastic/repos","events_url":"https://api.github.com/users/choptastic/events{/privacy}","received_events_url":"https://api.github.com/users/choptastic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":36,"created_at":"2015-06-02T02:47:10Z","updated_at":"2015-06-07T20:32:27Z","closed_at":null,"body":"If a reltool-generated release is moved (that is, if the entire directory structure is moved to a different location), running rebar from within that release (and using the release's Erlang version), it crashes.\r\n\r\nThe full error message is:\r\n\r\n```erlang\r\nERROR: compile failed while processing /home/gumm/www/nitrogen-git/myapp/lib/mimetypes: {'EXIT',{{badmatch,{error,enoent}},\r\n         [{rebar_erlc_compiler,modify_erlcinfo,4,\r\n                               [{file,\"src/rebar_erlc_compiler.erl\"},\r\n                                {line,443}]},\r\n          {rebar_erlc_compiler,'-update_erlcinfo_fun/2-fun-0-',4,\r\n                               [{file,\"src/rebar_erlc_compiler.erl\"},\r\n                                {line,399}]},\r\n          {lists,foldl,3,[{file,\"lists.erl\"},{line,1261}]},\r\n          {rebar_erlc_compiler,update_erlcinfo,3,\r\n                               [{file,\"src/rebar_erlc_compiler.erl\"},\r\n                                {line,418}]},\r\n          {rebar_erlc_compiler,'-update_erlcinfo_fun/2-fun-0-',4,\r\n                               [{file,\"src/rebar_erlc_compiler.erl\"},\r\n                                {line,399}]},\r\n          {lists,foldl,3,[{file,\"lists.erl\"},{line,1261}]},\r\n          {rebar_erlc_compiler,init_erlcinfo,2,\r\n                               [{file,\"src/rebar_erlc_compiler.erl\"},\r\n                                {line,389}]},\r\n          {rebar_erlc_compiler,doterl_compile,4,\r\n                               [{file,\"src/rebar_erlc_compiler.erl\"},\r\n                                {line,300}]}]}}\r\n```\r\n\r\nUpon further inspection is appears in trying to read the contents of a file that no longer exists:\r\n\r\nIn my case, the `Source` file generating the error is WARN: \"/www/nitrogen-git/nitrogen/rel/nitrogen/lib/parsetools-2.0.12/include/leexinc.hrl\"\r\n\r\nThis file was originally generated there, but the whole directory was moved to /www/nitrogen-git/myapp.  The naive approach is modifiying `rebar_erlc_compiler:modify_erlcinfo/4` to not crash if the file does not exist seems to work, but it feels like a bandaid fix and not a real fix (and not totally knowing what exactly that module is doing, I was hoping someone with a better internal model of that code would know where a better fix would be applied)."},"comment":{"url":"https://api.github.com/repos/rebar/rebar/issues/comments/109797690","html_url":"https://github.com/rebar/rebar/issues/503#issuecomment-109797690","issue_url":"https://api.github.com/repos/rebar/rebar/issues/503","id":109797690,"user":{"login":"david-kubecka","id":1436135,"avatar_url":"https://avatars.githubusercontent.com/u/1436135?v=3","gravatar_id":"","url":"https://api.github.com/users/david-kubecka","html_url":"https://github.com/david-kubecka","followers_url":"https://api.github.com/users/david-kubecka/followers","following_url":"https://api.github.com/users/david-kubecka/following{/other_user}","gists_url":"https://api.github.com/users/david-kubecka/gists{/gist_id}","starred_url":"https://api.github.com/users/david-kubecka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-kubecka/subscriptions","organizations_url":"https://api.github.com/users/david-kubecka/orgs","repos_url":"https://api.github.com/users/david-kubecka/repos","events_url":"https://api.github.com/users/david-kubecka/events{/privacy}","received_events_url":"https://api.github.com/users/david-kubecka/received_events","type":"User","site_admin":false},"created_at":"2015-06-07T20:32:27Z","updated_at":"2015-06-07T20:32:27Z","body":"Hi, I have just got into hits. @tuncer Please let me think for a minute about it before merging the pull request."}}