{"action":"created","issue":{"url":"https://api.github.com/repos/datawire/quark/issues/6","labels_url":"https://api.github.com/repos/datawire/quark/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/datawire/quark/issues/6/comments","events_url":"https://api.github.com/repos/datawire/quark/issues/6/events","html_url":"https://github.com/datawire/quark/issues/6","id":109877648,"number":6,"title":"Compiler should catch name collision between package and file name","user":{"login":"janicedatawire","id":14184065,"avatar_url":"https://avatars.githubusercontent.com/u/14184065?v=3","gravatar_id":"","url":"https://api.github.com/users/janicedatawire","html_url":"https://github.com/janicedatawire","followers_url":"https://api.github.com/users/janicedatawire/followers","following_url":"https://api.github.com/users/janicedatawire/following{/other_user}","gists_url":"https://api.github.com/users/janicedatawire/gists{/gist_id}","starred_url":"https://api.github.com/users/janicedatawire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janicedatawire/subscriptions","organizations_url":"https://api.github.com/users/janicedatawire/orgs","repos_url":"https://api.github.com/users/janicedatawire/repos","events_url":"https://api.github.com/users/janicedatawire/events{/privacy}","received_events_url":"https://api.github.com/users/janicedatawire/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-05T20:20:16Z","updated_at":"2015-10-28T16:39:49Z","closed_at":null,"body":"The package name and the quark file name must be different. The compiler currently allows them to be the same - it should check and throw an error in this case."},"comment":{"url":"https://api.github.com/repos/datawire/quark/issues/comments/151904093","html_url":"https://github.com/datawire/quark/issues/6#issuecomment-151904093","issue_url":"https://api.github.com/repos/datawire/quark/issues/6","id":151904093,"user":{"login":"ark3","id":1765854,"avatar_url":"https://avatars.githubusercontent.com/u/1765854?v=3","gravatar_id":"","url":"https://api.github.com/users/ark3","html_url":"https://github.com/ark3","followers_url":"https://api.github.com/users/ark3/followers","following_url":"https://api.github.com/users/ark3/following{/other_user}","gists_url":"https://api.github.com/users/ark3/gists{/gist_id}","starred_url":"https://api.github.com/users/ark3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ark3/subscriptions","organizations_url":"https://api.github.com/users/ark3/orgs","repos_url":"https://api.github.com/users/ark3/repos","events_url":"https://api.github.com/users/ark3/events{/privacy}","received_events_url":"https://api.github.com/users/ark3/received_events","type":"User","site_admin":false},"created_at":"2015-10-28T16:39:49Z","updated_at":"2015-10-28T16:39:49Z","body":"To clarify, the package name (`package henry { ... }`) and the quark filename (`henry.q`) must be different only if the quark file contains code that is not in a package. In the JS and Python backends, that non-package code ends up in a target file named after the quark filename (`henry.js` and `henry.py`), which makes importing the package (in `henry/index.js` and `henry/__init__.py`) conflict with importing the non-package code.\r\n\r\nThe compiler could detect this scenario and then complain unconditionally, as specified above, but it might be nicer not to complain if there is no non-package code and thus no conflict. I like the idea of defining a package called directory in a file called directory.q."}}