{"action":"opened","issue":{"url":"https://api.github.com/repos/krisajenkins/yesql/issues/71","labels_url":"https://api.github.com/repos/krisajenkins/yesql/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/krisajenkins/yesql/issues/71/comments","events_url":"https://api.github.com/repos/krisajenkins/yesql/issues/71/events","html_url":"https://github.com/krisajenkins/yesql/issues/71","id":59533844,"number":71,"title":"this macro expansion is killing me https://github.com/krisajenkins/yesql/blob/9124ce779df4f8e2d79b83d3023b9460f26fae37/src/yesql/core.clj#L27","user":{"login":"hiredman","id":35954,"avatar_url":"https://avatars.githubusercontent.com/u/35954?v=3","gravatar_id":"","url":"https://api.github.com/users/hiredman","html_url":"https://github.com/hiredman","followers_url":"https://api.github.com/users/hiredman/followers","following_url":"https://api.github.com/users/hiredman/following{/other_user}","gists_url":"https://api.github.com/users/hiredman/gists{/gist_id}","starred_url":"https://api.github.com/users/hiredman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hiredman/subscriptions","organizations_url":"https://api.github.com/users/hiredman/orgs","repos_url":"https://api.github.com/users/hiredman/repos","events_url":"https://api.github.com/users/hiredman/events{/privacy}","received_events_url":"https://api.github.com/users/hiredman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-02T19:30:14Z","updated_at":"2015-03-02T19:30:14Z","closed_at":null,"body":"https://github.com/krisajenkins/yesql/blob/9124ce779df4f8e2d79b83d3023b9460f26fae37/src/yesql/core.clj#L27 expands in to a vector with doall being called on it, this is really weird.\r\n\r\n1. doall forces a lazy sequence, and calls seq on its input\r\n2. vectors are not lazy, and their seqs are not either\r\n3. why generate a vector that is never used\r\n\r\nobviously this macro should be \r\n```clj\r\n(defmacro defqueries\r\n  \"Defines several query functions, as defined in the given SQL file.\r\n   Each query in the file must begin with a `-- name: <function-name>` marker,\r\n   followed by optional comment lines (which form the docstring), followed by\r\n   the query itself.\"\r\n  [filename]\r\n  (let [queries (->> filename\r\n                     slurp-from-classpath\r\n                     parse-tagged-queries)]\r\n    `(do ~@(for [query queries]\r\n                 (emit-def query)))))\r\n```\r\nexpanding in to a vector is really problematic with linters because they complain that you create a vector and do nothing with it"}}