{"action":"created","issue":{"url":"https://api.github.com/repos/bryanjos/elixirscript/issues/54","labels_url":"https://api.github.com/repos/bryanjos/elixirscript/issues/54/labels{/name}","comments_url":"https://api.github.com/repos/bryanjos/elixirscript/issues/54/comments","events_url":"https://api.github.com/repos/bryanjos/elixirscript/issues/54/events","html_url":"https://github.com/bryanjos/elixirscript/issues/54","id":82315303,"number":54,"title":"Better handle inner modules","user":{"login":"bryanjos","id":1257573,"avatar_url":"https://avatars.githubusercontent.com/u/1257573?v=3","gravatar_id":"","url":"https://api.github.com/users/bryanjos","html_url":"https://github.com/bryanjos","followers_url":"https://api.github.com/users/bryanjos/followers","following_url":"https://api.github.com/users/bryanjos/following{/other_user}","gists_url":"https://api.github.com/users/bryanjos/gists{/gist_id}","starred_url":"https://api.github.com/users/bryanjos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryanjos/subscriptions","organizations_url":"https://api.github.com/users/bryanjos/orgs","repos_url":"https://api.github.com/users/bryanjos/repos","events_url":"https://api.github.com/users/bryanjos/events{/privacy}","received_events_url":"https://api.github.com/users/bryanjos/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bryanjos/elixirscript/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/bryanjos/elixirscript/labels/help%20wanted","name":"help wanted","color":"159818"},{"url":"https://api.github.com/repos/bryanjos/elixirscript/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/bryanjos/elixirscript/milestones/2","html_url":"https://github.com/bryanjos/elixirscript/milestones/The%20Elixir%20Standard%20Library","labels_url":"https://api.github.com/repos/bryanjos/elixirscript/milestones/2/labels","id":1122226,"number":2,"title":"The Elixir Standard Library","description":"","creator":{"login":"bryanjos","id":1257573,"avatar_url":"https://avatars.githubusercontent.com/u/1257573?v=3","gravatar_id":"","url":"https://api.github.com/users/bryanjos","html_url":"https://github.com/bryanjos","followers_url":"https://api.github.com/users/bryanjos/followers","following_url":"https://api.github.com/users/bryanjos/following{/other_user}","gists_url":"https://api.github.com/users/bryanjos/gists{/gist_id}","starred_url":"https://api.github.com/users/bryanjos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryanjos/subscriptions","organizations_url":"https://api.github.com/users/bryanjos/orgs","repos_url":"https://api.github.com/users/bryanjos/repos","events_url":"https://api.github.com/users/bryanjos/events{/privacy}","received_events_url":"https://api.github.com/users/bryanjos/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":4,"state":"open","created_at":"2015-05-20T22:50:27Z","updated_at":"2015-05-29T07:46:02Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-05-29T07:46:02Z","updated_at":"2015-06-18T19:29:25Z","closed_at":null,"body":"Testing out inner modules and realized there are some issues. The biggest being they export the default object as well creating more than one export default in a file. Same thing goes for the `__MODULE__` definition. Need a new way of handling the `__MODULE__` translation, and probably need to put inner modules as a property on the outer object. There should only be one export default per file."},"comment":{"url":"https://api.github.com/repos/bryanjos/elixirscript/issues/comments/113265822","html_url":"https://github.com/bryanjos/elixirscript/issues/54#issuecomment-113265822","issue_url":"https://api.github.com/repos/bryanjos/elixirscript/issues/54","id":113265822,"user":{"login":"bryanjos","id":1257573,"avatar_url":"https://avatars.githubusercontent.com/u/1257573?v=3","gravatar_id":"","url":"https://api.github.com/users/bryanjos","html_url":"https://github.com/bryanjos","followers_url":"https://api.github.com/users/bryanjos/followers","following_url":"https://api.github.com/users/bryanjos/following{/other_user}","gists_url":"https://api.github.com/users/bryanjos/gists{/gist_id}","starred_url":"https://api.github.com/users/bryanjos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryanjos/subscriptions","organizations_url":"https://api.github.com/users/bryanjos/orgs","repos_url":"https://api.github.com/users/bryanjos/repos","events_url":"https://api.github.com/users/bryanjos/events{/privacy}","received_events_url":"https://api.github.com/users/bryanjos/received_events","type":"User","site_admin":false},"created_at":"2015-06-18T19:29:25Z","updated_at":"2015-06-18T19:29:25Z","body":"Still thinking this through. I haven't come up with a plan yet, but I have thought about some options.\r\n\r\nOne would be to check for inner modules, translate them into a function and export them with the outer module's export statement. The problem here is when aliasing, etc, it would currently break with the way they are translated into imports.\r\n\r\nAnother would be to take the module and make it into it's own file. This would remove the issues laid out above. I would require some updates to the translation of modules, but nothing too bad.\r\n\r\nI'm not sold on either of those and would love any thoughts, feedback, or ideas."}}