This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-08-21
Channels
- # aleph (2)
- # beginners (22)
- # boot (7)
- # chestnut (8)
- # cider (4)
- # clara (3)
- # cljs-dev (3)
- # cljs-experience (19)
- # clojure (69)
- # clojure-italy (8)
- # clojure-nl (1)
- # clojure-spec (11)
- # clojure-uk (17)
- # clojurescript (77)
- # cursive (22)
- # datomic (14)
- # events (1)
- # fulcro (78)
- # hoplon (51)
- # jobs (3)
- # keechma (1)
- # lambdaisland (1)
- # lumo (30)
- # off-topic (42)
- # om (22)
- # onyx (5)
- # parinfer (4)
- # portkey (1)
- # re-frame (15)
- # reagent (2)
- # ring (4)
- # spacemacs (1)
- # specter (23)
- # testing (1)
- # unrepl (60)
- # yada (8)
@flyboarder great, that fixed the warnings 🙂
how do i disable spec?
it's i'm getting clojure.lang.ExceptionInfo: clojure.lang.ExceptionInfo: ERROR: Call to hoplon.core/elem did not conform to spec:
when i destructure attributes
Macro specs cannot be disabled, it's part of the compiler
@thedavidmeister I wonder if there are destructure specs in core
i dunno
but i can't upgrade hoplon atm 😞
(h/defelem section
[{:keys [left right middle]} children]
that's throwing errors for me
i'll put a test up for you so you can see the problem @flyboarder
Cool, I can fix this right away
@flyboarder https://github.com/hoplon/hoplon/pull/199/commits/8a97bcf0ec8ce1969ccb69e25b82e3cdd5c13875
let's see how these go 🙂
ok yeah, it's definitely destructuring that spec is choking on @flyboarder
it can't handle this at all
(h/defelem div--destructured
[{:keys [foo] :as attributes} _]
(h/div
:data-bar foo
(dissoc attributes :foo)))
@thedavidmeister I found clojure core specs, using that
@flyboarder those tests passed 🙂 i'll try with main test suite again
@flyboarder actually, do you need to push to clojars first?
@thedavidmeister on clojars now!
cool, i'll test it out
still failures
i'll push new tests in a sec
@flyboarder https://github.com/hoplon/hoplon/pull/199/commits/a2a02f5dd2ea6ab1932a5842ed1467f16900c68d should fail tests
when there are no children it breaks
@thedavidmeister not sure why that passes the spec, it should have at least 2 items to pass
why? lots of dom elements cannot have children
e.g. img
i suppose you could do _
in that case but hoplon actually works (or did) fine without children
at all
@thedavidmeister I suppose you are correct, will hoplon break if things without a child are passed children?
@dm3 defining a function as [attr]
vs [attr kids]
, ill have to look at how children are passed to the element
@dm3 @thedavidmeister https://github.com/hoplon/hoplon/blob/master/src/hoplon/core.clj#L129-L133
A function of 2 arguments, as per the docs
that should fix it
fixed tests
@micha btw, not sure if you’ve looked at https://github.com/hoplon/javelin/issues/35 or https://github.com/hoplon/javelin/issues/25#issuecomment-315618275 - I’ve implemented the JVM/self-host Cljs Javelin support. Haven’t had the time to finish it up - the non-self-host Cljs build is broken 🙂 Would be great to hear if you’d accept the changes upstream in the future/what needs to be done for you to accept it.