-
Notifications
You must be signed in to change notification settings - Fork 312
Description
Hey! Thanks again for the amazing work on this. I'm seeing an odd issue when trying to compile a project using datascript under cljs 1.7.48 with :optimizations :advanced, where query parsing will fail:
calling:
(let [db (-> (d/empty-db)
(d/db-with [ { :db/id 1, :name "Ivan", :age 15 }
{ :db/id 2, :name "Petr", :age 37 }
{ :db/id 3, :name "Ivan", :age 37 }
{ :db/id 4, :age 15 }]))]
(print (d/q '[:find ?e
:where
[?e :name]] db)))Throws:
Uncaught #error {:message "Cannot parse binding, expected (bind-scalar | bind-tuple | bind-coll | bind-rel)", :data {:error :parser/binding, :form .}}
from:
(defn parse-binding [form]
(or (parse-bind-coll form)
(parse-bind-rel form)
(parse-bind-tuple form)
(parse-bind-ignore form)
(parse-bind-scalar form)
(raise "Cannot parse binding, expected (bind-scalar | bind-tuple | bind-coll | bind-rel)"
{:error :parser/binding, :form form})))Works fine in development. I looked over #30, but it looks like the externs are loading fine, if I explicitly include them I get an error that they're already there. Since DS works fine on 1.7.28 I'm thinking it might have something to do with this commit but I'm really not sure.
I threw together a minimal project to demonstrate the problem, just run scripts/release to build it.