This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-19
Channels
- # aleph (8)
- # announcements (43)
- # babashka (43)
- # beginners (62)
- # calva (8)
- # cider (27)
- # clj-kondo (18)
- # cljs-dev (25)
- # cljsrn (16)
- # clojure (51)
- # clojure-europe (6)
- # clojure-nl (14)
- # clojure-spec (7)
- # clojure-uk (39)
- # clojurescript (17)
- # cursive (9)
- # datascript (12)
- # datomic (16)
- # events (1)
- # fulcro (7)
- # funcool (1)
- # graalvm (2)
- # graphql (5)
- # jobs (1)
- # juxt (6)
- # kaocha (9)
- # leiningen (11)
- # luminus (1)
- # malli (1)
- # off-topic (80)
- # other-languages (2)
- # overtone (3)
- # pedestal (5)
- # quil (1)
- # re-frame (6)
- # reagent (1)
- # reitit (4)
- # rewrite-clj (5)
- # shadow-cljs (207)
- # spacemacs (1)
- # specter (4)
- # sql (1)
- # vim (14)
- # xtdb (7)
I'm getting a "Lookup ref attribute should be marked as :db/unique" but only with advanced compilation. It's driving me crazy.
Not looking for answers but is there a support group I can join?
@olivergeorge shot in the dark, but this helped me when I was having advanced compilation trouble with DataScript: https://github.com/tonsky/datascript/wiki/Tips-&-tricks#externs-and-shadow-cljs
Thanks for sharing @cjsauer. Not using shadow-cljs and I think externs are where they should be ... we'll see. I need to get to a minimal test case.
Here's my test case.
(let [db (d/empty-db {:sighting/id {:db/unique :db.unique/identity}
:user/sightings {:db/cardinality :db.cardinality/many :db/valueType :db.type/ref}})
tx-data [{:user/sightings [{:sighting/id 123}]}]]
(try (d/db-with db tx-data)
(js/alert "Success")
(catch js/Object e
(js/alert (.-message e)))))
Really hoping someone will tell me I'm doing something obvious.
Fails with this error "Lookup ref should contain 2 elements: [{:sighting/id 123}]"
But only fails with iOS simulator running release configuration.
So it seems like some assumption in the CLJS code isn't always true.
It's a re-natal project.
Need to do more testing of combinations etc.