layerware/hugsql

Breaks on multiple lines of whitespace in sql file.

kvey opened this issue · 6 comments

kvey commented
-- example

-- :name example-all :? :*
-- :doc Example
TABLE examples

Will succeed, while

-- example


-- :name example-all :? :*
-- :doc Example
TABLE examples

will fail with: clojure.lang.ExceptionInfo: Encountered SQL with no hugsql header line: 4, column: 1 {:line 4, :column 1}

@kvey I'm having trouble reproducing your issue using the "broken" example. What version of HugSQL are you using?

kvey commented

[com.layerware/hugsql "0.4.3"]

While loading from file using def-db-fns

Ok, so I was just now able to reproduce. Looks like a bug for sure. I'll find a fix and get it into the next release. Thanks for the report!

kvey commented

Sounds great! Thank you. (resolved for now in my current work by just adjusting all of that whitespace)

Found and fixed the issue. This will roll into 0.4.4 probably later today or tomorrow. Thanks again!

0.4.4 has been released with this fix. Please let me know if this has resolved the issue for you. Thanks!