{"action":"created","issue":{"url":"https://api.github.com/repos/datawire/quark/issues/18","labels_url":"https://api.github.com/repos/datawire/quark/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/datawire/quark/issues/18/comments","events_url":"https://api.github.com/repos/datawire/quark/issues/18/events","html_url":"https://github.com/datawire/quark/issues/18","id":111256653,"number":18,"title":"Trying to compile a quark file without the files for referenced packages crashes the compiler","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":2,"created_at":"2015-10-13T19:52:39Z","updated_at":"2015-10-13T20:52:03Z","closed_at":null,"body":"We should catch this and throw a reasonable error like \"package foo must also be compiled\" or similar\r\n\r\nInstead, currently we get the following crash:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/Users/janicekarin/virtualenv/bin/quark\", line 9, in <module>\r\n    load_entry_point('datawire-quark==0.1.0', 'console_scripts', 'quark')()\r\n  File \"/Users/janicekarin/quark/quark/compiler.py\", line 566, in main\r\n    exit(_main(docopt(main.__doc__)))\r\n  File \"/Users/janicekarin/quark/quark/compiler.py\", line 542, in _main\r\n    c.compile()\r\n  File \"/Users/janicekarin/quark/quark/compiler.py\", line 497, in compile\r\n    self.root.traverse(use)\r\n  File \"/Users/janicekarin/quark/quark/ast.py\", line 93, in traverse\r\n    c.traverse(visitor, *args, **kwargs)\r\n  File \"/Users/janicekarin/quark/quark/ast.py\", line 93, in traverse\r\n    c.traverse(visitor, *args, **kwargs)\r\n  File \"/Users/janicekarin/quark/quark/ast.py\", line 93, in traverse\r\n    c.traverse(visitor, *args, **kwargs)\r\n  File \"/Users/janicekarin/quark/quark/ast.py\", line 93, in traverse\r\n    c.traverse(visitor, *args, **kwargs)\r\n  File \"/Users/janicekarin/quark/quark/ast.py\", line 93, in traverse\r\n    c.traverse(visitor, *args, **kwargs)\r\n  File \"/Users/janicekarin/quark/quark/ast.py\", line 93, in traverse\r\n    c.traverse(visitor, *args, **kwargs)\r\n  File \"/Users/janicekarin/quark/quark/ast.py\", line 94, in traverse\r\n    leave(self, *args, **kwargs)\r\n  File \"/Users/janicekarin/quark/quark/compiler.py\", line 233, in leave_Type\r\n    if n.text in type.env:\r\nAttributeError: 'NoneType' object has no attribute 'env'\r\n```"},"comment":{"url":"https://api.github.com/repos/datawire/quark/issues/comments/147850178","html_url":"https://github.com/datawire/quark/issues/18#issuecomment-147850178","issue_url":"https://api.github.com/repos/datawire/quark/issues/18","id":147850178,"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},"created_at":"2015-10-13T20:52:03Z","updated_at":"2015-10-13T20:52:03Z","body":"Try any of the following (from the base quark directory) using the calculatepi.q example checked in at quark/examples:\r\n\r\n`quark --python ~/quark-examples/python examples/calculatepi.q`\r\n\r\n`quark --java ~/quark-examples/java examples/calculatepi.q`\r\n\r\n`quark --javascript ~/quark-examples/javascript examples/calculatepi.q`"}}